Firefox PHP

Module: HTML in Messages

Posted by Maurice Makaay 
Re: Module: HTML in Messages
April 18, 2010 11:42PM
nope.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: HTML in Messages
September 10, 2010 08:42PM
@Maurice:

I wanted to support HTML in messages only for a very narrow set of use cases, and since this module operates in an all-or-nothing mode, I added some enhancements to provide me (administrator) with the ability to control which users or groups have permission to use HTML code in messages. It has been working great for me and so I want to make it available here. The core of the module is still "HTML in Messages" so it doesn't make sense to me to create yet another module that does the same thing but only with optional permissions. So I have attached it here and feel free to use it as a next release for HTML in Messages. But if you would rather it be its own module, let me know and I'll release it that way.

In a nutshell:
The rules processing of my module is only enabled once the administrator goes into the module's admin settings and configures the permissions. Until then, it remains in the legacy mode of "everyone has permission". But once my version's rule processing is enabled, the new default permission is only administrators can enter HTML. Admins can choose to enable HTML for everyone, or for users with some additional optional conditions like moderators, members of groups, members of a group attached to the active forum, days since registration, and number of posts. One cool optional condition is tied to the User Tagging module (if it is present): conditions can be defined that say a user must be tagged by designated user tagging rules in order to be allowed to enter HTML.

So basically, rather than a forum-centered enabling/disabling of HTML, I took the route of a user/group permission scheme, which might be a little more complicated, but allows admins to control which forums get HTML-ified by configuring groups and user-group memberships, or by tagging users. I would discourage "anyone" permissions for HTML, although that is an option in my version.

On the presentation side, I hooked into posting_custom_action and process the conditions for posting HTML, and store an authorization flag true or false in the message meta structure which is now checked in the existing format hook: if the authorization is false, the HTML is not restored. If the authorization flag is not present (legacy messages pre-dating my version) then the format hook proceeds just like it did before, so my version is backwards compatible with legacy messages. As I typed that it just occurred to me that I didn't account for users editing their legacy messages though...

Anyway, here it is....
Attachments:
open | download - html.proposed.3.0.zip (250.9 KB)
Re: Module: HTML in Messages
September 20, 2010 07:57PM
Hi,
I have updated our group with "html.proposed.3.0.zip" and it is working fine. Thanks for this excellent module.
Regards,
Sreenadh
Re: Module: HTML in Messages
September 20, 2010 11:01PM
Phil, I overlooked this message in the list. Thanks for the updates that you did. They surely sound useful to me and I am very willing to incorporate those into the repository for this module.

The legacy messages don't sound like an issue to me. Apparently, those users weren't meant to use HTML in the first place. The same "issue" would occur when downtuning the permissions after a while.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: HTML in Messages
September 21, 2010 09:34PM
Hi,
This module seems to be so powerful and friendly that I am wondering, how can I start using some WYSIWYG Editor along with it. Is it possible? How can I do it? (May be this is a wrong place to post such a query or may be the right place.) With this module the fear of ill-formed html would be gone, and with a WYSIWYG HTML Editor editing will also become easy and clutter free!
Regards,
Sreenadh
Re: Module: HTML in Messages
September 21, 2010 09:39PM
Use the search: [www.phorum.org]

And yes, thats the wrong place.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: HTML in Messages
October 13, 2010 04:06PM
My Phorum version is 5.2.15a
I have the modules:
HTML in Messages (version 2.0.0)
BBcode Video (version 1.0.10)
BBcode Flash (version 1.0.0)
BBcode (version 2.0.10

If I copy this html codes (from this page : [www.26in.fr] ), it doesn't work :

<div style="font-size:80%; text-align : center;">
<object width="649" height="405">
<param name="movie" value="[www.zapiks.fr];
<param name="wmode" value="transparent"></param>
<param name="allowfullscreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="[www.zapiks.fr]; type="application/x-shockwave-flash" wmode="transparent" width="649" height="405" allowfullscreen="true" allowscriptaccess="always" ></embed>
</object><br /><!-- Merci de soutenir notre projet en laissant ce petit lien! --><a href="[www.26in.fr]; title="BZH Cup : St Gou&eacute;no">BZH Cup : St Gou&eacute;no</a></div>
Re: Module: HTML in Messages
December 28, 2010 07:23PM
hey there guys,
so I finally got around to upgrading to 3.0 but I keep getting this error

Warning: Directory /tmp/html_purifier not writable, please chmod to 777 in /xxx/xxx/iloveqatar.net/forum/mods/html/htmlpurifier-4.0.0-standalone/HTMLPurifier.standalone.php on line 11159

I'm probably being thick, but the read-me didn't say much about changing permissions and I tried changing everything in the folder to 777 but no luck.
Re: Module: HTML in Messages
December 28, 2010 09:20PM
The error specifically complains about the directory /tmp/html_purifier not being writable. Looking at the HTML purifier code, it seems you can get this message in case /tmp/html_purifier does exist, but isn't writable for the web user.

Are there other websites running on the same server and using this module in Phorum? What could be the case, is that some other server already created the directory using a different user, making it inaccessible for your site's user (just a big guess) If this is the case, then you could change the cache directory path for your Phorum install to a different directory to prevent the collision.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: HTML in Messages
December 29, 2010 12:41PM
Hi there,
It's a shared server on dreamhost, so it could be. I wouldn't be able to change that though. I went into my own root and don't have a /tmp folder

Is there any way around this? This is the only mod that doesn't work after the I updated everything to the latest versions.
Sorry, only registered users may post in this forum.

Click here to login