Firefox PHP

Phorum 5.2.18 - Question about 'edit_author' feature

Posted by OWHorus 
Phorum 5.2.18 - Question about 'edit_author' feature
October 12, 2011 12:06PM
Hello,

I hope this is the right place to ask this:

I am working on Phorum 5.2.18 to newly integrate in our web site. We need the feature, that registered users (only registered user can post) can change their author field and post under any name they wish on certain forums (We are a MMORPG community).

I am aware, that there is a mod 'namedposting', which enables this. But I tried to look a bit deeper and do my own mod, to understand Phorum better and because I always like to understand whats going on...

So - I looked and found several places where the option 'edit_author' is queried, and I found the place to switch it on. The module 'namedposting' does it completely different (by storing the edited author name in the meta data of the message).

I made a quick try, edited posting.php (I will not leave it this way, only wanted to try it out), and found that not only I could edit the poster name freely, it also was stored by Phorum, and seems to be permanent, even when I undo the change mentioned above and disallow editing poster fields again.

So it seems to me, you provided an elegant solution to the problem, and the mod 'namedposting' is a bit obsolete, but it works and does several other things. I only need the poster names feature, not the rest this mod offers, so I will not use it. (Thanks to the author anyway, because looking at his code helped me to understand several things).

Yet - your changes are undocumented (yet?) - except comments in the code - and I am unsure if a can use it. I want to be sure that the feature will not go away. I still will need a mod to enable the name editing feature only for certain forums, because we will need this feature only on special forums. If I use this (probably new) feature, will Phorum retain the changed poster names, or do I need to store them in meta data for each message anyway?

I would be grateful for any hints - to enable the internal feature I only changed one value in posting.php, line 163:
"author" => array("string", false, true, false, ''), // true to false

Thank you

OWHorus
Re: Phorum 5.2.18 - Question about 'edit_author' feature
October 12, 2011 01:32PM
The edit_author parameter is a permission setting that actually was designed with this kind of feature in mind. The default situation is to not allow editing the field in the posting editor, but by enabling the permission, it is indeed possible to edit the author name. The whole POST processing of the posting code is already aware of the setting and will act according to the permission value.

We have no intentions on disabling the feature. It is not publicly advertised through documentation or so, but it should be considered one of those hidden gems in the Phorum core. Search well and you might find even more of those ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Phorum 5.2.18 - Question about 'edit_author' feature
October 12, 2011 01:58PM
Hello,

and thank you for the fast answer - will go now gem searching :-)

OWHorus
Sorry, only registered users may post in this forum.

Click here to login