Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Article Gallery
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Article Gallery
Requirement: XThreads
Latest Edit: 7 October 2012

This idea based on Forum Blog by Yumi. Thank you very much, Yumi Smile

With XThreads, we can create an article gallery. In this example, we will combine XThreads with Thread Tooltip Preview by Yumi.

Here is a simple example to do that:

1. This is for article categories. Create a Custom Thread Fields with this settings:
  • Title: Category
  • Key: atcgal
    This is the key. So, the variable will be: {$GLOBALS['threadfields']['atcgal']}
  • Description: Choose category for this article (required). You can choose more than one category.
  • Applicable Forums: 'select the forum where we will apply this article gallery.
  • Input Field Type: Checkboxes
    We are allowing user to choose more than one category per article.
  • Values List:

    Code:
    Music
    Games
    Other

    Modify it as our needs. These are our categories.

  • Editable by / Required Field?: Everyone (required)
    It will force every user to select at least one category when they create a thread.
  • Display Order: 1
  • Allow Filtering: Yes
    With this option = Yes, we can filter our articles based on their categories.
  • Display Format:

    Code:
    Category: {VALUE}

  • Multiple Value Delimiter: , (plus one space)
    If a user choose more than one category, it will be displayed:

    Code:
    Category: category1, category2

  • Formatting Map List:

    HTML Code
    Music{|}<a href="{$forumurl?}filtertf_atcgal=Music"><span style="color: green;">Music</span></a>
    Games{|}<a href="{$forumurl?}filtertf_atcgal=Games"><span style="color: blue;">Games</span></a>
    Other{|}<a href="{$forumurl?}filtertf_atcgal=Other"><span style="color: red;">Other</span></a>

    To display this formatting list, later we need to put {$GLOBALS['threadfields']['atcgal']} variable in our template.


2. Now, XThreads Options in Forum settings (the forum in the settings above):
  • Template Prefix: atcgal_
  • Show first post on every showthread page: Yes
  • Enable XThreads' Inline Forum Search: Yes
  • Override Threads Per Page: 2
    Modify it as our needs. Threads per page in thread list.
  • Settings Overrides:
    • Setting: Showthread Options -> Post Per Page:
      Value: 4
      Modify it as our needs.
    • Setting: Showthread Options -> Post Layout
      Value: horizontal
      This will force horizontal postbit layout when user view all threads in this forum.

      Code:
      postsperpage=4
      postlayout=horizontal


As an option, set Default Sort By: Thread creation time.

