vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Hidden register button Trouble (https://vborg.vbsupport.ru/showthread.php?t=85936)

SsJ8Darkness 01-07-2003 07:28 AM

Hidden register button Trouble
 
I am having trouble with this mod I am making and I dont understand why it is happening..

this is what I am doing:

add to phpinclude:

//regbutton
$regbutton="";
if ($bbuserinfo['userid']<"1") {
$regbutton="<a href="register.php?s=$session[sessionhash]&action=signup"><img src="darkblue/top_register.gif" alt="Registration is free!" border="0"></a>";
}
//end

and adding $regbutton to the header instead of:

<a href="register.php?s=$session[sessionhash]&action=signup"><img src="darkblue/top_register.gif" alt="Registration is free!" border="0"></a>

and I am getting Parse error: parse error in global.php(274) : eval()'d code on line 10

Brad 01-07-2003 07:44 AM

what are you attempting to do, hide it from everyone but the admin or hide it to anyone thats registerd?.

Tony G 01-07-2003 08:10 AM

If your trying to hide it from anyone who's registered, it's been done by SaintDog:

http://www.vbulletintemplates.com/mo...light=register

filburt1 01-07-2003 12:25 PM

FWIW you have to escape your quotes. Rather than making it more complicated by explaining that, just include the HTML in single quotes, not double quotes.

Brad 01-07-2003 12:33 PM

Quote:

Originally posted by filburt1
FWIW you have to escape your quotes. Rather than making it more complicated by explaining that, just include the HTML in single quotes, not double quotes.
If you do know know what hes talking about, use this:

//regbutton
$regbutton="";
if ($bbuserinfo['userid']<"1") {
$regbutton="<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"darkblue/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>";
}
//end

SsJ8Darkness 01-07-2003 06:23 PM

well I was looking for one and never found on so good.. but if I can get mine working it is a diff mod.. slitly.. and I am doing this for a friend so I am not going to release it here

Tony G 01-07-2003 10:01 PM

So are you trying to do what the mod I posted is doing? Or something different?

SsJ8Darkness 01-08-2003 05:39 AM

it is almost the same.. i am designing a style for someone and I didnt know about the mod you posted until now but I am gonna use mine..

Brad 01-08-2003 06:24 AM

try this:

//regbutton
if ($bbuserinfo['userid']=="0") {
$regbutton="<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"darkblue/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>";
} else {
$regbutton="";
}
//end

Nairb 01-08-2003 12:09 PM

You should use usergroups tho...


All times are GMT. The time now is 07:58 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.01203 seconds
  • Memory Usage 1,728KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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