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

Reply
 
Thread Tools
parameters Details »»
parameters
Version: , by Link14716 Link14716 is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-27-2002 Last Update: Never Installs: 0
 
No support by the author.

I wanna know how to set parameters and get them to work! Here is part of the file I am using.....
Code:
if ($action == "play") {
    if (!$game) {
    $game = tetris;
    }

// Variable copying
$username = $bbuserinfo[username];
$userid = $bbuserinfo[userid];

// If someone tries to input a security code via any method, the no permission page will show
if ($_REQUEST['sec_no']) {
  show_nopermission();
}

// Random security code generation
$lower = 100000000;
$higher = 999999999;
$sec_no = rand($lower, $higher);

// Date var
$date = mktime();

// New record inserted into the database, with new security code
$input_code = $DB_site->query("INSERT INTO arcade (userid, sec_no, game, comment, date) VALUES ('$userid', '$sec_no', '$game', '', '$date')");

// Fetches the high score for use in the game
$scoring = $DB_site->query("SELECT * FROM arcade WHERE game='$game' ORDER BY score DESC LIMIT 1");
$scoring_array=$DB_site->fetch_array($scoring);
$cur_high = $scoring_array['score'];

// Gets the "$game" template
	eval("dooutput(\"".gettemplate('$game')."\");");
It doesn't get the template, so I am guessing that doesn't work

Show Your Support

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

Comments
  #2  
Old 08-27-2002, 02:15 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you make sure that you did the {filename here}.php?s=&action=play in the browser?

regards...

g-force2k2
Reply With Quote
  #3  
Old 08-27-2002, 09:08 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it was. it was simply not calling the templates.
Reply With Quote
  #4  
Old 08-27-2002, 09:29 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have singlequotes around $game this will stop the variable from being changed and it will actually attempt to load the template $game

change them to doublequotes around game so its

"$game" and not '$game'
Reply With Quote
  #5  
Old 08-27-2002, 09:34 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh, see, I'm learning

that is the whole point of making, modding, and installing hacks for me, PHP is cool. Thanks PPN.
Reply With Quote
  #6  
Old 08-27-2002, 09:48 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah thanks PPN... see i leanred someting new too i didn't know the reason why in some files double quotes were used for eval() templates and for other ones single quotes but i think you just helped me in the long run... a question though is there anything wrong with having all the templates incased in double quotes? regards...

g-force2k2
Reply With Quote
  #7  
Old 08-27-2002, 10:21 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its less efficent, php tries to replace all variables in double quotes among other things.

Thats why in vB3 everything uses single quotes where possible in all the coding. You also dont have to escape double quotes within singlequotes.

PHP Code:
$test '<a href="http://www.vbulletin.com/">vBulletin</a>'
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 11:30 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.13263 seconds
  • Memory Usage 2,257KB
  • Queries Executed 20 (?)
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)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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