HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How might I conditionally add a module in my plugin?
ddumont
✭✭
I don't want it added in the dashboard... My dashboard is getting a bit cluttered already.
There was an error rendering this rich post.
0
Best Answer
-
peregrine MVP
i've got no thoughts on other way. what you said.
if (!preg_match('/dashboard/',$Sender->SelfUrl)) $Sender->AddModule("SubscribeModule");
get the buttonbar back - it was much easier to paste code.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
1
This discussion has been closed.
Answers
Wow, it's a good question, but also I need a bit of more information. Can you write out the conditions in semi-code? Also in which events to you want to add those modules? I was more thinking 'Smarty' then 'plugin' with your title, if you know what I mean.
There was an error rendering this rich post.
If that makes any sense. I have a plugin, and it's placing a module in this way, so I'm looking for a condition to wrap it in. If you have a better way of doing it, I'm all ears.
There was an error rendering this rich post.
Looks good to me, I don't know my way around plugins yet though. Maybe @Peregrine and @x00 know more to say about this one.
There was an error rendering this rich post.
i've got no thoughts on other way. what you said.
get the buttonbar back - it was much easier to paste code.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks @peregrine, the SelfUrl was exactly what I was looking for.
There was an error rendering this rich post.
glad I could help someone who could code circles around me .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
As an FYI, in 2.1 we have an InSection() function which will allow you to call:
oh, nice.
There was an error rendering this rich post.
@Todd, are you nearing a 2.1 beta or rc build? Or are you teasing me?
There was an error rendering this rich post.
We are nearing a 2.1 beta, but probably still a month or so away.
Hehe, cool. I'm looking forward to it.
There was an error rendering this rich post.
you must be special to get the answer on that one.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine I guess
I try to help out where I can, though php is not my favorite and I don't know it that well.
(If the nilla folks are ever interested in doing a java port with OSGi plugins and stuff... I would totally be a huge contributor to that. I really think it could solve a ton of the problems with translations and stuff)
le sigh... Maybe @Todd just think's my bird is cute (he's not wrong)
There was an error rendering this rich post.
Alright, alright. Thread closed. Move along.