MyBB Community Forums

Full Version: Adding a Downloads Section
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello.
I am on rc4 and I am istalling the Downloads Section option.

Installing info say:
Run the dbupdate.php and templateinstall.php I've done that.

Next installing info say:
----- [ OPEN ] ------------------------------------------

admin/adminoptions.php

----- [ FIND ] ------------------------------------------

$db->query("UPDATE adminoptions SET permsset='1', caneditsettings='$newperms[caneditsettings]', caneditann='$newperms[caneditann]', caneditforums='$newperms[caneditforums]', canmodposts='$newperms[canmodposts]', caneditsmilies='$newperms[caneditsmilies]', caneditpicons='$newperms[caneditpicons]', caneditthemes='$newperms[caneditthemes]', canedittemps='$newperms[canedittemps]', caneditusers='$newperms[caneditusers]', caneditpfields='$newperms[caneditpfields]', caneditugroups='$newperms[caneditugroups]', caneditaperms='$newperms[caneditaperms]', caneditutitles='$newperms[caneditutitles]', caneditattach='$newperms[caneditattach]', canedithelp='$newperms[canedithelp]', canrunmaint='$newperms[canrunmaint]' WHERE uid='$uid'");

My problem is that i can't find this part of code.
Any ideas why?
Just in case i attached the adminoptions.php after executing dbupdate.php and templateinstall.php [attachment=2267]
Thanks a lot.
It's line 56. The plugin creator forgot to add
$db->query("UPDATE [b]".TABLE_PREFIX."[/b]adminoptions SET permsset='1', cane
If you can't find a line again, try searching for parts of the line instead. Especially with such a long line. One character out and that's it Confused
decswxaqz Wrote:It's line 56. The plugin creator forgot to add
$db->query("UPDATE [b]".TABLE_PREFIX."[/b]adminoptions SET permsset='1', cane
If you can't find a line again, try searching for parts of the line instead. Especially with such a long line. One character out and that's it Confused
Ok, what should i do with the part of the code you are giving? I mean, where concretely should i place that part of code? Forgive me, the dummy in php...Sad
Well it depends on the step after the --[FIND]--. If you have to add something to that line then treat line 56 in the uploaded adminoptions.php as the line in the --[FIND]-- command.

So instead of looking for
----- [ FIND ] ------------------------------------------

$db->query("UPDATE adminoptions SET permsset='1', caneditsettings='$newperms[caneditsettings]', caneditann='$newperms[caneditann]', caneditforums='$newperms[caneditforums]', canmodposts='$newperms[canmodposts]', caneditsmilies='$newperms[caneditsmilies]', caneditpicons='$newperms[caneditpicons]', caneditthemes='$newperms[caneditthemes]', canedittemps='$newperms[canedittemps]', caneditusers='$newperms[caneditusers]', caneditpfields='$newperms[caneditpfields]', caneditugroups='$newperms[caneditugroups]', caneditaperms='$newperms[caneditaperms]', caneditutitles='$newperms[caneditutitles]', caneditattach='$newperms[caneditattach]', canedithelp='$newperms[canedithelp]', canrunmaint='$newperms[canrunmaint]' WHERE uid='$uid'");

Look for
----- [ FIND ] ------------------------------------------

$db->query("UPDATE ".TABLE_PREFIX."adminoptions SET permsset='1', caneditsettings='$newperms[caneditsettings]', caneditann='$newperms[caneditann]', caneditforums='$newperms[caneditforums]', canmodposts='$newperms[canmodposts]', caneditsmilies='$newperms[caneditsmilies]', caneditpicons='$newperms[caneditpicons]', caneditthemes='$newperms[caneditthemes]', canedittemps='$newperms[canedittemps]', caneditusers='$newperms[caneditusers]', caneditpfields='$newperms[caneditpfields]', caneditugroups='$newperms[caneditugroups]', caneditaperms='$newperms[caneditaperms]', caneditutitles='$newperms[caneditutitles]', caneditattach='$newperms[caneditattach]', canedithelp='$newperms[canedithelp]', canrunmaint='$newperms[canrunmaint]' WHERE uid='$uid'");
Ok, I added all new code.
In Users and Groups --> Admin Permissions the Can Edit Downloads Section option is marked as Yes. Still trying to access Downloads --> Modify / Delete option, I get this message: Access Denied You do not have permission to access this part of the administration control panel.
Anyways I tried to reconfirm admin rights for downloads section access in Admin Permissions, and when I click Update Permissions button I get and code error:
Fatal error: Call to undefined function: arraytobits() in /home/hosting/moldova/forum/admin/adminoptions.php on line 51
Any hope for me to have Downloads section no my forum? Sad Smile
I attached modified adminoptions.php [attachment=2268]
That is a common problem. It's not the mods problem.

Goto line 51 $upperms = arraytobits($newperms);. Either delete it or comment the line out.
Horray!
It works so far.
Thank you very much decswxaqz, God bless you! Smile
With your permission, i'll keep in touch if further something ain't gonna work with downloads section.
Regards,
Sure no problem. Not sure who the mod creator is, maybe they are inactive?
Can u give your download section integrated website link?
It looks like this is the old downloads section that I made some time ago. It's very out of date but will be updated sometime in the future. Smile
Pages: 1 2