empty-bodies (n/t) - module
Posted by Thomas Seifert
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
empty_bodies.zip | 818 bytes | open | download | Thomas Seifert | 03/27/2005 | Read message |
empty_bodies-1.0.3.tar.gz | 2.8 KB | open | download | Maurice Makaay | 08/21/2006 | Read message |
empty_bodies-1.0.3.zip | 4.7 KB | open | download | Maurice Makaay | 08/21/2006 | Read message |
empty-bodies (n/t) - module March 27, 2005 08:36AM |
Admin Registered: 22 years ago Posts: 9,240 |
There were a couple of requests for allowing empty bodies for messages and (some others) for showing some img or message in the list if its a n/t message.
So here it is, a *simple* module which achieves just that:
- if an empty message-body is submitted on posting or editing a message it puts "n/t" in the message to trick phorum to accept the message :)
- also it does put $message['meta']['mod_empty_bodies']['body_empty']=1 so this value can be checked in the template for list-view or read-view and adding some message or image there.
you can check for this in the template with something like that:
{IF ROWS->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
(example in list_threads.tpl to add something to the subject there).
feel free to use, modify, delete or just ignore it :).
The most recent version of the module for Phorum 5.1.x can be found in this message.
Thomas Seifert
Edited 3 time(s). Last edit at 04/06/2006 07:49AM by mmakaay.
So here it is, a *simple* module which achieves just that:
- if an empty message-body is submitted on posting or editing a message it puts "n/t" in the message to trick phorum to accept the message :)
- also it does put $message['meta']['mod_empty_bodies']['body_empty']=1 so this value can be checked in the template for list-view or read-view and adding some message or image there.
you can check for this in the template with something like that:
{IF ROWS->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
(example in list_threads.tpl to add something to the subject there).
feel free to use, modify, delete or just ignore it :).
The most recent version of the module for Phorum 5.1.x can be found in this message.
Thomas Seifert
Edited 3 time(s). Last edit at 04/06/2006 07:49AM by mmakaay.
Re: empty-bodies (n/t) - module March 27, 2005 06:18PM |
Registered: 19 years ago Posts: 609 |
Re: empty-bodies (n/t) - module March 30, 2005 12:25PM |
Registered: 19 years ago Posts: 609 |
Module works great ,,
but just have one quesiton ..
Is there a check string that I can use in read_thread.tpl template?
I would like to have the n/t show up on the threaded subject(s) in the read_thread.tpl and the
{IF ROWS->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
does nothing in there .. so was wondering if there a way around it ..
But it works in list.tpl and list_thread.tpl template just fine .. no problems at all ..
Thank you for the great module 8-)
Bill
but just have one quesiton ..
Is there a check string that I can use in read_thread.tpl template?
I would like to have the n/t show up on the threaded subject(s) in the read_thread.tpl and the
{IF ROWS->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
does nothing in there .. so was wondering if there a way around it ..
But it works in list.tpl and list_thread.tpl template just fine .. no problems at all ..
Thank you for the great module 8-)
Bill
Re: empty-bodies (n/t) - module March 31, 2005 08:22PM |
Registered: 19 years ago Posts: 609 |
Re: empty-bodies (n/t) - module April 01, 2005 02:11AM |
Admin Registered: 22 years ago Posts: 9,240 |
read_threads.tpl:
there are two parts. the first one where it shows the current message, there you need to use
{IF MESSAGE->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
and the second part where only the subjects of the other replies are shown:
{IF MESSAGES->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
just look which other variables are used there ;)
read.tpl:
{IF MESSAGES->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
Thomas Seifert
there are two parts. the first one where it shows the current message, there you need to use
{IF MESSAGE->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
and the second part where only the subjects of the other replies are shown:
{IF MESSAGES->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
just look which other variables are used there ;)
read.tpl:
{IF MESSAGES->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
Thomas Seifert
Re: empty-bodies (n/t) - module April 01, 2005 01:15PM |
Registered: 19 years ago Posts: 609 |
Re: empty-bodies (n/t) - module May 18, 2005 09:55AM |
Registered: 20 years ago Posts: 44 |
I managed to get partial success in modifying read_threads.tpl to show the n/t status, but the CURRENT thread I can't seem to get right. I see your code snippet to be:
{IF MESSAGE->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
But I do not know where/how to fit this in - can you show me the code inserted with the above an dbelow code from the default read_threads.tpl? I'd appreciate it greatly.
ts77 Wrote:
-------------------------------------------------------
> read_threads.tpl:
> there are two parts. the first one where it shows
> the current message, there you need to use
> {IF
> MESSAGE->meta->mod_empty_bodies->body_emp
> ty}<strong>n/t</strong>{/IF}
> and the second part where only the subjects of the
> other replies are shown:
> {IF
> MESSAGES->meta->mod_empty_bodies->body_em
> pty}<strong>n/t</strong>{/IF}
>
> just look which other variables are used there ;)
>
> read.tpl:
> {IF
> MESSAGES->meta->mod_empty_bodies->body_em
> pty}<strong>n/t</strong>{/IF}
>
>
>
>
> --
> Thomas Seifert
> Phorum Development Team
{IF MESSAGE->meta->mod_empty_bodies->body_empty}<strong>n/t</strong>{/IF}
But I do not know where/how to fit this in - can you show me the code inserted with the above an dbelow code from the default read_threads.tpl? I'd appreciate it greatly.
ts77 Wrote:
-------------------------------------------------------
> read_threads.tpl:
> there are two parts. the first one where it shows
> the current message, there you need to use
> {IF
> MESSAGE->meta->mod_empty_bodies->body_emp
> ty}<strong>n/t</strong>{/IF}
> and the second part where only the subjects of the
> other replies are shown:
> {IF
> MESSAGES->meta->mod_empty_bodies->body_em
> pty}<strong>n/t</strong>{/IF}
>
> just look which other variables are used there ;)
>
> read.tpl:
> {IF
> MESSAGES->meta->mod_empty_bodies->body_em
> pty}<strong>n/t</strong>{/IF}
>
>
>
>
> --
> Thomas Seifert
> Phorum Development Team
Re: empty-bodies (n/t) - module May 18, 2005 10:49AM |
Admin Registered: 22 years ago Posts: 9,240 |
I'll have to retry that... May 18, 2005 03:39PM |
Registered: 20 years ago Posts: 44 |
Re: I'll have to retry that... May 18, 2005 03:45PM |
Admin Registered: 22 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.