Skip to content

Instantly share code, notes, and snippets.

@manpages
Created May 10, 2012 13:00
Show Gist options
  • Save manpages/2652868 to your computer and use it in GitHub Desktop.
Save manpages/2652868 to your computer and use it in GitHub Desktop.
I want to ride my bicycle
<??
-include_lib ("fisbb/include/fisbb.hrl").
??>
<?
{Topic, Messages, PageCount} = Arg,
%TODO: get Parent() and Parent(Parent()),
Forum = fission_once:get_ev({forum, Topic#topic.parent})
?>
<html>
<head>
<script type="text/javascript" src="/js/text_wrapper.js"></script>
</head>
<body>
<h2><a href="/forum/<?= Forum#forum.id ?>"><?= Forum#forum.name ?></a> (forum)</h3>
<h3 id="topicName"><a href="/topic/<?= Topic#topic.id ?>"><?= Topic#topic.name ?></a> (topic)</h3>
<div id="content">
<?
case (Messages) of
[] ->
a?>
<?= fisbb_lang:t("No messages found") ?>
<?z;
_ ->
lists:foreach(fun(MID) ->
Message = fission_once:get_ev({message, MID}),
User = fisbb_user:get_cv(Message#message.author, profile)
?>
<?= fisbb_lang:t("Message>") ?>
<div class="postedBy">
<span class="nick"><?= User#profile.nick ?></span><br />
<span class="date"><?= fisbb_util:date_format(Message#message.time) ?></span>
</div>
<div class="message">
<?= Message#message.text ?>
</div>
<hr />
<?z
end, Messages)
end
?>
<form method="post" name="message">
<?= fisbb_lang:t("Quick post") ?><br />
<input type="text" name="name" value="<?= fisbb_lang:t("Re: ") ?><?=Topic#topic.name?>" /><br />
<?= fisbb_lang:t("Post text") ?><br />
<textarea name="bbcode"></textarea><br />
Formatting:<br />
<a href="#" onclick="boldThis('message', 'bbcode'); return false;">Bold</a> |
<a href="#" onclick="italicThis('message', 'bbcode'); return false;">Italic</a> |
<a href="#" onclick="underlineThis('message', 'bbcode'); return false;">Underline</a>
<br />
<input type="submit" name="ok" value="post" />
</form>
<?= fisbb_util:links_for_pages(("/topic/" ++ integer_to_list(Topic#topic.id)), PageCount) ?>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment