The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
need help with custom mod/hack
hey all,
i'm working on a mod for my vb board. I've created few templates and few php files, i've been able to connect them together. Now on my 1st page, i got a table that lists bunch of links. Now i want to open the information of the selected link in new page and update navbits according to selection. I've setup the $_REQUEST['do'] conditional statement but i don't know how to check which link was selected and update navbits accordingly. Any help would really really appreciate. Here's code for my php file. quran.php Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'quran'); // change this depending on your filename // ################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array( ); // get special data templates from the datastore $specialtemplates = array( ); // pre-cache templates used by all actions $globaltemplates = array( 'quran', 'quran_indexbits', 'quran_displaybits', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); require_once (DIR . '/includes/functions_quran.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $arrayIndex = displayIndex(); unset($index); for ($row = 0; $row < count($arrayIndex); $row++) { $index_col['chpNo'] = $arrayIndex[$row]['chpNo']; $index_col['chpName'] = $arrayIndex[$row]['chpName']; $index_col['verses'] = $arrayIndex[$row]['verses']; eval('$index .= "' . fetch_template('quran_indexbits') . '";'); } if ($_REQUEST['do'] == 'displaysura') { $navbits = array(); $navbits[$parent] = 'Test'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('quran_displaybits') . '");'); } $navbits = array(); $navbits[$parent] = 'Glorious Quran'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('quran') . '");'); ?> quran_indexbits Code:
<tr> <td class="alt1" align="center">$index_col[chpNo]</td> <td class="alt1" align="center"><a href = "quran.php?do=displaysura">$index_col[chpName]</a></td> <td class="alt1" align="center">$index_col[verses]</td> </tr> Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table width = "100%"> <tr> <script type="text/javascript"> //specify path to your external page: var iframesrc="/forums/quran_display.php"; document.write('<td id="frmttr" class=ddl width="50%" height =100% align =right><iframe src="'+iframesrc+'" name="frmTran1" height =100% onload="SetStatus()" enableviewstate =false scrolling=auto frameborder=yes marginheight =0 marginwidth =0 width="100%" bordercolor ="white"></iframe></td>'); document.write('<td id="frmtsc" class=ddl width="50%" height =100% align =right><iframe src="'+iframesrc+'" name="frmTran2" height =100% onload="SetStatus()" enableviewstate =false scrolling=auto frameborder=yes marginheight =0 marginwidth =0 width="100%" bordercolor =white></iframe></td>'); </script> </tr> </table> $footer </body> </html> Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='100%' align='center'> <tr align ="center" > <td class="tcat" colspan="8"><strong>$vbphrase[quran_index_title]</strong></td> </tr> <tr> <td class="thead" align ="center">$vbphrase[quran_chpNo]</td> <td class="thead" align ="center">$vbphrase[quran_chpName]</td> <td class="thead" align ="center">$vbphrase[quran_verses]</td> </tr> $index <tr align ="center"> <td class="tfoot" colspan="8"><div class="smallfont">$vbphrase[quran_footer]</div></td> </tr> </table> $footer </body> </html> nevermind, i figured out myself, thanks though |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|