Separate stickies/announcements from other posts

Tutorials for <a href="http://www.phpbbstyles.com/viewtopic.php?t=356">eXtreme Styles mod</a> for phpBB 2.0.

Moderator: Moderators

Separate stickies/announcements from other posts

Postby PostBot on Tue Mar 01, 2005 12:19 pm

Hello,

There used to be tutorial on how to do it with extreme styles mod without modifying any php files, hovewer that tutorial didn't work properly with topics that had polls so here is better tutorial but it requires minor changes in php files.

Open viewforum.php, find this:
Code: Select all
         'TOPIC_TYPE' => $topic_type,
and add after it:
Code: Select all
         'TOPIC_TYPE_NUM' => $topic_rowset[$i]['topic_type'] + 1,
then open viewforum_body.tpl, find this:
Code: Select all
   <!-- BEGIN topicrow -->
and add before it:
Code: Select all
   <!-- DEFINE $LAST_TYPE = 1 -->
and then add after <!-- BEGIN topicrow -->:
Code: Select all
   <!-- IF topicrow.TOPIC_TYPE_NUM < $LAST_TYPE -->
   <!-- DEFINE $LAST_TYPE = topicrow.TOPIC_TYPE_NUM -->
   <tr>
     <th colspan="2" align="center" height="25" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
     <th width="50" align="center" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
     <th width="100" align="center" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
     <th width="50" align="center" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
     <th align="center" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
   </tr>
   <!-- ELSEIF topicrow.TOPIC_TYPE_NUM > 1 -->
   <!-- DEFINE $LAST_TYPE = 2 -->
   <!-- ENDIF -->
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby kunalmittal on Tue Mar 01, 2005 12:43 pm

ah cool thanks thanks thanks much for it
that worked
kunalmittal
Registered User
Registered User
 
Posts: 89
Joined: Sun Jan 02, 2005 2:27 pm

Postby Shifty31 on Thu Mar 03, 2005 6:59 am

User avatar
Shifty31
Registered User
Registered User
 
Posts: 51
Joined: Wed Feb 23, 2005 7:08 am

Postby $H@rK on Sun Mar 13, 2005 2:05 am

CA, please help me doesn't work on my, i did everything, and i don't got any erors, i puted first code on root file then 2 in ca_.. (new style) . Donno why ? :?
If you don't want your forum to be hacked, update to phpbb 2.0.13 NOW !
The best style that i saw and using is [url=viewtopic.php?t=2035][b]MorpheusX[/url][/b]
User avatar
$H@rK
Registered User
Registered User
 
Posts: 314
Joined: Mon Jan 03, 2005 1:21 am

Postby PostBot on Sun Mar 13, 2005 11:04 am

Make sure you applied changes to viewforum.php
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby [mez] on Sun Mar 13, 2005 1:09 pm

will modifying only 1 templates "viewforum_body.tpl" file affect the others? Or should i do it to all templates?

I really only want to do it to the aphrodite template...

Thanks in advance
User avatar
[mez]
Registered User
Registered User
 
Posts: 37
Joined: Mon Jan 31, 2005 12:34 am
Location: Australia

Postby PostBot on Sun Mar 13, 2005 2:02 pm

No need to modify other templates. Edit only ones that you want to edit.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby $H@rK on Sun Mar 13, 2005 2:50 pm

doesn't work :(

<!-- BEGIN topicrow -->
<!-- IF topicrow.TOPIC_TYPE_NUM < $LAST_TYPE -->
<!-- DEFINE $LAST_TYPE = topicrow.TOPIC_TYPE_NUM -->
<tr>
<th colspan="2" align="center" height="25" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
<th width="50" align="center" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
<th width="100" align="center" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
<th width="50" align="center" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
<th align="center" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
</tr>
<!-- ELSEIF topicrow.TOPIC_TYPE_NUM > 1 -->
<!-- DEFINE $LAST_TYPE = 2 -->
<!-- ENDIF -->
<!-- DEFINE $LAST_TYPE = 1 -->


and viewforum.php

$template->assign_block_vars('topicrow', array(
'ROW_COLOR' => $row_color,
'ROW_CLASS' => $row_class,
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_FOLDER_IMG' => $folder_image,
'TOPIC_AUTHOR' => $topic_author,
'GOTO_PAGE' => $goto_page,
'REPLIES' => $replies,
'NEWEST_POST_IMG' => $newest_post_img,
'TOPIC_TITLE' => $topic_title,
'TOPIC_TYPE' => $topic_type,
'TOPIC_TYPE_NUM' => $topic_rowset[$i]['topic_type'] + 1,
'VIEWS' => $views,
'FIRST_POST_TIME' => $first_post_time,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_AUTHOR' => $last_post_author,
'LAST_POST_IMG' => $last_post_url,

'L_TOPIC_FOLDER_ALT' => $folder_alt,

'U_VIEW_TOPIC' => $view_topic_url)
If you don't want your forum to be hacked, update to phpbb 2.0.13 NOW !
The best style that i saw and using is [url=viewtopic.php?t=2035][b]MorpheusX[/url][/b]
User avatar
$H@rK
Registered User
Registered User
 
Posts: 314
Joined: Mon Jan 03, 2005 1:21 am

Postby [mez] on Mon Mar 14, 2005 6:48 am

[quote user="CyberAlien" post="22890"]No need to modify other templates. Edit only ones that you want to edit.[/quote]

But doesn't editing "viewforum.php" affect all templates?
User avatar
[mez]
Registered User
Registered User
 
Posts: 37
Joined: Mon Jan 31, 2005 12:34 am
Location: Australia

Postby PostBot on Mon Mar 14, 2005 9:37 am

No it doesn't because you don't modify any existing variables.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby $H@rK on Mon Mar 14, 2005 12:20 pm

what about me ?
If you don't want your forum to be hacked, update to phpbb 2.0.13 NOW !
The best style that i saw and using is [url=viewtopic.php?t=2035][b]MorpheusX[/url][/b]
User avatar
$H@rK
Registered User
Registered User
 
Posts: 314
Joined: Mon Jan 03, 2005 1:21 am

Postby PostBot on Mon Mar 14, 2005 12:55 pm

Your code should work fine. Can you post url where it doesn't work?
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby $H@rK on Mon Mar 14, 2005 12:56 pm

[quote user="CyberAlien" post="23018"]Your code should work fine. Can you post url where it doesn't work?[/quote]

www.thegfxcommunity.net
If you don't want your forum to be hacked, update to phpbb 2.0.13 NOW !
The best style that i saw and using is [url=viewtopic.php?t=2035][b]MorpheusX[/url][/b]
User avatar
$H@rK
Registered User
Registered User
 
Posts: 314
Joined: Mon Jan 03, 2005 1:21 am

Postby PostBot on Mon Mar 14, 2005 1:00 pm

You forgot to add <!-- DEFINE $LAST_TYPE = 1 --> before <!-- BEGIN topicrow -->
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby $H@rK on Mon Mar 14, 2005 1:10 pm

thank you very much CA :), and can u help me with Lottery too ?
If you don't want your forum to be hacked, update to phpbb 2.0.13 NOW !
The best style that i saw and using is [url=viewtopic.php?t=2035][b]MorpheusX[/url][/b]
User avatar
$H@rK
Registered User
Registered User
 
Posts: 314
Joined: Mon Jan 03, 2005 1:21 am

Next

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 2 guests

cron