View Full Version : Direct Link to User's ACP Profile in Postbit for Admins
------------------------------------------------------------------------------>
Direct Link to User's ACP Profile in Postbit for Admins
~ A hack by N9ne // March 18th 2003
~ Copyright N9ne 2003+
------------------------------------------------------------------------------>
------------------------------------------------------------------------------>
What does this hack do?
~ It adds a link in the postbit to only administrators.
~ Upon clicking the link, you are taken directly to the
user's profile, in the adminCP.
~ This hack was created for convenience.
------------------------------------------------------------------------------>
------------------------------------------------------------------------------>
What do i need to do to install this hack?
~ 3 file modifications [admin/functions.php and showthread.php]
~ One template modification [postbit]
~ Add one template [postbit_useradmin]
------------------------------------------------------------------------------>
Screenshot in next post!
Screenshot of link in postbit // Remember: You can place the link anywhere you want in the postbit!
Chris Gwynne
03-18-2003, 05:07 PM
Preeeetttty simple :p It's ok, I guess. :)
It's simple yes, but is that enough reason to reply to it stating that :rolleyes:
filburt1
03-18-2003, 05:16 PM
This can be (somewhat) done with phpinclude. Hacking just gives a cleaner resulting HTML.
Filburt, in your eyes, everything can be done in phpinclude :).
Wouldn't using phpinclude in this, and calling an extra template, add a query per page?
Disturbed
03-18-2003, 06:19 PM
is that the same link thats in the profile?
Yes, on the get info page, there's the administrative options link, this link that is put in the postbit has the same URL, except it's only viewable by administrators.
Boofo
03-18-2003, 06:56 PM
Nice little hack, N9ne. ;) I did this a while back using Logician's Dynamic Templates hack. No PHP files were harmed in the making of that hack. ;)
filburt1
03-18-2003, 06:57 PM
Today at 02:18 PM N9ne said this in Post #6 (https://vborg.vbsupport.ru/showthread.php?postid=368679#post368679)
Filburt, in your eyes, everything can be done in phpinclude :).
Wouldn't using phpinclude in this, and calling an extra template, add a query per page?
No, it just makes messy HTML.
Today at 08:57 PM filburt1 said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=368747#post368747)
No, it just makes messy HTML.
I'm not sure what you mean by when using phpinclude, it will create messy html, what do you mean by 'messy' html?
filburt1
03-18-2003, 07:16 PM
My way would be to create variables that contain HTML comments and put them to the left and right of the HTML for the link, but the variables will be empty for usergroupids 5, 6, and 7 (smods, admins, and mods).
Oh I see now, quite messy...
Erwin
03-18-2003, 09:13 PM
Today at 08:16 AM filburt1 said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=368771#post368771)
My way would be to create variables that contain HTML comments and put them to the left and right of the HTML for the link, but the variables will be empty for usergroupids 5, 6, and 7 (smods, admins, and mods).
How would you get the $post[userid] variable using phpinclude? You can't do it. You need to use functions.php in any case.
filburt1
03-18-2003, 09:27 PM
No, something like this (using PAPI because I'm lazy):
if (thisis("showthread.php"))
{
if (!userisingroup("5,6,7"))
{
$prelink = "<!--";
$postlink = "-->";
}
else unset($prelink, $postlink);
}
Then in the postbit:
$prelink <a href="...">...</a> $postlink
Like I said, messy but it works.
Bah, stick with modifying files here, that's too unclean for my liking, + phpinclude modifying just isn't my thing :p
Overgrow
03-19-2003, 03:07 AM
All this complaining :D
It's a good hack. I've had it on my site for a long time and it is a big time saver.
Boofo
03-19-2003, 05:24 AM
Just a thought. I noticed you don't have
target="_blank"
at the end of the link. I put that in mine when I did this a while back so all I had to do was close the window after an edit to get back to the post I came from instead of having to go through about 4 or 5 screens to get back to the post.
Today at 07:24 AM Boofo said this in Post #18 (https://vborg.vbsupport.ru/showthread.php?postid=369074#post369074)
Just a thought. I noticed you don't have
target="_blank"
at the end of the link. I put that in mine when I did this a while back so all I had to do was close the window after an edit to get back to the post I came from instead of having to go through about 4 or 5 screens to get back to the post.
Yup, that can be done, a lot of things can be done with the link, which is why I put it in its own template :).
cYbercOsmOnauT
06-04-2003, 02:04 PM
Nice Idea.. don't have to click on the Profile anymore to see the administration link! I will install this!
/me clicks on install
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.