Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Copyright not showing on mobile theme when user signs out.
Prosper
✭✭
The plugin "Copyright" does not show up on mobile theme after user signs out. It only shows when user is signed in the forum. Please why is it like that and is there a way to make the plugin (Copyright) show when user signs out from forum?
Tagged:
0
Comments
Hiya!
You need to add
'MobileFriendly' => TRUE,
to the plugin info array.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.
@hgtonight has the correct answer to your question..
however @prosper
Since you now know how to modify tpl files the other option you have that is theme based is just to directly add the copyright via the tpl in the footer.
similar to the way you changed things here.
minuses of plugin
then you can avoid the extra js overhead, minor as it may be.
advantages of plugin
http://vanillaforums.org/discussion/27818/how-can-i-remove-vanilla-forum-footer-image-on-version-2-1-1
e.g. in tpl of mobile
tpl of of the non mobile theme
then you can style with custom.css based on class PoweredByProsper
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 for helping guys, however this plugin sends the copyright mark after the foot. It is not in the footer, it is appended to the body.
The reason for this is to not have to use the footer for this so other things can go in the footer like footbox plugin.
This plugin adds an extra div after the Foot. Please give me a link so I can see what is going on.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I have found out why copyright information failed to show on mobile theme discussion list/pages. Another addon "Infinite Scroll 1.3.1" by @Bleistivt was the cause. "Infinite Scroll 1.3.1" also disrupted two other plugins ("Button Bar" and "imageupload") on mobile theme.
Please @Bleistivt could you update "infinite scroll" to work well with other plugins? Thank you.
InfiniteScroll doesn't enable on mobile devices as it is not mobile friendly.
But if it is a problem on desktop too, I will look into it.
Could you open a thread under my plugin and explain the error or attach a screenshot?
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
As I look at infinitescroll plugin, I do not see code which disables the loading of the js and css file for the plugin on mobile.
Maybe add
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
If
MobileFriendly
is not set in the plugin array (or set to FALSE), that plugin is not loaded when Vanilla detects a mobile device.No need to add your own checks.
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.
That may be in theory but I had to add it to a couple of plugins because even though mobilefreindly true was not set , it loaded. And even using mobilefriendly false it loaded.
So I added that to make sure it would not load.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder @hgtonight @Bleistivt
I'm gonna have to place my hat in the ring with @vrijvlinder on this one.
/infinitescroll.js does indeed get loaded in mobile theme.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I just found out that the call to remove the unfriendly plugins is in a themehook for the mobile theme.
Good catch.
I would highly suggest you add this to your mobile themehooks file:
This is from the default mobile theme.
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.
that is... weird.
@vrijvlinder Great find!
this should happen somewhere here
https://github.com/vanilla/vanilla/blob/master/library/core/class.pluginmanager.php#L463-L471
My first suspicion is that it is this line:
I have chosen to omit "plugin" from the classname, that could be the cause.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
yes... @Bleistivt
class InfiniteScrollPlugin extends Gdn_Plugin {
works
class InfiniteScroll extends Gdn_Plugin {
doesn't work
I think you've go it solved.
good catch finding initial issue @prosper
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes , @peregrine did you test that on the default mobile theme as I think you did ?
I don't think it should matter is it's class.infinitescroll.plugin.php or default.php if that is what you mean.
From what I get from the plugin manager code is it already checks to see if there is a class name or if it is default. But I could be off on a tangent....
The thing is that even with that in the themehooks of the mobile theme, the MobileFriendly false in a plugin does not work always. I would almost go to say it is a bug.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@peregrine thanks, I was just about to test it myself. Giving back the speedy badge.
Can confirm, it still enables on the default mobile theme.
Could be either a bug or the need for stricter naming conventions for plugins
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
yes.
its the name that is used on the extends line within the file.
(not the file name - that is insignificant as far as mobile theme hooks goes).
meaning
class InfiniteScrollPlugin extends Gdn_Plugin {
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Oh good catch @peregrine that part totally got past me as a possibility , I was looking for what gets loaded when, however all my plugins have that and we still run into the issue.
The only way for me to make sure and not depend on themes or hooks is to declare it from the Base render since that definitely works for me using any mobile theme.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
which plugins are you sure have issues without testing for mobile.
the only reason to test individually within plugin, is if it is mobile friendly.
if mobile friendly is false and the class name extends has a class (with Plugin in the name) thenamePlugin extends Gdn_Plugin, it seems that the themehooks should remove the plugin.
so it would be interesting to know which plugins fail to pass muster in the theory which may now be a hypothesis.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
What I would like to know is where does it check for the Value of MobileFriendly. If it does not say MobileFriendly at all it gets removed in theory correct? Based on the plugin manager file.
If it says MobileFriendly False nothing happens. In some cases even mobilefriendly true does not work either.
I don't think it should be left up to the themehooks of a theme to remove the plugins. I think the plugin should dictate if it is or not friendly and specify it. And the manager should remove it based on the value true or false of mobilefriendlyness.
Otherwise the function is useless if a theme does not specify to remove them.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Right now, a plugin is only removed if:
"MobileFriendly" => true
AND
Gdn::PluginManager()->RemoveMobileUnfriendlyPlugins();
AND
The second one is debatable, but I'd say the last one is a bug.
I have seen many plugins that don't have classnames ending with "Plugin", there are even 2 in the official addons repo (Vanoogle and CssThemes)
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I am liable to agree.
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.