Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2001, 06:00 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've decided to do away with the vB icons and change them to text...
http://www.automotiveforums.com/vbulletin/index.php
you can see how on top it says Free Registration! in red and all other links on the right.

I tried to make it so that only guests will see the Free Registration! link.

In global.php I added this:

PHP Code:
if ($bbuserinfo['userid']!=0) {
    
$registertext=" ";
} else {
    
$registertext="<A HREF=\"register.php?s=$session[sessionhash]&action=signup\"><b><font face=\"verdana\" size=\"1\" color=\"red\">Free Registration!</a></b></font>";
    } 
But for some reason the text doesnt dissappear for the logged in users. What am I doing wrong?

thanks
Reply With Quote
  #2  
Old 07-30-2001, 07:41 PM
Pingu
Guest
 
Posts: n/a
Default

if ($bbuserinfo['userid']!=0) {
$registertext=" ";
means something like: if the visitor already has a userid, then don't display the register link.
Why would you want to display the register link to people who are already registered?

I guess the script works like it should
Reply With Quote
  #3  
Old 07-30-2001, 09:18 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Pingu
if the visitor already has a userid, then don't display the register link.
that is what i am trying to do
Reply With Quote
  #4  
Old 07-30-2001, 10:31 PM
BradC
Guest
 
Posts: n/a
Default

do you have this yet?

PHP Code:
if ($bbuserinfo['userid'] == 0

      
$registertext="<A HREF=\"register.php?s=$session[sessionhash]&action=signup\"><b><font face=\"verdana\" size=\"1\" color=\"red\">Free Registration!</a></b></font>";

else 
{
      
//do nothing cause the member is logged in 
      // or add :
      
$blanketme "<b></b>";
      
$registertext $blanketme;

would have to play with it.. to figure it out.. but I am sure you can.. without any help
Reply With Quote
  #5  
Old 07-30-2001, 10:42 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope, still doesnt work

still shows up no matter what, even if the person is logged in.
Reply With Quote
  #6  
Old 07-30-2001, 10:57 PM
Pingu
Guest
 
Posts: n/a
Default

Completely missed the "diss" in dissappear

Anyway, there's something to be learned from this part:
$unregwelcomemessage='';

in index.php, all the way at the bottom
Reply With Quote
  #7  
Old 07-30-2001, 11:01 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my code finally worked when Brad suggested that I move it to another location inside global.php...
Reply With Quote
  #8  
Old 07-30-2001, 11:01 PM
BradC
Guest
 
Posts: n/a
Default

ok.. auto can post the code used.. but in the global.php file you search and find this line :

// ###################### Referrer Stuff #########################

and right above that... you place the code.. then it will work.. or so it seems

add this above that

PHP Code:
if ($bbuserinfo['userid']!=0) {
    
$registertext=" ";
} else {
    
$registertext="<A HREF=\"register.php?s=$session[sessionhash]&action=signup\"><b><font face=\"verdana\" size=\"1\" color=\"red\">Free Registration!</a></b></font>";
    } 
Great job auto!

it is really a nice hack or addition to the site, especially the way you have it setup and want to set it up
Reply With Quote
  #9  
Old 03-26-2002, 01:50 PM
Rapdis's Avatar
Rapdis Rapdis is offline
 
Join Date: Mar 2002
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i like your registerpopup.js where can i get that?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04574 seconds
  • Memory Usage 2,236KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete