Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Amazon Rotator 
 
Hi,

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 and want any Pro take a look at it and correct me if there is any error / bug  

What is this mod?
Spoiler: [ Show ]


Run Tables
Code: [Download] [Hide] [Select]
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 ;



Install Instructions:
OPEN includes/page_header.php
FIND (around line 994)
Code: [Download] [Hide] [Select]
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(

ADD BEFORE
Code: [Download] [Hide] [Select]
  //
  // 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
Code: [Download] [Hide] [Select]
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),

ADD AFTER
Code: [Download] [Hide] [Select]
'AMAZON_1' => $amazon1,
    'AMAZON_2' => $amazon2,
    'AMAZON_3' => $amazon3,


Amazon.rar
Description: Amazon Rotator 
Download
Filename: Amazon.rar
Filesize: 11.15 KB
Downloaded: 144 Time(s)

 



 
xmenfileSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Amazon Rotator 
 
xmenfile wrote: [View Post]
I am not sure, this is a right place to post it, but please correct me if it's in wrong place.


Moved to customization forum
 




____________
~~~ Andrea ~~~
User #379756 on Linux Counter
"If you can't apt-get something, it isn't useful or doesn't exist!!"
 
buldoSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron