MyBB Community Forums

Full Version: (SOLVED) Advanced Sideboxes - Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Just tried to install that new ADVANCED SIDEBOX (http://mods.mybb.com/view/advanced-sidebox) plugin and get an error when I tried to install & activate it in Plugins.

Quote:Fatal error: Cannot redeclare latest_threads_info() (previously declared in /www/htdocs/w00f6b94/web/board/inc/plugins/latest_threads.php(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code:49) in /www/htdocs/w00f6b94/web/board/inc/plugins/adv_sidebox/modules/latest_threads/adv_sidebox_module.php on line 28

Anyone know what the problem is ? Running latest 1.6.9 MyBB.

Any help is appreciated.

Wolfseye

UPDATE:
It seems it got installed, however when I try to got to the settings it looks like this.

http://i.imgur.com/2G7gM.jpg

Also, in the Plugin list, when I click on the link directly called PLUGIN SETTINGS it only works if your Admin folder is still standard.

http://i.imgur.com/ktFWq.jpg

http://i.imgur.com/AeChB.jpg

In my case, my folder has a
different name it still wants to go to the /admin folder and of course I get an error.

UPDATE:
Even trying to uninstall creates the error message posted above in the Quote.

Ok, found that line where it, instead of using the actual (if changed!) Admin Folder path, goes to the default Admin Folder path without adapting for a maybe different path.

Its in the adv_sidebox_install.php file on line 348.

		return "<a href=\"" . $mybb->settings['bburl'] . "/admin/index.php?module=config-settings&amp;action=change&amp;gid=" . $gid . "\" target=\"_blank\">" . $lang->adv_sidebox_plugin_settings . "</a>";

What would I need to change to make it go to the right path ? And I don't mean, like the line above does, goes to a named folder directly but checks with probably some variable to go to the admin folder path used in a forum. Is there a variable i can add and how would that be ?
(2012-12-31, 11:23 AM)Wolfseye Wrote: [ -> ]
Quote:Fatal error: Cannot redeclare latest_threads_info() (previously declared in /www/htdocs/w00f6b94/web/board/inc/plugins/latest_threads.php(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code:49) in /www/htdocs/w00f6b94/web/board/inc/plugins/adv_sidebox/modules/latest_threads/adv_sidebox_module.php on line 28

Anyone know what the problem is ? Running latest 1.6.9 MyBB.

It seems you already have a plugin named 'latest_threads.php' in your plugins directory. It is causing a conflict with the latest threads module in Advanced Sidebox.

I need to add a specific prefix to those function to prevent conflict so thanks a lot for pointing that out.

What you can do in the meantime is go to /inc/plugins/adv_sidebox/modules and delete the latest_threads directory completely.

This will eliminate the conflict that you are receiving errors for.

(2012-12-31, 11:23 AM)Wolfseye Wrote: [ -> ]UPDATE:
It seems it got installed, however when I try to got to the settings it looks like this.

http://i.imgur.com/2G7gM.jpg

Also, in the Plugin list, when I click on the link directly called PLUGIN SETTINGS it only works if your Admin folder is still standard.

In my case, my folder has a
different name it still wants to go to the /admin folder and of course I get an error.

Again, this is a result of my short-sightedness.

I will need to correct my code to look for the admin directory properly. I will do that today and get an update on GitHub as quickly as possible.

I apologize for the inconvenience.

(2012-12-31, 11:23 AM)Wolfseye Wrote: [ -> ]What would I need to change to make it go to the right path ? And I don't mean, like the line above does, goes to a named folder directly but checks with probably some variable to go to the admin folder path used in a forum. Is there a variable i can add and how would that be ?

I don't know how to tell you to fix it on your own.

If you can wait until I have had time to correct the code, I will assist you in getting it all straightened out.

Again, I apologize for the errors and will do my best to straighten it out ASAP.

Thanks for the feedback.

EDIT: It turned out to come down to one line.

In adv_sidebox_install.php, find the function adv_sidebox_build_settings_link()

replace this line

return "<a href=\"" . $mybb->settings['bburl'] . "/admin/index.php?module=config-settings&amp;action=change&amp;gid=" . $gid . "\" target=\"_blank\">" . $lang->adv_sidebox_plugin_settings . "</a>";

with this

return "<a href=\"index.php?module=config-settings&amp;action=change&amp;gid=" . $gid . "\" target=\"_blank\">" . $lang->adv_sidebox_plugin_settings . "</a>";

That solved it for me.

As for the other problems I will alter my function names and update the plugin ASAP.
I am glad i could help. Wink Let me know when you had a chance to fix the things. Wink Appreciate the help.

And i wish you a nice new years eve. Smile

Wolfseye
You would do better by linking to the admin directory with $config['admin_dir'] instead of admin.
The issues reported have been corrected and the plugin has been updated at the mod site and is awaiting validation.

The project ihas also been updated on GitHub and is currently available for download.

Wolfseye: You should download the package from GitHub, overwrite your existing files and then go to ACP and the errors should go away.

To be on the safe side, if all looks good, I would uninstall and reinstall Advanced Sidebox.

Please let me know how it goes.
Thank you for your quick fix. Now it works! Smile Wink However, with the setting "REPLACE PORTAL BOXES" it could be a bit better if you would make it possible to have the Portal Blocks replaced on both sides.

On my portal I have blocks on the left and the right. I made a few custom blocks, which I had to create templates for. Using the functions of your Plugin, how to simply add blocks, that would make it even easier to add new blocks. No need to create templates etc.

But as it is now, if I set it to replace portal blocks, they only show up on the right side, even if I set them to be on the left. If you could fix that somehow, that would be awesome. Wink

But anyways, this Plugin is great work. Thank you, m8. Wink

Wolfseye
(2012-12-31, 07:32 PM)Wolfseye Wrote: [ -> ]However, with the setting "REPLACE PORTAL BOXES" it could be a bit better if you would make it possible to have the Portal Blocks replaced on both sides.

This is an option that I never use and therefore when I updated to allow boxes on either side I just forgot about it Blush

I need to look at the best way to handle that.

Thanks again for the feedback it is extremely helpful. Smile
Thank you very much, will stay up to date on this subject here. Smile

Wolfseye
Hey Wildcard, how is it going ? Made it good into the new Year ? If you got some time, please remember that with the Portal Blocks on both sides please. Wink But of course all if you have time. Wink

Cheers m8

Wolfseye
I have already changed some things in the code for portal replacement sideboxes so that box sets (right and left) of portal boxes are displayed. I am having problems getting it to display properly.

If you create an issue at GitHub you will be able to track the progress of this enhancement.

Thanks for your interest.

Also, would you mind editing your review on the mods site to reflect that those issues were solved? As it stand it looks as if you are warning people not to use this plugin.

Perhaps I am taking it wrong, though.

Cheers,
Wildcard
Pages: 1 2 3