Hot Topics
Posted by Toni
Hot Topics December 12, 2012 12:06PM |
Registered: 11 years ago Posts: 30 |
Re: Hot Topics + Icon December 25, 2012 11:12PM |
Registered: 11 years ago Posts: 30 |
Re: Hot Topics + Icon December 26, 2012 03:39PM |
Admin Registered: 19 years ago Posts: 8,532 |
In the list, you have a template variable that holds the number of posts in the thread. So you could use that one with a bit of logic in the template to show a different icon for topics with enough posts in it.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Hot Topics + Icon December 26, 2012 04:28PM |
Registered: 11 years ago Posts: 30 |
Quote
Maurice Makaay
In the list, you have a template variable that holds the number of posts in the thread. So you could use that one with a bit of logic in the template to show a different icon for topics with enough posts in it.
Thanx, you mean list.tpl ?
Exp: add the code in here? I know this code are for new replay shows flag_red icon, but what should i add more for "hot topic icon" more than 10 replies.
Language: PHP{ELSEIF MESSAGES->new} {VAR icon "flag_red"} {VAR title LANG->NewMessage} {VAR alt LANG->NewMessage}
Edited 2 time(s). Last edit at 12/26/2012 04:36PM by Toni.
Re: Hot Topics + Icon December 26, 2012 06:06PM |
Admin Registered: 19 years ago Posts: 8,532 |
You cannot use pure template language for this, but inside the messages loop in list.tpl, something like this should work:
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Language: PHP<?php if ($PHORUM[';TMP';][';MESSAGES';][';thread_count';] > 10) { ?> .... template code that you';d like to use ..... <?php } ?>
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Hot Topics December 26, 2012 08:05PM |
Registered: 11 years ago Posts: 30 |
Re: Hot Topics December 27, 2012 03:28AM |
Admin Registered: 21 years ago Posts: 9,240 |
If you got an icon with the name hot-topic.png in the template's images folder ...
Also check the conditions below these lines thoroughly. They will probably overwrite your icon. You should define when this icon will appear - only if not new? always if the thread_count is higher ... ?
Thomas Seifert
Also check the conditions below these lines thoroughly. They will probably overwrite your icon. You should define when this icon will appear - only if not new? always if the thread_count is higher ... ?
Thomas Seifert
Re: Hot Topics December 27, 2012 06:44AM |
Registered: 11 years ago Posts: 30 |
Re: Hot Topics December 27, 2012 11:57AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Hot Topics December 27, 2012 12:45PM |
Registered: 11 years ago Posts: 30 |
tried many way still doesn't work.
here is all my template in list.tpl all icons wrok as well, only hot-icon doesn't work.
Language: PHP{ELSEIF MESSAGES->new} {VAR icon "new-replay"} {VAR title LANG->NewMessage} {VAR alt LANG->NewMessage} {ELSE} <?php if ($PHORUM[';TMP';][';MESSAGES';][';thread_count';] > 10) { ?> {VAR icon "hot-topic"} {VAR alt LANG->HotTopic} <?php } ?> {ELSE} {VAR icon "forum-icon"} {VAR title ""} {VAR alt ""} {/IF}
here is all my template in list.tpl all icons wrok as well, only hot-icon doesn't work.
Language: PHP{LOOP MESSAGES} {IF altclass ""} {VAR altclass "alt"} {ELSE} {VAR altclass ""} {/IF} {IF MESSAGES->sort PHORUM_SORT_STICKY} {IF MESSAGES->new} {VAR icon "new-replay"} {VAR alt LANG->NewMessage} {ELSE} {VAR icon "bell"} {VAR alt LANG->Sticky} {/IF} {VAR title LANG->Sticky} {ELSEIF MESSAGES->moved} {VAR icon "page_go"} {VAR title LANG->MovedSubject} {VAR alt LANG->MovedSubject} {ELSEIF MESSAGES->closed} {VAR icon "lock"} {VAR title LANG->ThreadCloseds} {VAR alt LANG->ThreadCloseds} {ELSEIF MESSAGES->new} {VAR icon "new-replay"} {VAR title LANG->NewMessage} {VAR alt LANG->NewMessage} {ELSE} {ELSEIF MESSAGES->new} {VAR icon "new-replay"} {VAR title LANG->NewMessage} {VAR alt LANG->NewMessage} {ELSE} <?php if ($PHORUM[';TMP';][';MESSAGES';][';thread_count';] > 10) { ?> {VAR icon "hot-topic"} {VAR alt LANG->HotTopic} <?php } ?> {ELSE} {VAR icon "forum-icon"} {VAR title ""} {VAR alt ""} {/IF {IF MESSAGES->new} {VAR newclass "message-new"} {ELSE} {VAR newclass ""} {/IF}
Sorry, only registered users may post in this forum.