Firefox PHP

Hot Topics

Posted by Toni 
Hot Topics
December 12, 2012 12:06PM
Hi,

Is there any mod or any edit files to show the hot topics with a small icon if the topic has more than 10 Replies.



Edited 2 time(s). Last edit at 12/25/2012 11:14PM by Toni.
Re: Hot Topics + Icon
December 25, 2012 11:12PM
there is no one?
Re: Hot Topics + Icon
December 26, 2012 03:39PM
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
Re: Hot Topics + Icon
December 26, 2012 04:28PM
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
You cannot use pure template language for this, but inside the messages loop in list.tpl, something like this should work:

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
is that correct?

Language: PHP
{LOOP MESSAGES} <?php if ($PHORUM[';TMP';][';MESSAGES';][';thread_count';] > 10) { ?> {VAR icon "hot-topic"} {VAR alt LANG->HotTopic} <?php } ?> {IF altclass ""} {VAR altclass "alt"} {ELSE} {VAR altclass ""} {/IF}
Re: Hot Topics
December 27, 2012 03:28AM
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
Re: Hot Topics
December 27, 2012 06:44AM
I tried many time doesn't work, already I have the icon in template's images folder, I only need icon be appear always if the thread_count is higher.
Re: Hot Topics
December 27, 2012 11:57AM
As I said above:
Quote

Also check the conditions below these lines thoroughly. They will probably overwrite your icon.

You will probably want to put the code in the else condition below that part.


Thomas Seifert
Re: Hot Topics
December 27, 2012 12:45PM
tried many way still 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.

Click here to login