Pagina 1 van 1

Maanden

Geplaatst: 20 aug 2006, 20:54
door B-sTyLe
Hoe kan ik ervoor zorgen dat de topics in viewtopic gesorteerd worden in maanden.
zoiets:

Juli
-topic 1
-topic 2

Augustus
-topic 3
-topic 4


September
-topic 5
-topic 6

grz,,

Geplaatst: 21 aug 2006, 17:35
door Luuk
Open viewtopic.php en zoek

Code: Selecteer alles

if( $total_topics )
{
Zet erachter

Code: Selecteer alles

	$first_topic_month = 0;
Zoek

Code: Selecteer alles

		$template->assign_block_vars('topicrow', array(
Vervang met

Code: Selecteer alles

		$topic_month = date("n", $topic_rowset[$i]['topic_time']);
		if ( $first_topic_month !== $topic_month )
		{
		    $template->assign_block_vars('month', array(
			    'MONTH' => $lang['datetime'][date("F", $topic_rowset[$i]['topic_time'])] . ' ' . date("Y", $topic_rowset[$i]['topic_time']) )
			);
			$first_topic_month = $topic_month;
		}

		$template->assign_block_vars('month.topicrow', array(

Open templates/xxx/viewforum_body.tpl en zoek

Code: Selecteer alles

	<!-- BEGIN topicrow -->
	<tr> 
	  <td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
	  <td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
		{topicrow.GOTO_PAGE}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
	  <td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
	  <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
	</tr>
	<!-- END topicrow -->
En vervang met

Code: Selecteer alles

	<!-- BEGIN month -->
	<tr> 
	  <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;-&nbsp;{month.MONTH}&nbsp;</th>
	  <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
	  <th width="100" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
	  <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
	  <th align="center" class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
	</tr>
	<!-- BEGIN topicrow -->
	<tr> 
	  <td class="row1" align="center" valign="middle" width="20"><img src="{month.topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{month.topicrow.L_TOPIC_FOLDER_ALT}" title="{month.topicrow.L_TOPIC_FOLDER_ALT}" /></td>
	  <td class="row1" width="100%"><span class="topictitle">{month.topicrow.NEWEST_POST_IMG}{month.topicrow.TOPIC_TYPE}<a href="{month.topicrow.U_VIEW_TOPIC}" class="topictitle">{month.topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
		{month.topicrow.GOTO_PAGE}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{month.topicrow.REPLIES}</span></td>
	  <td class="row3" align="center" valign="middle"><span class="name">{month.topicrow.TOPIC_AUTHOR}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{month.topicrow.VIEWS}</span></td>
	  <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{month.topicrow.LAST_POST_TIME}<br />{month.topicrow.LAST_POST_AUTHOR} {month.topicrow.LAST_POST_IMG}</span></td>
	</tr>
	<!-- END topicrow -->
	<!-- END month -->
:thumb:

Geplaatst: 21 aug 2006, 19:56
door B-sTyLe
Wow, echt helemaal super :D :D