PDA

View Full Version : Edit Profiles From Mod Cp


black
12-23-2001, 10:00 PM
Ok..... Someone requested this
Edit Profiles From Mod CP

What This hack does: Let Mods Who You Give The Permission To Edit Profiles From The Mod Cp

If you dont give A Mod the permission they wont see the option to edit the user profile

If you do then the mod will see the option to edit the profile ;)

Didnt have the time to add the unban option i have to go somewhere ......... But i tested this on my forums and it works perfectly ..... any problems let me know

By the way this is my second hack ;)

Lesane
12-24-2001, 08:58 PM
Cool hack, i gonna try this one later. Thanks.

TheComputerGuy
12-24-2001, 10:44 PM
I will install it tommrow Christmas day feel special, or tonight its already 7:40 I might do it right now...not too hard...

but thanks for the hack, I liked ur first one also

black
12-24-2001, 11:21 PM
Thanks.........Im planning another hack too ;)

okrogius
12-25-2001, 12:32 AM
Thanks. Great stuff!

Psychdrone
12-25-2001, 02:00 AM
Thanks man!!

O please O please O please could you add it so that they can control forums!

Meaning that they can edit/add and so on, That one area in the admin panel!!

O please O please I please!!

Great ONE!!

black
12-26-2001, 12:18 AM
ok,

ill try that, that shouldnt be hard

black
12-26-2001, 11:11 PM
I got a pm from someone saying they cant open the zip so here

black
12-26-2001, 11:14 PM
and

Stryker
12-28-2001, 09:22 PM
Great hack, thanks. Just one quick question: can mods turn themselves or other members into admins? That would be a very bad idea I think.

Stryker
12-28-2001, 10:51 PM
Hmmm, when I go to change a mod's permission settings I get the following MySQL error...

Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: UPDATE moderator SET forumid='3',userid='4',newpostemail='0',newthreade mail='0',caneditposts='1',cand eleteposts='1',canviewips='1',canmanagethreads='1' ,canopenclose='1',caneditthrea ds='1',caneditstyles='',canbanusers='0',canviewpro file='0',caneditprofile=1',can announce='1',canmassmove='0',canmassprune='0',canm oderateposts='1',canmoderateat tachments='1' WHERE moderatorid='23'
mysql error: You have an error in your SQL syntax near '',canannounce='1',canmassmove='0',canmassprune='0 ',canmoderateposts='1',canmode r' at line 1

mysql error number: 1064

Any idea how to fix that?

Lesane
12-29-2001, 06:47 AM
there is one ' missing

caneditprofile=1',canannounce='1',

has 2 be:

caneditprofile='1',canannounce='1',

Stryker
12-29-2001, 09:14 AM
Thanks for the info, but I can't seem to find that error in the edited files anywhere. Am I completely stupid or am I just looking in the wrong place?

By the way Black, I think it would be much easier if the stuff you had to edit was just listed in a simple text file rather than as part of the installation file - it just makes it easier to go back and check the code after you've installed it.

Lesane
12-29-2001, 10:20 AM
Change this in admin/forum.php:

$DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail= '$newpostemail',newthreademail='$newthreademail',c aneditposts='$caneditposts',candeleteposts='$cande leteposts',canviewips='$canviewips',canmanagethrea ds='$canmanagethreads',canopenclose='$canopenclose ',caneditthreads='$caneditthreads',caneditstyles=' $caneditstyles',canbanusers='$canbanusers',canview profile='$canviewprofile',caneditprofile=$caneditp rofile',canannounce='$canannounce',canmassmove='$c anmassmove',canmassprune='$canmassprune',canmodera teposts='$canmoderateposts',canmoderateattachments ='$canmoderateattachments' WHERE moderatorid='$moderatorid'");

to this:

$DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail= '$newpostemail',newthreademail='$newthreademail',c aneditposts='$caneditposts',candeleteposts='$cande leteposts',canviewips='$canviewips',canmanagethrea ds='$canmanagethreads',canopenclose='$canopenclose ',caneditthreads='$caneditthreads',caneditstyles=' $caneditstyles',canbanusers='$canbanusers',canview profile='$canviewprofile',caneditprofile='$canedit profile',canannounce='$canannounce',canmassmove='$ canmassmove',canmassprune='$canmassprune',canmoder ateposts='$canmoderateposts',canmoderateattachment s='$canmoderateattachments' WHERE moderatorid='$moderatorid'");

Stryker
12-29-2001, 05:23 PM
Well I'm no longer getting MySQL errors, thanks, but my mods have no way of submitting the changes to member's profiles. :(

What does the options which allows mods to see "member's whole profile" do exactly? And has that got anything to do with not being able to edit anything?

Chrysalis
12-31-2001, 01:18 AM
Ive installed the hack but so far not gave any mods rights to edit profiles, as I want to know if they can edit/add/remove admins.

Palmer ofShinra
12-31-2001, 06:03 AM
By my quick perusal of the code, it looks like they can indeed demote admins...

If you want to test it... make two dummy accounts.

Make one an admin, and one a mod with edit rights...

Then edit the dummy admin with the dummy mod. See if it works.

Basically... the part to look for is

usergroupid='$usergroupid',

If you delete that... then the edit display will still come up with the pulldown... but changing it won't do anything because it's not in the update query anymore.

I made custom code for my own Mod Edit... and replaced the Usergroup selector with a chooser that was ahrdcoded to the few groups I wanted them able to edit...

AND disabled it if the person was a mod/supermod/admin.

Chrysalis
12-31-2001, 06:39 AM
went to try what you said and got this when giving the test mod edit profile abilities hehe.

Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: UPDATE moderator SET forumid='8',userid='2380',newpostemail='0',newthre ademail='0',caneditposts='1',c andeleteposts='1',canviewips='1',canmanagethreads= '1',canopenclose='1',caneditth reads='1',caneditstyles='',canbanusers='0',canview profile='0',caneditprofile=0', canannounce='1',canmassmove='0',canmassprune='0',c anmoderateposts='1',canmoderat eattachments='1' WHERE moderatorid='76'
mysql error: You have an error in your SQL syntax near '',canannounce='1',canmassmove='0',canmassprune='0 ',canmoderateposts='1',canmode r' at line 1

mysql error number: 1064

admin/forum.php

im really tired its 8am after been up all night ill fix my mistake when I wake up.

Lucky
12-31-2001, 10:47 PM
There's got to be something up with this?
I have followed instructions to a T and my moderators can't edit profiles. There is no drop down or enter button anywhere?
What's up with this?
Is it still beta?

Any ideas?

Palmer ofShinra
01-01-2002, 04:54 AM
Chrysalis...

Look in the query for caneditprofile=0'

Notice... the zero in there only has one single quote around it... it should have two.

That's your error.

Lucky
01-01-2002, 06:46 PM
So is anyone able to have a mod edit anything with this?

I have had no luck with having a mod edit profiles.
I just don't get the option to save at the bottom of the mod cp.

If anyone has this working or knows how to fix this bug please reply.
Thanks.

Lucky
01-01-2002, 10:23 PM
^^

Chrysalis
01-02-2002, 04:13 PM
[QUOTE]Originally posted by Palmer ofShinra
Chrysalis...

Look in the query for caneditprofile=0'

Notice... the zero in there only has one single quote around it... it should have two.

That's your error.

Lucky
01-03-2002, 11:40 AM
[QUOTE]Originally posted by Lucky
There's got to be something up with this?
I have followed instructions to a T and my moderators can't edit profiles. There is no drop down or enter button anywhere?
What's up with this?
Is it still beta?

Any ideas?

Stryker
01-03-2002, 03:03 PM
Hmmm, like I said earlier the problem is more complex than the minor code glitch posted above. Even when that has been corrected mods still can't actually change anything.

Lucky
01-03-2002, 04:01 PM
[QUOTE]Originally posted by black
Ok..... Someone requested this
Edit Profiles From Mod CP

What This hack does: Let Mods Who You Give The Permission To Edit Profiles From The Mod Cp

If you dont give A Mod the permission they wont see the option to edit the user profile

If you do then the mod will see the option to edit the profile ;)

Didnt have the time to add the unban option i have to go somewhere ......... But i tested this on my forums and it works perfectly ..... any problems let me know

By the way this is my second hack ;)

black
01-05-2002, 04:19 AM
I need to start checkin back on my hacks more often. Sorry about that guys