3. Create new templates in Global Template:
  • Template Name: atcgal_forumdisplay_nothreads
  • Template Content:

    HTML Code
    <div>{$lang->nothreads}</div>

  • Template Name: atcgal_forumdisplay_thread
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" colspan="{$colspan}">
    			<div><strong><a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong></div>
    		</td>
    	</tr>
    	<tr>
    		<td class="tcat" colspan="{$colspan}">
    			<span class="author smalltext float_left">
    				{$lang->author}: {$thread['profilelink']} | {$GLOBALS['threadfields']['atcgal']}
    			</span>
    			{$rating}
    		</td>
    	</tr>
    	<tr>
    		<td class="{$bgcolor}" width="100%">
    			<div class="post_body">
    				 {$thread['postpreview']}
    			</div>
    			<br class="clear" />
    			<span class="float_right smalltext">
    				<em>
    				{$thread['views']} {$lang->views},
    				<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} {$lang->replies},
    				<a href="{$thread['lastpostlink']}" title="{$thread['lastpostpreview']}">{$lang->lastpost}</a>: {$lastposterlink}, {$lastpostdate} {$lastposttime}
    				</em>
    			</span>
    			<span class="float_left">
    				<img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" />{$icon}{$prefix}{$gotounread}
    			</span>
    		</td>
    		{$modbit}
    	</tr>
    </table>
    <br />

  • Template Name: atcgal_forumdisplay_threadlist
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" colspan="{$colspan}" align="center">
    				<strong>{$foruminfo['name']}</strong>
    		</td>
    	</tr>
    </table>
    <br class="clear" />
    <div class="float_left">
    	{$newthread}
    </div>
    <div class="float_right">
    	{$searchforum}
    </div>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%; background: #FFFFFF;">
    	<tr>
    		<td valign="top" width="250" colspan="{$colspan}">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr><td class="thead"><strong>Categories</strong></td></tr>
    				<tr><td class="trow1 {$filters_set['atcgal']['active']['Music']}"><a href="{$forumurl_q}filtertf_atcgal=Music"><span><strong>Music</strong></span></a></td></tr>
    				<tr><td class="trow1 {$filters_set['atcgal']['active']['Games']}"><a href="{$forumurl_q}filtertf_atcgal=Games"><span><strong>Games</strong></span></a></td></tr>
    				<tr><td class="trow1 {$filters_set['atcgal']['active']['Other']}"><a href="{$forumurl_q}filtertf_atcgal=Other"><span><strong>Other</strong></span></a></td></tr>
    			</table>
    			<br class="clear" />
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr><td class="thead"><strong>Sort By</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']}</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></td></tr>
    				{$ratingcol}
    			</table>
    		</td>
    		<td valign="top" colspan="{$colspan}">
    			{$threads}{$nullthreads}
    			<br class="clear" />
    			<div class="float_left">
    				{$multipage}
    			</div>
    			<br class="clear" />
    		</td>
    		<td valign="top" colspan="{$colspan}" width="490">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr><td class="thead"><strong>Article Legend</strong></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</strong></span></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</strong></span></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</strong></span></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</strong></span></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</strong></span></td></tr>
    				<tr><td class="trow1"><span class="thread_legend"><strong><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</strong></span></td></tr>
    			</table>
    			<br class="clear" />
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr><td class="thead"><strong>Article Tools</strong></td></tr>
    				<tr><td class="trow1"><strong><a href="misc.php?action=markread&amp;fid={$fid}">{$lang->markforum_read}</a></strong></td></tr>
    				<tr><td class="trow1"><strong><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></td></tr>
    			</table>
    		</td>
    	</tr>
    </table>
    <br class="clear" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="tcat">
    			<div class="float_left">
    			<form action="forumdisplay.php" method="get">
    				<input type="hidden" name="fid" value="{$fid}" />
    				<select name="sortby">
    					<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
    					<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
    					<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
    					<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
    					{$ratingsort}
    					<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
    					<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
    				</select>
    				<select name="order">
    					<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
    					<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
    				</select>
    				<select name="datecut">
    					<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
    					<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
    					<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
    					<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
    					<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
    					<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
    					<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
    					<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
    					<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
    				</select>
    				{$gobutton}
    			</form>
    			</div>
    			<div class="float_right">
    				{$forumjump}
    			</div>		
    		</td>
    		{$inlinemodcol}
    	</tr>
    	<tr>
    		<td class="tfoot" align="center" colspan="{$colspan}">
    			<strong><a href="http://mybbhacks.zingaburga.com" target="_blank">XThreads</a> Coded By: <a href="http://mybbhacks.zingaburga.com" target="_blank">ZiNgA BuRgA - MyBB Hacks</a></strong>
    		</td>
    	</tr>
    </table>
    <br class="clear" />
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    </div>
    <br style="clear: both" />
    {$inline_edit_js}

  • Template Name: atcgal_forumdisplay_threadlist_rating
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <tr>
    	<td class="trow1">
    		<strong><a href="{$sorturl}&amp;sortby=rating&amp;order=desc">{$lang->rating}</a> {$orderarrow['rating']}</strong>
    		<script type="text/javascript" src="jscripts/rating.js?ver=1400"></script>
    		<script type="text/javascript">
    		<!--
    			lang.stars = new Array();
    			lang.stars[1] = "{$lang->one_star}";
    			lang.stars[2] = "{$lang->two_stars}";
    			lang.stars[3] = "{$lang->three_stars}";
    			lang.stars[4] = "{$lang->four_stars}";
    			lang.stars[5] = "{$lang->five_stars}";
    		// -->
    		</script>
    	</td>
    </tr>

  • Template Name: atcgal_forumdisplay_thread_rating
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <div class="float_left">&nbsp;| {$lang->rating}:&nbsp;</div>
    <div class="float_left" id="rating_table_{$thread['tid']}">
    	<ul class="star_rating{$not_rated}" id="rating_thread_{$thread['tid']}">
    		<li style="width: {$thread['width']}%" class="current_rating" id="current_rating_{$thread['tid']}">{$ratingvotesav}</li>
    	</ul>
    	<script type="text/javascript">
    	<!--
    		Rating.build_forumdisplay({$thread['tid']}, { width: '{$thread['width']}', extra_class: '{$not_rated}', current_average: '{$ratingvotesav}' });
    	// -->
    	</script>
    </div>

  • Template Name: atcgal_postbit
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['onlinestatus']} <strong><span class="smalltext">{$post['profilelink']}</span></strong> -
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}"></span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    					{$post['iplogged']}
    				</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>
    	</tbody>
    </table>

  • Template Name: atcgal_postbit_first
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    				<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>
    	</tbody>
    </table>

  • Template Name: atcgal_showthread
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    <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}
    <div class="float_right">
    	{$newreply}
    </div>
    {$ratethread}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" style="clear: both; border-bottom-width: 0;">
    	<tr>
    		<td width="60%" valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
    				<tr>
    					<td class="thead" colspan="2">
    						<div style="float: right;">
    							<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
    						</div>
    						<div>
    							<strong>{$thread['subject']}</strong>
    						</div>
    					</td>
    				</tr>
    				{$classic_header}
    			</table>
    			<div>
    				{$first_post}
    			</div>
    			<div align="center">
    				<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
    			</div>
    		</td>
    		<td valign="top">
    			{$search_thread}
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-bottom-width: 0;">
    				<tr>
    					<td class="thead">
    						<div><strong>Comments</strong></div>
    					</td>
    				</tr>
    			</table>
    			<div id="posts">
    				{$posts}
    			</div>
    			<div class="float_right">
    				{$multipage}
    			</div>
    		</td>
    	</tr>
    </table>
    <br style="clear: both;" />
    {$threadexbox}
    {$similarthreads}
    {$quickreply}
    <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&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$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>

  • Template Name: atcgal_showthread_noreplies
  • Template Content:

    HTML Code
    <div id="xthreads_noreplies" align="center">
    <em>There are no comments on this post</em>
    </div>

  • Template Name: atcgal_showthread_ratethread
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <div class="float_left" style="margin-top: 14px;">
    	<strong>{$lang->thread_rating}</strong>&nbsp;
    </div>
    <div class="float_left" style="margin-top: 14px;">
    	<script type="text/javascript" src="jscripts/rating.js?ver=1400"></script>
    	<div class="inline_rating">
    		<ul class="star_rating{$not_rated}" id="rating_thread_{$thread['tid']}">
    			<li style="width: {$thread['width']}%" class="current_rating" id="current_rating_{$thread['tid']}">{$ratingvotesav}</li>
    			<li><a class="one_star" title="{$lang->one_star}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=1&amp;my_post_key={$mybb->post_code}">1</a></li>
    			<li><a class="two_stars" title="{$lang->two_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=2&amp;my_post_key={$mybb->post_code}">2</a></li>
    			<li><a class="three_stars" title="{$lang->three_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=3&amp;my_post_key={$mybb->post_code}">3</a></li>
    			<li><a class="four_stars" title="{$lang->four_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=4&amp;my_post_key={$mybb->post_code}">4</a></li>
    			<li><a class="five_stars" title="{$lang->five_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=5&amp;my_post_key={$mybb->post_code}">5</a></li>
    		</ul>
    	</div>
    </div>

  • Template Name: atcgal_showthread_search
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-bottom-width: 0;">
    	<tr>
    		<td class="thead">
    			<div><strong>Search</strong></div>
    		</td>
    	</tr>
    	<tr>
    		<td class="trow1" align="center">
    			<form action="search.php" method="post">
    				<input type="hidden" name="action" value="thread" />
    				<input type="hidden" name="tid" value="{$thread['tid']}" />
    				<input type="text" name="keywords" value="{$lang->enter_keywords}" onfocus="if(this.value == '{$lang->enter_keywords}') { this.value = ''; }" onblur="if(this.value=='') { this.value='{$lang->enter_keywords}'; }" class="textbox" size="25" />
    				<input type="submit" class="button" value="{$lang->search_thread}" />
    			</form>
    		</td>
    	</tr>
    </table>
    <br class="clear" />

  • Template Name: atcgal_forumdisplay_threads_sep
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" align="center">
    			<div><strong>Normal Articles</strong></div>
    		</td>
    	</tr>
    </table>
    <br />

  • Template Name: atcgal_forumdisplay_sticky_sep
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" align="center">
    			<div><strong>Important Articles</strong></div>
    		</td>
    	</tr>
    </table>
    <br />

  • Template Name: atcgal_forumdisplay
  • Template Content:

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
    {$headerinclude}
    {$rssdiscovery}
    <script type="text/javascript">
    <!--
    	lang.no_new_posts = "{$lang->no_new_posts}";
    	lang.click_mark_read = "{$lang->click_mark_read}";
    // -->
    </script>
    <style type="text/css">
    .filtertf_active {
    	background: #FFF6BF;
    }
    </style>
    </head>
    <body>
    {$header}
    {$moderatedby}
    {$usersbrowsing}
    {$subforums}
    {$threadslist}
    {$footer}
    </body>
    </html>



