vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Converting Standard PHP to vBulletin (https://vborg.vbsupport.ru/showthread.php?t=297898)

TheSupportForum 05-07-2013 09:29 AM

Converting Standard PHP to vBulletin
 
hi all i am in need of some help

i have a php file that needs to work with vbulletin 4.2.1

here is my php file content

PHP Code:


$con
=mysqli_connect("localhost","citizens","password","citizens");
// Check connection
if (mysqli_connect_errno())
  {
  echo 
"Failed to connect to MySQL: " mysqli_connect_error();
  }

$color ="#ffffff";
$color3 ="#6CC";
$fontsize ="2";
$color3 ="#69C";

echo 
"<center><table>
<tr>
<td colspan='3' align='center' bgcolor='" 
$color3 "'><strong><a name='Albania' id='Albania'>Albania</a></strong></td>
</tr>
<tr>
<th >CitizenID</th>
<th>Citizen Name</th>
</tr>"
;

$albania mysqli_query($con,"SELECT * FROM `data` WHERE citizenship='Albania' ORDER BY citid ASC");
while(
$row mysqli_fetch_array($albania))
  {

echo 
"<tr>";
echo 
"<td align='center' valign='middle' width='75px' bgcolor='" $color3 "'><font size='" $fontsize "'><a href='http://www.erepublik.com/en/citizen/profile/" $row['citid'] . "' target='_blank'>".$row['citid']."</a></td>";
echo 
"<td align='left' valign='middle' bgcolor='" $color "'><font size='" $fontsize "'>" $row['citname'] . "</td>";
echo 
"</tr>";
  }
echo 
"</table>";
echo 
"<br>";

mysqli_close($con); 

what i want to do is load all this into a template, would need alot of advice and help on this


All times are GMT. The time now is 02:13 AM.

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.01001 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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