This is a trick that will save you a lot of time if you are creating content.
Dont flame, its intended for newbies. Maybe not total newbies, but... Oh well, just ignore it if you know it already.
(vBulletin nagged me because I havent posted in a long time, so I thought I should share something)
When you get banned from a network, or when you simply want to try something new, you need to change and upload all the new htmls with affiliate code on them. If you are like me, with massive sites, that takes forever. (I'm close to 70 Mb per site, and 80Gb in total)
Try to make a habit of creating things modular, that means "pluggable" and "unpluggable".
Ill explain. In your content creation script, instead of slapping the adsense/affiliate code right in the html, try this:
make a config.php with definitions, something like this (italics means you put your own settings in):
<?php
define('SITE_META_DESCRIPTION', 'Books');
define('SITE_META_KEYWORDS', 'book');
define('ADSENSECHANNEL', '213425');
define('PUB_ID', 'pid-123456778');
?>
Make your creator include the config.php file in every html (add at the very top of the code):
<?php include('config.php'); ?>
and finally make an adsense.php (adsensebanner.php-adsenseblock.php-adsensewhateva.php):
<?php
if (strlen(PUB_ID) > 0) {
if (substr($_SERVER['QUERY_STRING'], -4) == "maxi") {
?>
<script type="text/javascript"><!--
google_ad_client = "<?php echo PUB_ID; ?>";
google_alternate_color = "ffffff";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al";
google_ad_channel ="<?php echo ADSENSECHANNEL; ?>";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000080";
google_color_url = "575757";
google_color_text = "575757";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<?php
}
}
?>
OR you can paste your affiliate code.
This allows you to simply paste:
<?php include('adsense.php'); ?>
into your html, and every time the page is loaded, it will include the adsense code, or the affiliate code.
This helps to easily change pids, affiliate offers, or anything else.
To change meta tags you need something like this in your html files:
<html>
<head>
<title></title>
<meta name="keywords" content="<?php echo SITE_META_KEYWORDS; ?>">
<meta name="description" content="<?php echo SITE_META_DESCRIPTION; ?>">
<link rel="stylesheet" type="text/css" href="etc/stylesheet.css">
</head>
<body>
You can expand this to everything, links, rss, images etc.
In summary, make all your generated htmls load from a single file the data you want, so you only need to change one file every time, instead uploading 50 Mb all over again.
Another trick is to use amazon. The astores and the widgets they provide are modular, meaning they load from amazon (configured by your settings there), instead from your site. If you change a setting there, it will change instantly in all your sites. I am fond of the search widget (not the search box). It fits perfectly below the navigation.
Long post, but I hope it helps.
Dont flame, its intended for newbies. Maybe not total newbies, but... Oh well, just ignore it if you know it already.
(vBulletin nagged me because I havent posted in a long time, so I thought I should share something)
When you get banned from a network, or when you simply want to try something new, you need to change and upload all the new htmls with affiliate code on them. If you are like me, with massive sites, that takes forever. (I'm close to 70 Mb per site, and 80Gb in total)
Try to make a habit of creating things modular, that means "pluggable" and "unpluggable".
Ill explain. In your content creation script, instead of slapping the adsense/affiliate code right in the html, try this:
make a config.php with definitions, something like this (italics means you put your own settings in):
<?php
define('SITE_META_DESCRIPTION', 'Books');
define('SITE_META_KEYWORDS', 'book');
define('ADSENSECHANNEL', '213425');
define('PUB_ID', 'pid-123456778');
?>
Make your creator include the config.php file in every html (add at the very top of the code):
<?php include('config.php'); ?>
and finally make an adsense.php (adsensebanner.php-adsenseblock.php-adsensewhateva.php):
<?php
if (strlen(PUB_ID) > 0) {
if (substr($_SERVER['QUERY_STRING'], -4) == "maxi") {
?>
<script type="text/javascript"><!--
google_ad_client = "<?php echo PUB_ID; ?>";
google_alternate_color = "ffffff";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al";
google_ad_channel ="<?php echo ADSENSECHANNEL; ?>";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000080";
google_color_url = "575757";
google_color_text = "575757";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<?php
}
}
?>
OR you can paste your affiliate code.
This allows you to simply paste:
<?php include('adsense.php'); ?>
into your html, and every time the page is loaded, it will include the adsense code, or the affiliate code.
This helps to easily change pids, affiliate offers, or anything else.
To change meta tags you need something like this in your html files:
<html>
<head>
<title></title>
<meta name="keywords" content="<?php echo SITE_META_KEYWORDS; ?>">
<meta name="description" content="<?php echo SITE_META_DESCRIPTION; ?>">
<link rel="stylesheet" type="text/css" href="etc/stylesheet.css">
</head>
<body>
You can expand this to everything, links, rss, images etc.
In summary, make all your generated htmls load from a single file the data you want, so you only need to change one file every time, instead uploading 50 Mb all over again.
Another trick is to use amazon. The astores and the widgets they provide are modular, meaning they load from amazon (configured by your settings there), instead from your site. If you change a setting there, it will change instantly in all your sites. I am fond of the search widget (not the search box). It fits perfectly below the navigation.
Long post, but I hope it helps.