MyBB Community Forums
Adding a Downloads Section - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Adding a Downloads Section (/thread-6647.html)

Pages: 1 2


Adding a Downloads Section - az0000000 - 2006-02-10

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
.php   adminoptions.php (Size: 7.24 KB / Downloads: 137)
Thanks a lot.


RE: Adding a Downloads Section - decswxaqz - 2006-02-10

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


RE:  Adding a Downloads Section - az0000000 - 2006-02-10

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


RE: Adding a Downloads Section - decswxaqz - 2006-02-10

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'");



RE: Adding a Downloads Section - az0000000 - 2006-02-10

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
.php   adminoptions.php (Size: 7.57 KB / Downloads: 146)


RE: Adding a Downloads Section - decswxaqz - 2006-02-10

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.


RE: Adding a Downloads Section - az0000000 - 2006-02-10

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,


RE: Adding a Downloads Section - decswxaqz - 2006-02-10

Sure no problem. Not sure who the mod creator is, maybe they are inactive?


RE: Adding a Downloads Section - KURTAY - 2006-02-10

Can u give your download section integrated website link?


RE: Adding a Downloads Section - Alan Crisp - 2006-02-10

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