Message icons module
Posted by Maurice Makaay
Re: Message icons module September 02, 2006 05:15AM |
Registered: 16 years ago Posts: 2 |
Re: Message icons module September 02, 2006 06:50AM |
Registered: 16 years ago Posts: 35 |
September 02, 2006 08:38AM |
Admin Registered: 18 years ago Posts: 8,532 |
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:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
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



Re: Message icons module September 04, 2006 05:04AM |
Registered: 16 years ago Posts: 2 |
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 |
Registered: 16 years ago Posts: 9 |
September 10, 2006 06:56PM |
Admin Registered: 18 years ago Posts: 8,532 |
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
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



Hello mmakaay. I good example of how useful the icons are.... October 09, 2006 08:39AM |
Registered: 18 years ago Posts: 44 |
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...
I think this module will be a great thing for me to look at...
October 09, 2006 09:16AM |
Admin Registered: 18 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team



September 05, 2007 01:10AM |
Registered: 15 years ago Posts: 533 |
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.
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.
September 05, 2007 01:40AM |
Admin Registered: 18 years ago Posts: 8,532 |
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
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



Sorry, only registered users may post in this forum.