vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Direct Link to User's ACP Profile in Postbit for Admins (https://vborg.vbsupport.ru/showthread.php?t=50396)

N9ne 03-17-2003 10:00 PM

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!

N9ne 03-18-2003 04:54 PM

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. :)

N9ne 03-18-2003 05:10 PM

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.

N9ne 03-18-2003 05:18 PM

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?

N9ne 03-18-2003 06:30 PM

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

Quote:

Today at 02:18 PM N9ne said this in Post #6
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.

N9ne 03-18-2003 07:08 PM

Quote:

Today at 08:57 PM filburt1 said this in Post #10



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).

N9ne 03-18-2003 07:17 PM

Oh I see now, quite messy...

Erwin 03-18-2003 09:13 PM

Quote:

Today at 08:16 AM filburt1 said this in Post #12
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):
PHP Code:

if (thisis("showthread.php"))
{
    if (!
userisingroup("5,6,7"))
    {
        
$prelink "<!--";
        
$postlink "-->";
    }
    else unset(
$prelink$postlink);


Then in the postbit:
Code:

$prelink <a href="...">...</a> $postlink
Like I said, messy but it works.

N9ne 03-18-2003 09:32 PM

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.

N9ne 03-19-2003 03:27 PM

Quote:

Today at 07:24 AM Boofo said this in Post #18
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


All times are GMT. The time now is 06:37 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
  • Page Generation 0.01092 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete