05-04-2010, 04:40 PM
This is kinda a useless example, but does show a few XThreads' features. Following this will give you something similar to the blog example here.
I've also added some additional comments in gray to explain the reasoning behind some parts.
Again, kinda stupid, but might show you some things. And I know there's a number of problems with this example, including me being a crappy HTML/CSS designer.
Hope this was useful to someone.
I've also added some additional comments in gray to explain the reasoning behind some parts.
- After activating XThreads, add a new forum which will be used as the blog forum. Use the following XThreads options when adding this forum:
Template Prefix: blog_ [this will allow us to pull different templates for this forum]
Show first post on every showthread page: yes - Add this forum's ID to the list of forum IDs pulled for the portal page
- Go to AdminCP -> Templates & Style -> Templates -> Global Templates and add the following templates (title with code):
blog_forumbit_depth2_forum [this will cause the forum to directly link to the portal page (rather than go through a forum redirect) - note that this may make posting new threads more difficult; you can still do it by navigating to the forum via the forum jump dropdown, but yes, this is perhaps not ideal (it's designed more for demonstration here)]HTML Code<tr> <td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td> <td class="{$bgcolor}" valign="top"> <strong><a href="portal.php">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div> </td><td class="{$bgcolor}" valign="top" colspan="3" style="font-size: smaller;"> <div>Posts: {$threads}{$unapproved['unapproved_threads']}</div> <div>Comments: {$posts}{$unapproved['unapproved_posts']}</div> <div>Latest Post: {$lastpost}</div> </td> </tr>
blog_forumbit_depth2_forum_lastpost [a problem with this is that if there isn't a post in this forum, the "Never" line won't look right; it's hard coded in MyBB, and no easy solution unfortunately, but shouldn't be a big issue on most forums]
HTML Code<span class="smalltext"> <a href="{$lastpost_link}" title="{$full_lastpost_subject}"><strong>{$lastpost_subject}</strong></a> at {$lastpost_date} {$lastpost_time} {$lang->by} {$lastpost_profilelink}</span>
blog_postbit
HTML Code{$ignore_bit} <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a> <div style="padding: 0.2em 0.5em 0em 0.5em; border: 1px solid #e4e4e4; margin: 0.1em 0em;" class="trow2" id="post_{$post['pid']}"> <div style="font-size: smaller;"> {$post['inlinecheck']} Comment <a href="{$post['postlink']}#pid{$post['pid']}">#{$postcounter}</a> by {$post['profilelink']} at {$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span> <span class="post_meta" id="post_meta_{$post['pid']}"> {$post['iplogged']} </span> </div> <div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']} </div> <div class="post_body" id="pid_{$post['pid']}"> {$post['message']} </div> <div class="clear"></div> </div>
blog_postbit_first and blog_postbit_first_classic
HTML Code{$ignore_bit} <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a> <table cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"> <tr> <td class="thead"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></td> </tr> <tr> <td class="trow2" align="right"> <span class="smalltext">Posted by {$post['profilelink']} - {$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span> </td> </tr> <tr> <td class="trow1"> <table border="0" cellpadding="{$theme['tablespace']}" width="100%"> <tr> {$post['useravatar']} <td class="trow1"> <div class="post_body" id="pid_{$post['pid']}"> {$post['message']} </div> {$post['attachments']} <div class="post_meta" id="post_meta_{$post['pid']}"> {$post['iplogged']} </div> </td> </tr> <tr> <td class="trow1 post_buttons {$unapproved_shade}"> <div class="author_buttons float_left"> {$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']} </div> <div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']} </div> </td> </tr> </table> </td> </tr> </table>
blog_postbit_first_iplogged_hiden
HTML Code<p class="smalltext">{$lang->postbit_ipaddress} <a href="moderation.php?action=getip&pid={$post['pid']}">{$lang->postbit_ipaddress_logged}</a></p>
blog_postbit_inlinecheck
HTML Code<input type="checkbox" class="checkbox" name="inlinemod_{$post['pid']}" id="inlinemod_{$post['pid']}" value="1" style="vertical-align: middle;" {$inlinecheck} />
blog_postbit_iplogged_hiden
HTML Code(<a href="moderation.php?action=getip&pid={$post['pid']}">IP</a>)
blog_showthread
HTML Code<html> <head> <title>{$thread['subject']}</title> {$headerinclude} <script type="text/javascript"> <!-- var quickdelete_confirm = "{$lang->quickdelete_confirm}"; // --> </script> <script type="text/javascript" src="jscripts/thread.js?ver=1400"></script> </head> <body> {$header} {$pollbox} {$first_post} <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-top-width: 0;"> <tr> <td colspan="2" class="tfoot"> <div> <strong>« <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> »</strong> </div> </td> </tr> </table> <br clear="all" /> <div class="float_right"> {$newreply} </div> <h2 style="margin-top: 0;">Comments</h2> <div id="posts" style="clear: both; margin-left: 1em; margin-right: 1em;"> {$posts} </div> <div class="clear"><br /></div> <div class="float_left"> {$multipage} </div> <div style="padding-top: 4px;" class="float_right"> Search Comments: {$search_thread} </div> <br style="clear: both;" /> {$quickreply} {$threadexbox} {$similarthreads} <br /> <div class="float_left"> <ul class="thread_tools"> <li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li> <li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li> <li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&tid={$tid}">{$add_remove_subscription_text}</a></li> </ul> </div> <div class="float_right" style="text-align: right;"> {$moderationoptions} {$forumjump} </div> <br style="clear: both;" /> {$footer} </body> </html>
blog_showthread_noreplies
HTML Code<div id="xthreads_noreplies"> There are no comments on this post. </div>
- Go to your blog forum and check that everything works correctly.
Again, kinda stupid, but might show you some things. And I know there's a number of problems with this example, including me being a crappy HTML/CSS designer.
Hope this was useful to someone.