Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
dumb phpinclude error Details »»
dumb phpinclude error
Version: , by The_Cyberdemon The_Cyberdemon is offline
Developer Last Online: Feb 2006 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-30-2003 Last Update: Never Installs: 0
 
No support by the author.

Well, i'm trying to make a quick registration hack (yeah, i know, it's probably been already made), and i see get an error when i put this in my phpinclude:

PHP Code:
if ($bbuserinfo[usergroupid]==1) {
$quickreg "<form action="vb/register.php" method="post">
<input type="
hidden" name="s" value="$session[sessionhash]">

<table cellpadding="
0" cellspacing="0" border="0" bgcolor="#0A293E"  width="95%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0"  width="100%">
<!-- *** -->
<
tr>
    <
td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Register</b></smallfont></td>
</
tr>
<!-- *** -->
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>User Name:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="username" size="5" maxlength="$maxuserlength"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D"><normalfont><b>Password:</b></normalfont></td>
    <
td bgcolor="#13486D"><normalfont><input type="password" class="bginput" name="password" size="5" maxlength="15"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D"><normalfont><b>Enter Password Again:</b></normalfont></td>
    <
td bgcolor="#13486D"><input type="password" class="bginput" name="passwordconfirm" size="5" maxlength="15"></td>
</
tr>
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>Email:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="email" size="5" maxlength="50"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>Enter Email Again:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="emailconfirm" size="5" maxlength="50"></normalfont></td></tr><tr><td align="center"><input type="hidden" name="url" value="http://www.blindedstorms.com">
    <
input type="hidden" name="action" value="addmember">
    <
input type="submit" class="bginput" name="Submit" value="Submit">
    <
input type="reset" class="bginput" name="Reset" value="Reset"></td>
</
tr></table></table></form>";
} else {
$quickreg = "";

after i do that, i get this error at the top of the screen, and some others.

Quote:
Parse error: parse error, unexpected T_STRING in /home/cyber/public_html/vb/global.php(313) : eval()'d code on line 79
Any idea what to do?

Thanks in advance!

-Cyber

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-30-2003, 01:49 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're not escaping any of the quotes.
Reply With Quote
  #3  
Old 03-30-2003, 08:17 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

or in easier words:

change
PHP Code:
$quickreg "<form action="vb/register................</form>"; 
into
PHP Code:
$quickreg '<form action="vb/register................</form>'
(look at the single quotes leading and ending)
Reply With Quote
  #4  
Old 03-31-2003, 12:05 AM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THanks, i'll try that and give you an update.
Reply With Quote
  #5  
Old 03-31-2003, 12:14 AM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay, the error seems to be fixed, but the variable won't show. I put in $quickreg in a portal-block thing, and all that shows up is $quickreg, not all the stuff. I have it as any html block. Any idea what i do?

If it's something like make a new template for the portal-home block, how would i do that and what would i do exactly?
Reply With Quote
  #6  
Old 03-31-2003, 01:23 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you're logged out. Also use $bbuserinfo['usergroupid'], not $bbuserinfo[usergroupid] which is deprecated.
Reply With Quote
  #7  
Old 03-31-2003, 02:14 AM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Make sure you're logged out. Also use $bbuserinfo['usergroupid'], not $bbuserinfo[usergroupid] which is deprecated.
I think you misunderstand the problem. The Variable shows up ($quickreg), not the registration fields. Could just the '' thingy ruin it?

Edit: Tried it and it didn't fix anything. my url is http://www.blindedstorms.com , the block is in the lower left.
Reply With Quote
  #8  
Old 03-31-2003, 03:08 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the php make sure you eval the template...

ie:
PHP Code:
eval( "\$quickreg = \"".gettemplate'template_name_here' ).";" ); 
put that in the php instead of the variable $quickreg...

regards,
g-force2k2
Reply With Quote
  #9  
Old 03-31-2003, 04:48 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't have to eval it, especially because there are no replacements or variables in it from what I can see.
Reply With Quote
  #10  
Old 03-31-2003, 06:39 PM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess i could try the eval thing, but what would the template name be? I'm just putting the variable in a box on the left side of the portal.
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 04:21 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.04542 seconds
  • Memory Usage 2,322KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete