Firefox PHP

Message icons module

Posted by Maurice Makaay 
Re: Message icons module
September 02, 2006 05:15AM
Hello,

how can use this module only in list page and not in read page?

thanks
Re: Message icons module
September 02, 2006 06:50AM
actually I wanted to do the same thing but didn't get it. so I took it's system and hacked it into my template on the list page. although I think maurice might want to hit me for that ;)

so that's a solution though maybe not a good one

greets,

net.
Re: Message icons module
September 02, 2006 08:38AM
I won't hit you for that ;-) In fact, the new default template for Phorum 5.2 has icons in the template as well. I only wrote this module, because the default 5.1 template did not have this feature.

To make this module only format the list page, you can add the following code to the start of the module functions:
function whatever_function($argument)
{
    if (phorum_page != "list") return $argument;

    ...original function code...
}
If the function has no $argument, you can simply use return;


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Message icons module
September 04, 2006 05:04AM
Quote
mmakaay
I only wrote this module, because the default 5.1 template did not have this feature.

In fact, i use the default 5.1.15 template and was interested (only in list page) to this module for icons of "thread closed" and "thread moved"...


Quote
mmakaay
To make this module only format the list page, you can add the following code to the start of the module functions:
function whatever_function($argument)
{
    if (phorum_page != "list") return $argument;

    ...original function code...
}
If the function has no $argument, you can simply use return;

Thanks... your solution works perfectly!!
Re: Message icons module
September 10, 2006 06:41PM
Hi Maurice,

great mod, thank you! But I don't understand, why the style to hide the subject prefix is located in the body section. This is not allowed, the style tag must be located in the head section.

Eisenherz
Re: Message icons module
September 10, 2006 06:56PM
Only if you get itchy when running this through a validator :-) It's not allowed, but very convenient and I don't really know of browsers that ignore style tags outside the header.

For a couple of other mods, I found a way to add the style to the header (by abusing the {HEAD_TAGS} template variable). I'll make a note to change this module too on the next update. In the meanwhile, you could take the style out of the body and put it in the css.tpl.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
edp
Hello mmakaay. I good example of how useful the icons are....
October 09, 2006 08:39AM
can be seen at warriorsworld.net I believe they have flags in the db for each message that is set upon creation if it has any image or url links, so the search is quick and doesn't require searching thru the body every time. They also have a flag for no content in the body, but that style forum is one that can often NOt have body messages since the subject line is often the tool for communication only. I was trying to get this kind of functionality in phorum a few years ago when I was using it. phorum is MUCH better coded, and I'm eager to see it get closer to that example for the benefits that can be seen. Unfortunately that code (kawf) is hideous and barely supported (which is why I'm eager to move into phorum again, but the interface is really great.

I think this module will be a great thing for me to look at...
Re: Hello mmakaay. I good example of how useful the icons are....
October 09, 2006 09:16AM
Also look at the empty bodies module then. That one implements the empty body behaviour that you described.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Message icons module
September 05, 2007 01:10AM
I like this mod, but how can I alter it so that the parent thread has the regular message icon, and all the child posts have a different icon of my choice?

Better yet, how could I have a host of images such as...

Sticky
Announcement
Moved
Closed
Parent Message
Unread Parent Message
Reply
Unread Reply

The unread portions would be a plus, but would be unnecessary if my board would put that little "new" image next to new posts like it does here.

- Bob



Edited 1 time(s). Last edit at 09/05/2007 01:15AM by Dismal_Bliss.
Re: Message icons module
September 05, 2007 01:40AM
One way to do that is editing the templates. In the upcoming Phorum 5.2 release we have put this functionality in the "emerald" template. Maybe you could download the dev release and take a look at the template files to gain some inspiration?

The other way would be to change this module's code to implement more icons. There's no easy option in the current version that enables the things that you want. For Phorum 5.2, I will do a rewrite of this module. I'll keep these wishes of yours in mind for it.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login