Lucky
01-05-2002, 06:47 AM
[QUOTE]Originally posted by black
I need to start checkin back on my hacks more often. Sorry about that guys

black
01-05-2002, 08:20 PM
Yeah.... Im going to recode some coding just a little bit ... and ill have it ready in the next 2 or 3 days... im also workingon a nother hack

Lucky
01-05-2002, 09:59 PM
Sounds good buddy.

Can't wait!

Lucky
01-10-2002, 08:53 AM
Any luck yet?

black
01-10-2002, 08:58 PM
sorry school is holding me back im trying to get time tho :)

Lucky
01-16-2002, 05:03 AM
Anything?

Dark_Wizard
01-20-2002, 05:06 PM
There was some code missing from the hack. I will post an update to it once I have it documented.

Lucky
01-21-2002, 09:47 AM
Can't wait :)

GK_ng
02-27-2002, 06:47 PM
I installed this Hack, but my Mods weren't given the option to edit user profiles, so I examined what was missing:

In mod/user.php
Replace
while ($user=$DB_site->fetch_array($users)) {
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "")."</tr>\n";
}
with
while ($user=$DB_site->fetch_array($users)) {
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "").iif($perms[ismoderator] or $ismod['caneditprofile']==1, "<td nowrap><a href=\"user.php?action=edit&userid=$user[userid]\"><p>[edit user]</p></a></td>", "")."</tr>\n";
}

I didn't check if this automatically hides the "edit"-option if you're not allowed to edit, I relied on a different check for that ...

black
02-27-2002, 08:13 PM
sorry forgot that....

This weekend im going to make a new one ... this one is not so secure ... and i dont feel please with it

okrogius
02-27-2002, 10:47 PM
[QUOTE]Originally posted by black
sorry forgot that....

This weekend im going to make a new one ... this one is not so secure ... and i dont feel please with it

Nupraptor
04-23-2002, 01:48 AM
Mind sharing the link to that one, Codename?

bonnmac
05-08-2002, 04:50 AM
I'd be very intrested in the secure one. With the other one I found out that mods could edit admins. That I wasn't comfortable with. Hope your new one doesn't allow that. Looking forward to you releasing it. :)

MIKdoubleE
06-15-2002, 07:27 PM
i tried installing this on my board and i get this error when i try to give one of my mods that power


Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: UPDATE moderator SET forumid='3',userid='4',newpostemail='0',newthreade mail='0',caneditposts='1',candeleteposts='1',canvi ewips='1',canmanagethreads='1',canopenclose='1',ca neditthreads='1',caneditstyles='',canbanusers='0', canviewprofile='0',caneditprofile=1',canannounce=' 1',canmassmove='0',canmassprune='0',canmoderatepos ts='1',canmoderateattachments='1' WHERE moderatorid='24'
mysql error: You have an error in your SQL syntax near '',canannounce='1',canmassmove='0',canmassprune='0 ',canmoderateposts='1',canmoder' at line 1

mysql error number: 1064

Date: Saturday 15th of June 2002 04:09:47 PM
Script: http://www.hiphopfuture.com/forums/forums/admin/forum.php
Referer: http://www.hiphopfuture.com/forums/admin/forum.php?action=editmoderator&moderatorid=24


i'm lost :(

edin
07-03-2002, 11:40 AM
I get this error when I try to edit a user:

Database error in vBulletin Mod Control Panel 2.2.5:

Invalid SQL: SELECT COUNT(*) AS users FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1 AND user.userid<>
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Gaz.t
08-28-2002, 12:46 PM
SO has anyone got a HACK for this yet as I want my mods to be able to edit profiles saves me doing it.

[email protected] vbmenu_register("postmenu_308711", true);
10-11-2002, 07:19 PM
Lots of un-answered questions here. Think I'll hold off untill more interest in fixing it. Love the idea however.

ZiRu$
10-31-2002, 12:00 PM
thanks alot man i will install tomorrow

Xenon
10-31-2002, 03:09 PM
The author of this hack isn't around anymore, also it seems it isn'T compatible with vb226 and above...


i don't like to advert my own hacks, but it does nearly the same so:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=42096
and i'm also around to can give support ;)