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)
-   -   Get rid of "register" option if you have registered (https://vborg.vbsupport.ru/showthread.php?t=33051)

James Cridland 12-07-2001 10:00 PM

I'm logged in to your board... so why is there still a link at the top of your board asking me to "register"?

I'm not logged in... so why is there a link to my "control panel"?

This bit of code will remove the pointless links from your forum, leaving it looking neater and using (a bit) less bandwidth.

Details: Two template edits, that's all.
Demo: http://forums.mediauk.com
Use Username: vbulletinorg Password: vbulletinorg so you can see both states. We use text rather than the standard graphics, but you'll find the graphic code enclosed in the hack documentation.

Dalius 12-08-2001 08:14 PM

Ok, for the last step, editing the template, what and where do we exactly edit?

Freddie Bingham 12-08-2001 08:55 PM

I put something in my phpinclude template like this:

if ($bbuserinfo[userid]) { // user is logged in
$pflink = linkto usercp.php
} else {
$pflink = linkto register.php
}

I then put $pflink in the header template in place of the buttons that show user cp/register. Do it this way and you don't have to edit anything when you upgrade.

Modshack 12-08-2001 09:05 PM

In your header simply

Delete this :-

<a href="usercp.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0"></a>
<a href="register.php?s=$session[sessionhash]&action=signup"><img src="{imagesfolder}/top_register.gif" alt="Registration is free!" border="0"></a>


And replace it with :

$register_or_controlpanel

Tried and tested and works fine and the php edit is hardly brain surgery now is it :)

HM

James Cridland 12-08-2001 09:19 PM

[QUOTE]Originally posted by freddie
Do it this way and you don't have to edit anything when you upgrade.

Psychdrone 12-08-2001 09:26 PM

please do!

James Cridland 12-08-2001 09:58 PM

Have done; hack now updated. Many thanks for that.

grb123 12-09-2001 02:44 PM

So easy! Thanks very much!

nuno 12-09-2001 03:49 PM

ah thank you freddie ;)

DarkReaper 12-09-2001 03:59 PM

Parse error: parse error in /home/serioussam/cgi-bin/forums/global.php(328) : eval()'d code on line 10


All times are GMT. The time now is 12:39 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.00997 seconds
  • Memory Usage 1,727KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete