vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=139)
-   -   [Release] User CP or Register Link (https://vborg.vbsupport.ru/showthread.php?t=83561)

SaintDog 06-14-2002 10:00 PM

[Release] User CP or Register Link
 
Author: SaintDog

Description: This will teach you how to make your navigation so that non-registered users do not see the user cp link and where registered users do not see the register link (frees up navigation space). Screenshots below:

Registered Member (Logged In):
http://www.vbulletintemplates.com/mo...s/loggedin.gif


Non-Registered Member (Logged Out):
http://www.vbulletintemplates.com/mo.../loggedout.gif

imported_Niloc 06-24-2002 12:23 AM

Thanks! Im going to be busy tonight will all of these new hacks to install!

Foxtroter 06-25-2002 07:36 AM

I think that now the top link for the user cp is top_profile.gif well the default anyway also might wanna include telling them to put the $register where they would want the image to appear on the top links other than that great idea

SaintDog 06-25-2002 01:01 PM

I have updated the file to reflect the changes, it will now state where to place register as well as what this hack does in the downloadable file.

- SaintDog

Gary W 06-25-2002 02:23 PM

Sounds good; nice job SD ! :D

Blue 06-28-2002 09:24 PM

Another great one!

Xelation 06-28-2002 11:29 PM

how would I do this if I wanted a rollover?

Foxtroter 06-29-2002 07:40 AM

Edit: Look down a few posts for the attachement :)


Thats what i used for http://forums.cybersportsnet.net

SaintDog 06-29-2002 07:47 AM

Please use attachements :)

Regards,

- SaintDog

SaintDog 06-29-2002 08:11 AM

Roll-Over Edit

Foxtroter 06-29-2002 08:21 AM

yeh man wasn't sure lol i noticed it really screwed up the design afterwards. sorry bout that

Floris 06-30-2002 09:23 AM

Installed!

Works great, I finally have the space again to add my statistics button to the top again. Fnx for sharing!

Xelation 06-30-2002 02:27 PM

thanks for the rollover mod :D worked great

WoodiE 07-08-2002 01:48 AM

I have a question, what file do i apply this to?

Now, replace top_profile.gif & top_register.gif with:

$register

Excuse me for my ignorance.

Thanks,

WoodiE

Foxtroter 07-08-2002 03:10 AM

in the header template i thnk

SaintDog 07-08-2002 03:11 AM

That would be correct :)

Floris 07-08-2002 10:12 AM

There are 2 links in the header template representing those two buttons, remove both and instead of those 2 codes, put $register there, then it will parse accordingly the proper button when a user/guest logs on to the site.

It did indeed a bit confusing, but it is quite logical.

[button1] [button2] = visual
<a href= ..> etc for both buttons = back-end code

replace both buttons,
because $register should be there,
and $register means: either button1 or button2, and will put the right code in the right place and will show therefor the right button.

sonic3d 08-12-2002 08:54 PM

do i just replace top_profile.gif with $register or the whole image line?

do u get what i am saying?

imported_Maursheed 08-13-2002 09:17 PM

Very cool!!! I was wondering how to do this.

nomad 08-16-2002 03:28 PM

Where have I to replace top_profile.gif & top_register.gif with $register?

Tnx in advance for your support, Nomad.

Bad Bunny 08-17-2002 03:57 PM

Oops. I missed this one, and modified the other one you released to do this....so I will go and "install" this one too. Thanks alot!

Red Blaze 02-03-2003 02:01 PM

Quote:

Originally posted by sonic
do i just replace top_profile.gif with $register or the whole image line?

do u get what i am saying?

I got kinda confused there too, until I found out the obvious when I saw two user cp buttons. :p

Instead of
Quote:

<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>
Replace it with $register.

*Clicks Install*

WoodiE 04-04-2003 02:55 PM

I dont use Images for my register / profile links. I use text links. So what i did was edit your mod to use my text links instead of images and I receive this error:

Parse error: parse error, unexpected T_STRING in /home/rcnitro/public_html/forum/global.php(309) : eval()'d code on line 3

Is there anyway this can be fixed?

-WoodiE

Tony G 04-04-2003 10:18 PM

Can you show your modified code of the mod here please?

WoodiE 04-04-2003 10:46 PM

// Show User CP or Register
if ($bbuserinfo[usergroupid]==1) { // Non-Registered
$register = "<a href="http://www.mydomain.com/forum/register.php?s=Array%5Bsessionhash%5D&action=signu p">Register</a>";
} else { //Everyone else/Registered users
$register = "<a href="http://www.mydomain.com/forum/usercp.php?s=Array%5Bsessionhash%5D">Profile</a>";
}
//End Show User CP or Register Code

Thats my edited version.

-WoodiE

Hermit 04-08-2003 01:42 PM

You must use a "\" before your quotation marks in your phpinclude template.

Copy and paste the following in it's place.

Code:

// Show User CP or Register
if ($bbuserinfo[usergroupid]==1) { // Non-Registered
$register = "<a href=\"http://www.mydomain.com/forum/register.php?s=Array%5Bsessionhash%5D&action=signup\">Register</a>";
} else { //Everyone else/Registered users
$register = "<a href=\"http://www.mydomain.com/forum/usercp.php?s=Array%5Bsessionhash%5D\">Profile</a>";
}
//End Show User CP or Register Code


imported_ogden2k 05-02-2003 02:36 PM

Awesome, works great!

imported_DMC 05-11-2003 11:23 PM

Thanks........!! :)


All times are GMT. The time now is 04:49 PM.

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.01133 seconds
  • Memory Usage 1,763KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)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