This is my first mod that I installed and adapt to 1.2.0.27 IP. I am not sure, this is a right place to post it, but please correct me if it's in wrong place. I want to share with anyone interest in it


What is this mod?
Spoiler: [ Show ]
Run Tables
CREATE TABLE `phpbb_amazon1` (
`amazon1_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon1_description` TEXT,
`amazon1_code` TEXT,
PRIMARY KEY ( `amazon1_id` )
) TYPE = MYISAM ;
CREATE TABLE `phpbb_amazon2` (
`amazon2_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon2_description` TEXT,
`amazon2_code` TEXT,
PRIMARY KEY ( `amazon2_id` )
) TYPE = MYISAM ;
CREATE TABLE `phpbb_amazon3` (
`amazon3_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon3_description` TEXT,
`amazon3_code` TEXT,
PRIMARY KEY ( `amazon3_id` )
) TYPE = MYISAM ;
`amazon1_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon1_description` TEXT,
`amazon1_code` TEXT,
PRIMARY KEY ( `amazon1_id` )
) TYPE = MYISAM ;
CREATE TABLE `phpbb_amazon2` (
`amazon2_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon2_description` TEXT,
`amazon2_code` TEXT,
PRIMARY KEY ( `amazon2_id` )
) TYPE = MYISAM ;
CREATE TABLE `phpbb_amazon3` (
`amazon3_id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`amazon3_description` TEXT,
`amazon3_code` TEXT,
PRIMARY KEY ( `amazon3_id` )
) TYPE = MYISAM ;
Install Instructions:
OPEN includes/page_header.php
FIND (around line 994)
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(
ADD BEFORE
//
// BEGIN AMAZON #1
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon1 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code1 = $row["amazon1_code"];}
# If it failed, give it defaults
else{
$code1 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon1 = "$code1";
# End of variable setting!
################################################################################
//
// END AMAZON #1
//
//
// BEGIN AMAZON #2
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon2 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code2 = $row["amazon2_code"];}
# If it failed, give it defaults
else{
$code2 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon2 = "$code2";
# End of variable setting!
################################################################################
//
// END AMAZON #2
//
//
// BEGIN AMAZON #3
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon3 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code3 = $row["amazon3_code"];}
# If it failed, give it defaults
else{
$code3 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon3 = "$code3";
# End of variable setting!
################################################################################
//
// END AMAZON #3
//
// BEGIN AMAZON #1
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon1 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code1 = $row["amazon1_code"];}
# If it failed, give it defaults
else{
$code1 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon1 = "$code1";
# End of variable setting!
################################################################################
//
// END AMAZON #1
//
//
// BEGIN AMAZON #2
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon2 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code2 = $row["amazon2_code"];}
# If it failed, give it defaults
else{
$code2 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon2 = "$code2";
# End of variable setting!
################################################################################
//
// END AMAZON #2
//
//
// BEGIN AMAZON #3
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb_amazon3 ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$code3 = $row["amazon3_code"];}
# If it failed, give it defaults
else{
$code3 = ("Data Unavailable");}
# End of variable setting
################################################################################
# Give the variable the code
$amazon3 = "$code3";
# End of variable setting!
################################################################################
//
// END AMAZON #3
//
FIND
ADD AFTER
'AMAZON_1' => $amazon1,
'AMAZON_2' => $amazon2,
'AMAZON_3' => $amazon3,
'AMAZON_2' => $amazon2,
'AMAZON_3' => $amazon3,
Amazon.rar | ||
Description: | Amazon Rotator | ![]() Download |
Filename: | Amazon.rar | |
Filesize: | 11.15 KB | |
Downloaded: | 168 Time(s) |