vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   linking: A noob question. -_-; (https://vborg.vbsupport.ru/showthread.php?t=60879)

Red Blaze 01-28-2004 08:21 PM

linking: A noob question. -_-;
 
I'm gonna keep updating this thread with questions so I won't have to make a new one, so here's my first noob question.

I'm trying to learn PHP, so without leaving the php file, how can you link? Example, you're here

Quote:

forum/memberlist.php?
I then click on a letter, and you don't leave memberlist.php, but you get a new page.

What I want in my situation is, I have a review page, and I have a list of games. I click on a game and I don't want to leave the review page, but I get a new page of a review of the game I clicked. Is any of this making sense?

mr e 01-29-2004 03:32 AM

You'd use regular HTML with target="_blank"

ex: <a href="./forum/memberlist.php?" target="_blank">Link</a>

g-force2k2 01-29-2004 08:08 AM

Sonikku,

You have to eval different templates.

for example you have the games sonic_heroes and sonic adventures

You would create php code like this:

PHP Code:

$defaultgame "sonicbattle2" ;
if ( empty ( 
$game ) ) :
    
$game $defaultgame ;
endif ;

    eval ( 
"\$gametemplate = \"" gettemplate $game ) . "\" ;" ) ;

eval ( 
"dooutput ( \"" gettemplate "game_review" ) . "\" ) ;" ) ;
exit ; 

Then to link the games you would have links like:

Code:

<a href="gamereview.php?game=sonic_heroes">Sonic Heroes</a>
<a href="gamereview.php?game=sonic_adventure">Sonic Adventure</a>

This is on the assumption that each review has its own template and that the game_review template is the base template in the php file gamereview.php

Hope that helps somewhat.

Cheers,
g-force2k2

Red Blaze 02-04-2004 08:20 PM

Thanks g-force2k2, but I was able to find an easier code. ^_^ Now I want something different. I have 2 banner ads and I want to rotate them every time the page loads. I tried Mists rotating banner, but that one couldn't link to the sites (they're affiliates). Help?


All times are GMT. The time now is 07:47 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.03338 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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