Additional Info:

If we want to create an article gallery without the Thread Tooltip Preview plugin, we need another step:

1. Create a Custom Thread Fields with this settings:
  • Title: Article Preview
  • Key: atcgalprev
    This is the key. So, the variable will be: {$GLOBALS['threadfields']['atcgalprev']}
  • Description: Type a preview for this article.
  • Applicable Forums: 'select the article gallery forum'
  • Input Field Type: Multiline Textbox
  • Editable by / Required Field?: Everyone (required)
    It will force every user to write a preview for their article.
  • Display Order: 2
  • Display Parsing: Check all of the checkboxes except Allow HTML.
    Modify it as our needs.

2. Find this code in atcgal_forumdisplay_thread template:

Code:
{$thread['postpreview']}


Replace with:

Code:
{$GLOBALS['threadfields']['atcgalprev']}



Screenshots:

1. User create an article thread:

[Image: 232y2u.jpg]

2. User view the post:

[Image: in98nt.jpg]

3. Thread List:

[Image: 25g4a5s.jpg]

I'm sorry for my English Smile
Live Demo: http://www.14.mynie.co.cc/forumdisplay.php?fid=8


(This post was last modified: 10-08-2012 02:13 AM by RateU.)
05-07-2010 02:39 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Article Gallery - RateU - 05-07-2010 02:39 PM
RE: Article Gallery - ZiNgA BuRgA - 05-07-2010, 09:52 PM
RE: Article Gallery - Pirata Nervo - 05-08-2010, 02:35 AM
RE: Article Gallery - RateU - 05-08-2010, 11:18 AM
RE: Article Gallery - ZiNgA BuRgA - 06-06-2010, 04:09 PM
RE: Article Gallery - RateU - 06-07-2010, 03:27 AM
RE: Article Gallery - leefish - 06-10-2010, 02:43 AM
RE: Article Gallery - RateU - 06-10-2010, 02:52 AM
RE: Article Gallery - leefish - 06-13-2010, 11:56 PM
RE: Article Gallery - ZiNgA BuRgA - 06-14-2010, 12:13 AM
RE: Article Gallery - leefish - 06-18-2010, 10:08 AM
RE: Article Gallery - sept - 06-24-2010, 09:05 PM
RE: Article Gallery - RateU - 06-25-2010, 01:32 AM
RE: Article Gallery - Technoman - 07-26-2010, 09:24 AM
RE: Article Gallery - leefish - 07-26-2010, 11:07 AM
RE: Article Gallery - RocketFoot - 07-30-2010, 05:30 AM
RE: Article Gallery - RateU - 07-30-2010, 06:30 AM
RE: Article Gallery - RocketFoot - 07-30-2010, 06:48 AM
RE: Article Gallery - RateU - 07-30-2010, 06:52 AM
RE: Article Gallery - RocketFoot - 07-30-2010, 07:04 AM
RE: Article Gallery - RateU - 07-30-2010, 07:10 AM
RE: Article Gallery - RateU - 08-04-2010, 02:28 AM
RE: Article Gallery - RateU - 10-19-2010, 02:32 AM
RE: Article Gallery - ZiNgA BuRgA - 10-19-2010, 07:54 AM
RE: Article Gallery - leefish - 10-20-2010, 04:14 AM
RE: Article Gallery - RateU - 10-20-2010, 04:53 AM
RE: Article Gallery - leefish - 10-20-2010, 05:22 AM
RE: Article Gallery - RateU - 10-20-2010, 05:57 AM
RE: Article Gallery - ZiNgA BuRgA - 10-20-2010, 08:56 AM
RE: Article Gallery - RocketFoot - 11-23-2010, 07:09 AM
RE: Article Gallery - RateU - 11-23-2010, 07:18 AM
RE: Article Gallery - RocketFoot - 11-23-2010, 07:22 AM
RE: Article Gallery - RateU - 11-23-2010, 07:40 AM
RE: Article Gallery - RocketFoot - 11-23-2010, 07:51 AM
RE: Article Gallery - ZiNgA BuRgA - 11-23-2010, 08:02 AM
RE: Article Gallery - RocketFoot - 11-23-2010, 08:04 AM
RE: Article Gallery - RocketFoot - 11-24-2010, 09:37 PM
RE: Article Gallery - RateU - 11-25-2010, 03:56 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 04:57 AM
RE: Article Gallery - RateU - 11-25-2010, 05:06 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 05:08 AM
RE: Article Gallery - RateU - 11-25-2010, 05:13 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 05:18 AM
RE: Article Gallery - RateU - 11-25-2010, 05:26 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 05:36 AM
RE: Article Gallery - RateU - 11-25-2010, 05:40 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 05:41 AM
RE: Article Gallery - RateU - 11-25-2010, 05:45 AM
RE: Article Gallery - RocketFoot - 11-25-2010, 05:47 AM
RE: Article Gallery - RateU - 11-25-2010, 06:01 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 07:04 AM
RE: Article Gallery - RateU - 12-09-2010, 07:20 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 07:27 AM
RE: Article Gallery - RateU - 12-09-2010, 07:35 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 07:38 AM
RE: Article Gallery - RateU - 12-09-2010, 07:45 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 07:48 AM
RE: Article Gallery - RateU - 12-09-2010, 07:57 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 07:59 AM
RE: Article Gallery - RateU - 12-09-2010, 08:10 AM
RE: Article Gallery - RocketFoot - 12-09-2010, 09:10 AM
RE: Article Gallery - RocketFoot - 12-14-2010, 03:23 AM
RE: Article Gallery - RateU - 12-14-2010, 03:35 AM
RE: Article Gallery - RocketFoot - 12-14-2010, 04:02 AM
RE: Article Gallery - RateU - 12-14-2010, 04:16 AM
RE: Article Gallery - RocketFoot - 12-14-2010, 09:33 PM
RE: Article Gallery - leefish - 12-15-2010, 01:08 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 01:28 AM
RE: Article Gallery - leefish - 12-15-2010, 01:39 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 01:42 AM
RE: Article Gallery - leefish - 12-15-2010, 01:44 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 01:49 AM
RE: Article Gallery - RateU - 12-15-2010, 01:54 AM
RE: Article Gallery - leefish - 12-15-2010, 01:54 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 01:55 AM
RE: Article Gallery - leefish - 12-15-2010, 01:58 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 02:03 AM
RE: Article Gallery - RateU - 12-15-2010, 02:03 AM
RE: Article Gallery - leefish - 12-15-2010, 02:14 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 02:16 AM
RE: Article Gallery - leefish - 12-15-2010, 02:35 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 02:40 AM
RE: Article Gallery - leefish - 12-15-2010, 02:46 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 03:09 AM
RE: Article Gallery - leefish - 12-15-2010, 03:27 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 03:40 AM
RE: Article Gallery - leefish - 12-15-2010, 03:49 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 03:54 AM
RE: Article Gallery - RateU - 12-15-2010, 04:25 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 05:00 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 06:13 AM
RE: Article Gallery - RateU - 12-15-2010, 06:52 AM
RE: Article Gallery - RocketFoot - 12-15-2010, 07:07 AM
RE: Article Gallery - MasterZuFu - 12-17-2010, 11:25 AM
RE: Article Gallery - leefish - 12-17-2010, 07:09 PM
RE: Article Gallery - MasterZuFu - 12-17-2010, 11:13 PM
RE: Article Gallery - RateU - 12-18-2010, 03:55 AM
RE: Article Gallery - MasterZuFu - 12-18-2010, 05:07 AM
RE: Article Gallery - leefish - 12-18-2010, 06:17 AM
RE: Article Gallery - RateU - 12-18-2010, 06:43 AM
RE: Article Gallery - MasterZuFu - 12-18-2010, 07:55 AM
RE: Article Gallery - leefish - 12-18-2010, 08:08 AM
RE: Article Gallery - MasterZuFu - 12-18-2010, 08:27 AM
RE: Article Gallery - RateU - 12-18-2010, 08:40 AM
RE: Article Gallery - MasterZuFu - 12-18-2010, 08:46 AM
RE: Article Gallery - leefish - 12-18-2010, 05:36 PM
RE: Article Gallery - MasterZuFu - 12-18-2010, 06:59 PM
RE: Article Gallery - leefish - 12-18-2010, 07:06 PM
RE: Article Gallery - MasterZuFu - 12-18-2010, 11:41 PM
RE: Article Gallery - leefish - 12-18-2010, 11:55 PM
RE: Article Gallery - ZiNgA BuRgA - 12-19-2010, 12:01 AM
RE: Article Gallery - leefish - 12-19-2010, 12:03 AM
RE: Article Gallery - MasterZuFu - 12-19-2010, 12:04 PM
RE: Article Gallery - RateU - 12-19-2010, 02:58 AM
RE: Article Gallery - leefish - 12-19-2010, 07:18 PM
RE: Article Gallery - MasterZuFu - 12-20-2010, 03:29 AM
RE: Article Gallery - RateU - 12-20-2010, 04:14 AM
RE: Article Gallery - MasterZuFu - 12-20-2010, 10:57 AM
RE: Article Gallery - RocketFoot - 12-22-2010, 09:46 AM
RE: Article Gallery - RateU - 12-23-2010, 01:47 AM
RE: Article Gallery - RocketFoot - 12-23-2010, 04:24 AM
RE: Article Gallery - RateU - 12-23-2010, 07:24 AM
RE: Article Gallery - RocketFoot - 12-23-2010, 09:36 PM
RE: Article Gallery - RocketFoot - 12-30-2010, 03:32 AM
RE: Article Gallery - RateU - 12-30-2010, 03:50 AM
RE: Article Gallery - RocketFoot - 12-30-2010, 08:05 AM
RE: Article Gallery - RocketFoot - 12-30-2010, 09:44 PM
RE: Article Gallery - RateU - 12-31-2010, 02:41 AM
RE: Article Gallery - RocketFoot - 12-31-2010, 02:51 AM
RE: Article Gallery - RateU - 12-31-2010, 03:01 AM
RE: Article Gallery - RocketFoot - 12-31-2010, 03:13 AM
RE: Article Gallery - RocketFoot - 12-31-2010, 04:22 AM
RE: Article Gallery - RateU - 12-31-2010, 04:26 AM
RE: Article Gallery - RocketFoot - 12-31-2010, 04:31 AM
RE: Article Gallery - RateU - 12-31-2010, 05:18 AM
RE: Article Gallery - RocketFoot - 12-31-2010, 06:11 AM
RE: Article Gallery - RocketFoot - 01-08-2011, 12:18 AM
RE: Article Gallery - leefish - 01-08-2011, 12:52 AM
RE: Article Gallery - RocketFoot - 01-08-2011, 02:14 AM
RE: Article Gallery - leefish - 01-08-2011, 03:20 AM
RE: Article Gallery - RateU - 01-08-2011, 04:10 AM
RE: Article Gallery - RateU - 01-19-2011, 03:02 AM
RE: Article Gallery - RocketFoot - 01-19-2011, 03:14 AM
RE: Article Gallery - RateU - 01-20-2011, 04:57 AM
RE: Article Gallery - RocketFoot - 01-20-2011, 08:29 AM
RE: Article Gallery - RateU - 01-21-2011, 02:16 AM
RE: Article Gallery - RocketFoot - 01-21-2011, 02:49 AM
RE: Article Gallery - RateU - 01-21-2011, 03:22 AM
RE: Article Gallery - RocketFoot - 01-21-2011, 03:36 AM
RE: Article Gallery - RateU - 01-21-2011, 07:56 AM
RE: Article Gallery - RocketFoot - 01-21-2011, 10:57 AM
RE: Article Gallery - sanjananb - 02-16-2011, 03:47 AM
RE: Article Gallery - RateU - 02-16-2011, 04:01 AM
RE: Article Gallery - kyuubie - 01-17-2012, 03:19 PM
RE: Article Gallery - RateU - 01-18-2012, 03:43 AM
RE: Article Gallery - kyuubie - 01-18-2012, 04:46 AM
RE: Article Gallery - WhiteEagle - 07-17-2012, 04:56 AM
RE: Article Gallery - Glas - 07-31-2012, 05:06 AM
RE: Article Gallery - RateU - 07-31-2012, 05:19 AM
RE: Article Gallery - Glas - 07-31-2012, 05:35 AM
RE: Article Gallery - RateU - 07-31-2012, 06:03 AM
RE: Article Gallery - Glas - 07-31-2012, 06:26 AM
RE: Article Gallery - alexsubri - 08-26-2012, 10:42 AM
RE: Article Gallery - Gstone - 09-03-2012, 08:27 AM
RE: Article Gallery - RateU - 09-04-2012, 03:57 AM
RE: Article Gallery - Gstone - 09-04-2012, 08:21 AM
RE: Article Gallery - RateU - 10-08-2012, 02:12 AM
RE: Article Gallery - Gstone - 02-16-2013, 04:03 PM
RE: Article Gallery - RateU - 02-17-2013, 12:58 AM
RE: Article Gallery - Gstone - 02-17-2013, 03:25 AM
RE: Article Gallery - iHydra - 06-29-2013, 03:11 AM
RE: Article Gallery - RateU - 06-30-2013, 01:20 AM
RE: Article Gallery - iHydra - 06-30-2013, 02:03 PM
RE: Article Gallery - ZiNgA BuRgA - 06-30-2013, 06:36 PM
RE: Article Gallery - iHydra - 07-01-2013, 09:14 AM
RE: Article Gallery - Ukshep - 12-31-2014, 02:22 AM
RE: Article Gallery - Ukshep - 12-31-2014, 04:11 AM
RE: Article Gallery - danzoooo - 03-07-2015, 07:45 AM
RE: Article Gallery - xensor - 04-19-2015, 10:27 AM
RE: Article Gallery - HumanError - 04-27-2015, 06:42 PM

 Standard Tools
Forum Jump: