Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • [SC] Disable Password Changes
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
[SC] Disable Password Changes; For Certain Members
Tweet Topic Started: Feb 2 2009, 10:45 PM (863 Views)
Vitality Feb 2 2009, 10:45 PM Post #1
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
A request.

Below The Board
Code:
 
<script type="text/javascript">
/*Disable password changing for certain members - Vitality - TCZ|ZBCode|PD*/
if(location.href.match('c=16')){
var prmembers=new Array();
prmembers[0]="######";
var prmembersl=prmembers.length;
var mrmembers=$("#top_info").find("a").parent().html().split("profile/")[1].split("/")[0];
for(cav=0;cav<prmembersl;cav++){
if(mrmembers==prmembers[cav]){
$("td.c_desc").hide().nextAll().hide();
$("td:contains('Please select a new password')").text("Your administrator has disabled your option to change your password.");
$("button:contains('Change Password')").remove();
}}}
</script>

All you need to do is edit/add the member id's to the prmembers variable so (prmembers[1]="####"; etc...) and you can also edit the text shown for those members from this line:
Quote:
 
$("td:contains('Please select a new password')").text("Your administrator has disabled your option to change your password.");

Enjoy :)
Edited by Reid, Jun 15 2009, 08:18 PM.
Offline Profile Goto Top
 
JDE Feb 3 2009, 04:16 PM Post #2
Member Avatar


Posts:
26
Group:
Member
Member
#489
Joined:
Aug 7, 2008
Quote:
 
(prmembers[0]="####";)


I'm trying to do this for my test account, which is member #41. I put that in there, with and without the #, but it didn't work. What is the member ID?
Posted Image (CLICKABLE)
Join Us!
Offline Profile Goto Top
 
Firestrife2 Feb 3 2009, 04:24 PM Post #3
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
Your member ID is found at the end of your profile URL... It should be a 5-6(sometimes less?) digit number. XD. (i.e. http://s1.zetaboards.com/forum/profile/418485/)
Posted Image

Posted Image
Offline Profile Goto Top
 
JDE Feb 3 2009, 04:25 PM Post #4
Member Avatar


Posts:
26
Group:
Member
Member
#489
Joined:
Aug 7, 2008
Ah, okay. I see. Thanks!
Posted Image (CLICKABLE)
Join Us!
Offline Profile Goto Top
 
Firestrife2 Feb 3 2009, 04:27 PM Post #5
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
No problem. haha I looked at the title and I am like "Why would you want to disable password changes?"...but then I saw the description :lol:
Posted Image

Posted Image
Offline Profile Goto Top
 
JDE Feb 3 2009, 04:29 PM Post #6
Member Avatar


Posts:
26
Group:
Member
Member
#489
Joined:
Aug 7, 2008
Lol. It's working now. Thanks again! :D
Posted Image (CLICKABLE)
Join Us!
Offline Profile Goto Top
 
ebk forever Feb 9 2009, 05:10 AM Post #7


Posts:
41
Group:
Member
Member
#477
Joined:
Aug 6, 2008
Umm why didn't you do it by username? it would of been easier for the coder and the person putting the code onto the forum. But its an awesome code. Well done =D
Offline Profile Goto Top
 
Vitality Feb 9 2009, 11:24 PM Post #8
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
I figure using the id's would be safer in terms of traversing a string for this code. It's easier for JS to mess up on letters than numbers.
Thanks :D It was a request though, so the idea wasn't mine.
Offline Profile Goto Top
 
UrbanTwitch Feb 10 2009, 09:46 AM Post #9
Member Avatar
PHP/MySQL Guy

Posts:
77
Group:
Member
Member
#2,240
Joined:
Feb 6, 2009
Coding language
PHP
Nice job on this. People can use this as refrence for other inputs! :-)
urbanyx - have you tried my new pc platform demo?

Need help with PHP and HTML? Check out the Server-side tutorials I've written. They may help you!
Offline Profile Goto Top
 
ANDREW TOPGUNS Apr 24 2009, 04:03 AM Post #10
Member Avatar
10% of the way to 1000 club!

Posts:
113
Group:
Member
Member
#2,467
Joined:
Feb 28, 2009
Coding language
HTML/CSS
Firestrife2
Feb 3 2009, 04:27 PM
No problem. haha I looked at the title and I am like "Why would you want to disable password changes?"...but then I saw the description :lol:
Lol, same here I thought it was a bit strange too. :lol:
Posted Image
Posted Image
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy