Firefox PHP

Formatable signature

Posted by Mensler 
Re: Formatable signature
November 03, 2004 06:01AM
ts77 Wrote:
-------------------------------------------------------
> thats too much of a hack to be included.
> there will be some kind of formatable signature in
> 5.1, but I can't tell *now* how that will be done.
>
Cool, as long as it can be formatable I am happy. Doesnt need to be fancy as long as one can see thats its a signature. A simple line above the signature is more then sufficient for my standards.

Thnx




Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: Formatable signature
December 09, 2004 10:14AM
This can be done by a module, not a hack. Use hooks 'read_user_info' to wrap signatures into some tags and 'format' to replace the tags with HTML.

One might also look if the tag is already in the body and make temporary tags randomly, ensuring that the tag will not mess with the content.

I am doing the module right now, so it will probably be posted in a week or two, whenever I beat down my laziness... I surely must take some night-long programming sessions with Bjork on headphones.

When will 5.1 be ready, anyway? Some work of mine will be void by then.
Re: Formatable signature
December 09, 2004 10:22AM
Great, could you do me the favour of letting me know when its done?

Thnx in advance

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: Formatable signature
December 09, 2004 11:05AM
Basic replacement is very simple, you can roll your own if you are familiar with PHP a bit.
Re: Formatable signature
December 09, 2004 11:18AM
One note:

My module is called 'sign' and functions are 'mod_sign_users' and 'mod_sign_format'. It is not working.

The same with 'signature' instead of 'sign'.

They are not executed at all.

If I name functions mod_signformat_* for example, all works well, no matter what the module (directory) name is.

example mod and mod_example_* work fine.

I tried several times. mod_a_b works, mod_signature_b does not.

Why???
Re: Formatable signature
December 09, 2004 12:55PM
it will work if everything is done correctly.
i.e. directory-name and php-filename, info-file and similar. there are no reserved words.
5.1 will be ready when its done. not today, not next week.


Thomas Seifert
Re: Formatable signature
December 10, 2004 09:26AM
The module is ready, but I'll upload it later if not again forget it at home.

Checking message bodies for the mark is not possible, there's no suitable hook. It works quite fine anyway, so let it be.

ts, I am sure. I checked again with the final module. mod_signformat works fine. I rename the dir and the main file, do s/signformat/sign/g in settings.php, sign.php and info.txt, enable it in admin and update the settings. It does not work.

You can try yourself.

As far as I understood creating_mods.txt, function names do not matter. If the module is called 'abba', functions can be called 'beatles' and 'zztop'. The file must be abba.php and functions must be in info.txt. And it seems that functions mod_sign_* do not work whatever dir/file names are.

Though it should be stated in the docs that for example mod_* names are solely for mods and will not be cluttered by main the phorum code.

'When done' - I'm familiar with it, I keep waiting for Debian Sarge.
Re: Formatable signature
December 10, 2004 02:56PM
Looking forward testing it. Let me know when you upload it.

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: Formatable signature
December 14, 2004 09:08AM
Here it is.

(see link below)



Edited 1 time(s). Last edit at 12/14/2004 12:35PM by kAtremer.
Re: Formatable signature
December 14, 2004 09:16AM
[phorum.org]



Edited 1 time(s). Last edit at 12/14/2004 12:35PM by kAtremer.
Sorry, only registered users may post in this forum.

Click here to login