PDA

View Full Version : Lock Profile Editing


Mephisteus
08-13-2002, 10:00 PM
Thanks to lesane for his help ;)

This hack will allow you to lock profiles off your members to prevent them from editing them.

This can be done through the public profile (smods and admins only). They use the same table so if you lock the profile through the public profile it will also change the status in admin cp where it can also be done.

Screenshot admincp in next post, there is no screenshot of the public profile since you can place it where ever you want.

If you install it please click install (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=42291)

[edit]
confirmed working on ALL 2.2.x version of vbulletin.

[edit]
confirmed to be working on 2.3.0

Mephisteus
08-14-2002, 03:09 PM
Screenshot

NTLDR
08-14-2002, 04:00 PM
Nice ;)

One thing though, its says:

/------------------------------------\
| PIN code itemshopv5 addon |
| by DarkSSJ3 |
|additional coding provided by Lesane|
\------------------------------------/
at the top of your text file which I guess wasn't updated from your last hack ;)

Mephisteus
08-14-2002, 05:22 PM
Originally posted by NTLDR
Nice ;)

One thing though, its says:


at the top of your text file which I guess wasn't updated from your last hack ;)

lol, fixed :)

Boofo
08-15-2002, 10:58 PM
I have 2 questions:

First, the part we need to add after this:

// do modify profile form

Is that if the Start Modify Profile section or the Start Modify Options section? I put it in the Start Modify Profile section.

Second, when I lock a profile, it takes me to a blank page with just the words Profile locked on it and no way back to the profile or anything else. Shouldn't it just give you a template message and then take you back to the profile page? Any way around this?

And no one can see the words in the getinfo template unless they are admins or mods right?

Edit: In this bit of code:

new template: lockprofile

Your profile is locked by one of the mods/admins.

The template name needs to be changed to profilelock istead of what you have now or the error messges is blank. :)

And is there a way to not allow mods to lock or unlock the admins or supermods profile? :)

Mephisteus
08-16-2002, 06:32 AM
I'll fix it when I get back (that's tonight :p)

Boofo
08-16-2002, 06:38 AM
I already fixed it and made a couple of changes to your code. If you want to see the changes I made, let me know and I can PM them to you for you to look at. :)

Originally posted by DarkSSJ3
I'll fix it when I get back (that's tonight :p)

Mephisteus
09-03-2002, 05:47 PM
OK, Updated with Boofo's version

dm02
09-20-2002, 04:22 AM
has anyone used this hack in 2.2.7?? will it work with the code as is???

Thanks

snyx
10-07-2002, 11:07 PM
works fine on 228 ;)

Warlord
11-06-2002, 11:59 PM
Cool hack ;)

BigJohnson
11-07-2002, 09:13 AM
I get this error please help

Invalid SQL: UPDATE user SET lockprofile='1' WHERE userid='207'
mysql error: Unknown column 'lockprofile' in 'field list'

mysql error number: 1054

I get this error when I go to the users profile on the board and click Lock profile from the getinfo template.

BigJohnson
11-07-2002, 07:33 PM
pleasde help

NTLDR
11-07-2002, 07:39 PM
Theres no need to bump a thread just because no one has replied in less than 12 hours. Not everyone who can help is here 24/7.

Xenon
11-07-2002, 07:39 PM
you have to run this query before you can use the hack:
ALTER TABLE user ADD lockprofile int(3) DEFAULT '0'

Boofo
03-30-2003, 05:27 AM
Hey, buddy. Found another bug. If you add a user through the Admin CP you will get a db error with the following code:

Find: 154

$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepage,icq,aim,yahoo,sig nature,adminemail,showemail,invisible,usertitle,cu stomtitle,joindate,cookieuser,daysprune,lastvisit, lastactivity,lastpost,posts,timezoneoffset,emailno tification,receivepm,emailonpm,ipaddress,pmpopup,o ptions,birthday,canreportposts,profile) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid','".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$dayspru ne',$lastvisit,$lastactivity,$lastpost,'$posts','$ timezoneoffset','$emailnotification','$receivepm', '$emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','$birthday')");

Replace it with:

$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepage,icq,aim,yahoo,sig nature,adminemail,showemail,invisible,usertitle,cu stomtitle,joindate,cookieuser,daysprune,lastvisit, lastactivity,lastpost,posts,timezoneoffset,emailno tification,receivepm,emailonpm,ipaddress,pmpopup,o ptions,birthday,canreportposts,profile) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid','".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$dayspru ne',$lastvisit,$lastactivity,$lastpost,'$posts','$ timezoneoffset','$emailnotification','$receivepm', '$emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','$birthday','$lockprofile' )");

You need to add lockprofile before the ) VALUES (NULL, ;)

N9ne
03-30-2003, 12:11 PM
This gives me a good idea for my forums, I could have lock profile, lock options, freeze post count, freeze points count, lock out of certain features such as calendar, memberlist, search, etc :D

Thanks for the ideas :). hehe.

Mephisteus
03-30-2003, 12:53 PM
please dont make those, im making a pack of it atm :p

ps
thx boofo, fixed it :)

N9ne
03-30-2003, 01:44 PM
Today at 02:53 PM DarkSSJ3 said this in Post #18 (https://vborg.vbsupport.ru/showthread.php?postid=375491#post375491)
please dont make those, im making a pack of it atm :p

ps
thx boofo, fixed it :)


I won't be releasing them ;).

Mephisteus
04-07-2003, 12:32 PM
your selfish :p. Anyway, I just checked my schedule to see I don't have the time to support it in any way. Not an hack like that. To busy with other projects, feel free to release it if you want :)

Boofo
04-07-2003, 12:50 PM
Today at 08:32 AM DarkSSJ3 said this in Post #20 (https://vborg.vbsupport.ru/showthread.php?postid=378719#post378719)
your selfish :p. Anyway, I just checked my schedule to see I don't have the time to support it in any way. Not an hack like that. To busy with other projects, feel free to release it if you want :)

Anything I night be interested in? ;)

D7MeEe
08-26-2003, 11:20 PM
looks good

Keith
11-09-2003, 10:12 PM
Installed, very helpful hack indeed. Did anyone release the additional code to lock "Edit Options" as well?

EDIT: Created a new member usergroup, clicked edit profile "off" and moved the problem member into that group.

Rampag33
11-09-2003, 10:47 PM
installed, great and useful

350Chevy
03-21-2004, 12:28 AM
I had some errors when trying this with 2.3.4... :(

350Chevy
03-22-2004, 06:52 AM
Nevermind.. I'm an idiot.. I just set a usergroup to do this... No need for a hack.. :)

Mephisteus
11-21-2004, 02:37 PM
The reason I made this is so no usergroups would be needed... It's on a member specific base, not a usergroup specific base. So depending on what you want, there is a need for this hack.