![]() |
Administrative Login
1 Attachment(s)
I edit my forums a lot, and I got tired of changing my url and adding /admin to access the admin cp, but I didn't want a new link to the admin cp be seen by everyone, so I wrote thie little modification.
What it does: Adds a link to the admin CP and moderator CP in your footer, but only shows up for admins/mods respectively. Enjoy :) |
Been done before but this is a very tidy way to do it..
Thanx :) |
I thought the last one involved hacking, this is just two minor template changes :)
|
]nice template modification... :) usefull
|
hmm....yeah, I made 2 buttons (one says "Admin CP" and another one says "MOD CP")...how can I add those buttons into the header using that code?? I tryed it one way but just got some error :( please help me out here.
|
I am soooo stupid
how can I change the font color to white <font color="ffffff"></font> dosn't work for me, please help thanks! |
<font color=#ffffff>hgfh</font>
|
Quote:
Example: $adminlogin="<img src=\"{imagesfolder}/admincp.gif\" border=\"0\">"; Make sure you have those backslashes before all quotation marks, or else you'll get a parse error. |
Quote:
|
1 Attachment(s)
ok, I was able to get the pictures working now, and I added the $adminlogin code to the header template, but now how do I get it to one line with the other images?? (see picture to get what I'm trying to say).
|
For the "Moderator Login" link, would it just be $moderatorlogin?
|
Edit your header template and put $adminlogin right after <!-- toplinks -->
That should be it.... |
Quote:
|
Quote:
|
Ok, remove the "<br>" from the $adminlogin ;)
|
ahh...all fixed...thank you :D
|
heres what my code looks like
<font color="ffffff">$adminlogin</font> and I tried <smallfont color="ffffff">$adminlogin</smallfont> nothing happens please help |
Quote:
PHP Code:
PHP Code:
|
Tested on my private forums just for confirmation, the above works (of course, I used different colors)...
- SaintDog |
Cool Mod...
I like it... Satan |
i did something like this too, www.voogru.com/vb/top_buttons
|
O thats right php and " don't like each other:P! Well more then a couple in a statment
thanks! |
Quote:
|
Please bear with me here, this is still all new to me (I just got started on vBulletin a few days ago). I want to link the Admin logon to my titleimage so it's hidden if I am ever anywhere else and have to log on to my board. This way no one will even know the Admin Login is even on the board unless they are an Admin or Moderator. What do I need to do to change it for the whole site so I can just click on the titleimage to use it? Can I do it all in one place or do I need to edit everything that has the titleimage in it? And no one else would be able to get to it except the Admins and Mods, right? Thanks and sorry to sound so stupid at all of this. :-)
BTW: Great time saver! Thanks! |
It already works like that, only admins and mods see it, to change it from a simple link to your title image, just change it to fit your titleimage, or logo. It would be easier to just add a lnk or button in the header, but if you want to change it around you're more than welcome.
I think this would work: Use this code in your phpinclude template Code:
//Administrative/Moderator Login Remember to remove the space between { and titleimage} |
Sorry to sound so new at this, but I have learned alot just from reading in here. Hopefully, one of these days, I can start to understand more of this. :-)
Is there any way just to link it to my titleimage instead of changing it? Because if I do it this way (now that I (DOH!!) think of it), the registered users won't see my titleimage when they log on, will they? I just want to hide it from site but still be able to use it, you know what I mean? |
Quote:
the reason why he puted that space there is because if you don't, you won't get that, but you get the actuly title image from the server :eek: (well..the path anyways) |
I did it just lkike he said and this is how it looks now. I must have missed something somehwere. You will also notice that I am having a problem with the forums being listed at the top of every message area. Any help on that will help too. :-)
Message Board Problems |
if you looks at the image soruce for where the path is going, it shows it's going to:
http://www.jamcomputerservices.com/vbulletin/<img%20src= hmm...let me see what code you used in phpinclude file |
Here is my whole phpinclude file
// This code is PHP4 only: // ob_start(); // require("yourheader.html"); // $header = ob_get_contents(); // ob_end_clean(); //Administrative/Moderator Login if ($bbuserinfo[usergroupid]==6) { //Admins $adminlogin = "<a href=\"admin/index.php\"><img src=\"https://vborg.vbsupport.ru/images/vBulletin_logo.gif\" border=\"0\"></a>"; } elseif (($bbuserinfo[usergroupid]==5) or ($bbuserinfo[usergroupid]==7)) { //Mods $adminlogin = "<a href=\"mod/index.php\"><img src=\"https://vborg.vbsupport.ru/images/vBulletin_logo.gif\" border=\"0\"></a>"; } else { //Everyone else $adminlogin = "<img src=\"https://vborg.vbsupport.ru/images/vBulletin_logo.gif\" border=\"0\">"; } //End Login Code I put it all there just in case I meesed something up adding the code. Thanks! |
I forgot to tell you that the titleimage doesn't show up at all for the unregsitered user but it does show up for the Admin and Mod. It just reloads the page after you click it. Don't know if that will mean anything to you but thought I'd better tell you.
|
Hmmm....And you switched everything that said { titleimage} to $adminlogin, right??
|
Yes, exactly like you told me to. I went ahead and changed it back for now until I can find a way to just link the image somehow without it disappearing. Can you tell me how I can get rid of all of the extra Forum headers on my site? I seem to have one before every message area instead of just before each category. I used a hack called "Spaces between categories", but it must be messing with another hack I have installed somehwhere. Check it out and tell me what you think, would you?
Forum headaches BTW: Am I supposed to delete the upgrade13.php and the other upgrade phps if I don't need them? |
Ok, well I'm not sure what went wrong, I highly suggest just settling with a simple link instead of me rewriting most of the mod for something only a few people are going to use. If you or someone else wants to do it, go ahead and do it, I have decided not to.
And about your categories, I think you added code into the wrong template, but please take your problem into that thread, those "forum headaches" have nothing to with this thread, so don't cross-post please. And yes, after you upgrade you need to remove all upgradex.php files off of the server. |
Why is it that when someone says they have "decided not to do it", they leave someone else in the middle of a mess up? That's fine, I'll get the code that you gave me out of there somehow. As far as asking you about the other thing, if you don't know the answer (which is probably the way it really is) or you don't want to help, that's fine also. I can see that there are only a few real hack developers here that are helpful and understanding in any way. Glad I found out now. Thanks for nothing Unknown553.
|
This is why I don't post many hacks, cuz people want me to bend over backwards and make it work exactly the way people want, even if it's different from what it's posted. I'm open to suggestions, but I will not take "I want this hack to do this and that for me, thanks." Take the hack as is or leave it, I tried my best to help you out, but clearly it still is not working for you. So, in order for me to make it work exactly how you want it, I'd have to customize it and completely redo the whole dang script, which I will not do for one person that I don't even know. Take the modification as is or don't use it, it's that simple. Thank you for your lack of gratitude.
|
I guess I need to apologize for that last message. There is really no excuse for the way I reacted. I ended up doing a complete re-install of vBulletin and I modified Admin login it to fit in between the Contact Us and the board URL. It works great there and looks normal with a regular user. It really is a good hack and I'm sorry I reacted the way I did. I'm working on my first hack (actually, I need to thank you for steering me in the right direction with your code for Admin login). It is basically a combination of a couple of previous hacks redone in box like Quick Stats and is for the Admin Panel. If you'd be interested in checking it out, let me know. I could use someone who knows what to look for in it. It works GREAT here! Again, sorry for the last message.
|
Apology accepted. I'm interested in checking out any hack, so go ahead and share it when you finish :)
|
ive tried this hack on one domain and its worked fine.. but I am trying to use it on a subdomain and it wont work. Help please.
|
Nice little and easy hack. Thank you! Installed without problem on 2.3.2
Chris |
All times are GMT. The time now is 10:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|