HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Customize plugin view
phalc0nline
New
Hi!
Please give link for topic or code example how to change correctly plugin view?
Tagged:
0
Comments
Welcome to the community!
Are you looking to override a current plugin's view, or are you creating a plugin and you want to know how to create a custom view?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I'm looking for how override a current plugins view. I know what I can change plugin view in /plugins/pluginName, but it's wrong way. Can you give me an advice?
Overriding a plugins view is not possible in most cases. There are different ways a view is fetched but one common way is to specify the path to the file. In such cases you wouldn't be simply able to change anything without changing the plugins source.
Although I'm quite sure @hgtonight knows a magic trick to achieve it nevertheless... (maybe by implementing your own
FetchViewLocation
)I'd advice you to either make a better suggestion to the plugin author if you have an improvement or to copy the plugin from folder "OldPluginName" to "OldPluginNamePlus" "OldPluginNameMine" or "OldPluginName2" or "NewPluginName" or whatever.
Do a case sensitive search for "OldPluginName", "oldpluginname" and maybe also "oldPluginName" and replace them with the corresponding "NewPluginName", "newpluginname", "newPluginName". Rename all files regarding to the name change. Change the description and give credit to the original plugin and that's it.
But if you tell us what plugin you are talking about you can be sure to get more detailed advice.
plugin name "Online Now".
Online now does not use a view for it's module. Modules should use views if possible.
You will have to fork and edit it how you want. You need to edit the
OnlineNowModule::ToString()
method. You can find it in/plugins/OnlineNow/class.onlinenowmodule.php
.Unless @R_J can come up with some novel idea.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Many of my plugins allow this, if you are contributing back to a plugin this is typically the code that I use.
so under theme the override would be
views/plugins/PluginName/viewname.php
use
grep is your friend.