Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[Solved] Extension tab not showing
This is a problem I can’t wrap my head around :
let’s say I write a plugin. It stays inside the plugin folder. Not compiled and saved to the DB yet.
Let’s say this plugin have an extension tab. Everything works fine as long as my plugin stays inside its folder.
As soon as this plugin is
1. compiled and uploaded to the DB
2. and removed from the plugin folder
3. and activated,
no more entry in the extension tab. And if I access the page through the direct url, I get a "get off my lawn"
message.
This is the kind of code I use :
class MyPlugin
{
public function __construct()
{
if (txpinterface == 'admin')
{
add_privs('abc_my_plugin', '1,2,3');
register_tab('extensions', 'abc_my_plugin', 'My plugin');
register_callback([$this, 'my_plugin_function'], 'abc_my_plugin');
}
}
// stuff here ..
}
new MyPlugin();
what do I do wrong ? This is driving me crazy. Would gladly use some help :)
Offline
Re: [Solved] Extension tab not showing
Long shot: have you set the appropriate plugin type? Has to be 1 or 3+ for admin-side plugins.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: [Solved] Extension tab not showing
Very short indeed \0/ That was it.
Sometimes you need to read the fineprint in the template …
Thanks a lot
Offline