Adding Editor Tools to signatures

Posted by Phil Connolly 
Adding Editor Tools to signatures
January 27, 2010 02:05PM
Here is a hack to add Editor Tools support to signatures:

1. Add this line to /mods/editor_tools/info.txt

hook: cc_panel|phorum_mod_editor_tools_cc_panel

2. Add this function to /mods/editor_tools/editor_tools.php

[code="php"]
/**
* Flags that there is an editor available to the Control Center Signature panel.
*/
function phorum_mod_editor_tools_cc_panel($data)
{
if (isset($data["panel"]) && $data["panel"] == PHORUM_CC_SIGNATURE)
$GLOBALS["PHORUM"]["MOD_EDITOR_TOOLS"]["DO_TOOLS"] = true;

return $data;
}
[/code]

The DO_TOOLS flag tells Editor Tools to go ahead and inject the necessary javascript onto the signature panel page. Phorum's stock signature handling will do the rest.

-phil.
Re: Adding Editor Tools to signatures
September 21, 2010 08:50AM
Hi,
I have tried this hack, but it is not working for me. Can you please help.
Regards,
Sreenadh
Re: Adding Editor Tools to signatures
September 21, 2010 08:57AM
After adding the hook to the info.txt, did you go to the admin.php interface? The hooks are cached and the cache needs to be rebuilt when a new hook is added to a module.

The recent version of Phorum will automatically start the caching when needed in your admin.php interface. For older version, you have to go to the Modules section and click on "Save Settings" to rebuild the cache.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Adding Editor Tools to signatures
September 21, 2010 02:22PM
Dear Maurice Makaay,
You are right! Now it is working! Thanks for guidance.
Quote

The recent version of Phorum will automatically start the caching when needed in your admin.php interface. For older version, you have to go to the Modules section and click on "Save Settings" to rebuild the cache.
But I am using the latest version 5.2.15a, but still it didn't appeared for me at that time.Any way now it is coming and I am happy and thankful. :)
Regards,
Sreenadh
Re: Adding Editor Tools to signatures
September 21, 2010 02:58PM
"when needed in your admin.php interface", so you need to go there to trigger the automatic reloading. That's probably the thing that you did not do. When you are just browsing the front end, it won't detect the updated module info.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Adding Editor Tools to signatures
September 21, 2010 03:23PM
Thanks.
Sorry, only registered users may post in this forum.

Click here to login