Adding Editor Tools to signatures
Posted by Phil Connolly
|
Adding Editor Tools to signatures January 27, 2010 02:05PM |
Registered: 17 years ago Posts: 115 |
Here is a hack to add Editor Tools support to signatures:
1. Add this line to /mods/editor_tools/info.txt
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.
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 |
Registered: 17 years ago Posts: 81 |
|
Re: Adding Editor Tools to signatures September 21, 2010 08:57AM |
Admin Registered: 22 years ago Posts: 8,532 |
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
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 |
Registered: 17 years ago Posts: 81 |
Dear Maurice Makaay,
You are right! Now it is working! Thanks for guidance.
Regards,
Sreenadh
You are right! Now it is working! Thanks for guidance.
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. :)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.
Regards,
Sreenadh
|
Re: Adding Editor Tools to signatures September 21, 2010 02:58PM |
Admin Registered: 22 years ago Posts: 8,532 |
"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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Adding Editor Tools to signatures September 21, 2010 03:23PM |
Registered: 17 years ago Posts: 81 |
Sorry, only registered users may post in this forum.