Firefox PHP

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/22/2006 Read message
empty_bodies-1.0.3.zip 4.7 KB open | download Maurice Makaay 08/22/2006 Read message
empty-bodies (n/t) - module
March 27, 2005 03:36PM
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
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting




Edited 3 time(s). Last edit at 04/06/2006 01:49PM by mmakaay.
Attachments:
open | download - empty_bodies.zip (818 bytes)
Re: empty-bodies (n/t) - module
March 28, 2005 01:18AM
Awesome .. it worked great ..

At first it didn't work but I forgot I had a custom post_form.tpl then when I tried the phorum default post_form.tpl it worked great!

I'll need to go edit my post_form.tpl now 8-)

Thank you for making this mod!

Bill
Re: empty-bodies (n/t) - module
March 30, 2005 07:25PM
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
Re: empty-bodies (n/t) - module
April 01, 2005 03:22AM
I been trying to firgue out if it was possible to edit the read_thread.tpl and get the NT to show up in the thread subject line but having no luck .


Is there a way to do it ? anyone know?

Thank you

Bill
Re: empty-bodies (n/t) - module
April 01, 2005 09:11AM
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
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: empty-bodies (n/t) - module
April 01, 2005 08:15PM
That works great ,,,

Thank you!

Bill
edp
Re: empty-bodies (n/t) - module
May 18, 2005 03:55PM
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


Re: empty-bodies (n/t) - module
May 18, 2005 04:49PM
depends on where you want the n/t being shown.
I.e. you can put this here
<div class="PhorumReadBodySubject">{MESSAGE->subject}</div>

right before the closing </div>


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
edp
I'll have to retry that...
May 18, 2005 09:39PM
I swore I did that, only to get a parsing error... I will try again tonight. Thanks.
Re: I'll have to retry that...
May 18, 2005 09:45PM
if you get it again, just post the line you inserted there.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Sorry, only registered users may post in this forum.

Click here to login