diff options
author | Valérian Saliou <valerian@valeriansaliou.name> | 2015-05-02 12:28:36 +0300 |
---|---|---|
committer | Valérian Saliou <valerian@valeriansaliou.name> | 2015-05-02 12:28:36 +0300 |
commit | 12cb34d153eb946b4ef520044a4d5f770c83c87c (patch) | |
tree | 1e7402da5b0e9757f9008346cd46c2fe05d557e6 | |
parent | adbe842ec291e233ffdec8675306ee830d4ad98a (diff) |
Replace BackLinks content ads (now defunct) w/ DO link
Signed-off-by: Valérian Saliou <valerian@valeriansaliou.name>
-rw-r--r-- | app/images/banners/digitalocean.png | bin | 0 -> 4132 bytes | |||
-rw-r--r-- | i18n/en/LC_MESSAGES/main.pot | 3 | ||||
-rw-r--r-- | server/desktop.php | 8 | ||||
-rw-r--r-- | server/form-main.php | 4 | ||||
-rw-r--r-- | server/functions-advertising.php | 19 | ||||
-rw-r--r-- | server/post-main.php | 8 | ||||
-rw-r--r-- | server/read-main.php | 4 | ||||
-rw-r--r-- | server/vars-main.php | 1 |
8 files changed, 14 insertions, 33 deletions
diff --git a/app/images/banners/digitalocean.png b/app/images/banners/digitalocean.png Binary files differnew file mode 100644 index 00000000..dcfb059c --- /dev/null +++ b/app/images/banners/digitalocean.png diff --git a/i18n/en/LC_MESSAGES/main.pot b/i18n/en/LC_MESSAGES/main.pot index 21aa7f68..d2c7e221 100644 --- a/i18n/en/LC_MESSAGES/main.pot +++ b/i18n/en/LC_MESSAGES/main.pot @@ -2046,9 +2046,6 @@ msgstr "" msgid "Standard ads key" msgstr "" -msgid "Content ads key" -msgstr "" - msgid "AdSense client ID" msgstr "" diff --git a/server/desktop.php b/server/desktop.php index ed9c8a3e..ea31f26b 100644 --- a/server/desktop.php +++ b/server/desktop.php @@ -112,14 +112,16 @@ if(!anonymousMode() && !httpAuthEnabled()) { ?> </div> </div> - <?php if((ADS_ENABLE == 'on') && (ADS_STANDARD || ADS_STANDARD)) { ?> + <?php if((ADS_ENABLE == 'on') && ADS_STANDARD) { ?> <?php require_once('./server/functions-advertising.php'); ?> <?php $advertise_link = 'http://www.backlinks.com/?aff=58769'; ?> <div class="friendsview"> <div class="friends"> <div class="group content"> - <?php displayAdverts('content', $advertise_link); ?> + <a href="https://www.digitalocean.com/?refcode=b1009ddd4c62" target="_blank"> + <img src="<?php echo getFiles($hash, '', 'images', '', 'banners/digitalocean.png'); ?>" alt="" /> + </a> </div> <div class="group standard"> @@ -128,7 +130,7 @@ if(!anonymousMode() && !httpAuthEnabled()) { ?> <span class="sep_bottom"></span> </div> - <?php displayAdverts('standard', $advertise_link); ?> + <?php displayAdverts($advertise_link); ?> </div> <a class="group refer" href="<?php echo $advertise_link; ?>" target="_blank"> diff --git a/server/form-main.php b/server/form-main.php index fe62d8df..f1e2a34f 100644 --- a/server/form-main.php +++ b/server/form-main.php @@ -215,12 +215,10 @@ if($ads_enable == 'on') { <label for="analytics_id"><?php _e("Piwik tracking ID"); ?></label><input id="analytics_id" type="number" name="analytics_id" value="<?php echo $analytics_id; ?>" placeholder="1" min="1" /> </fieldset> -<?php if(($ads_enable == 'on') || $ads_standard || $ads_content) { ?><fieldset><?php } else { ?><fieldset style="display: none;"><?php } ?> +<?php if(($ads_enable == 'on') || $ads_standard) { ?><fieldset><?php } else { ?><fieldset style="display: none;"><?php } ?> <legend><?php printf(T_("Advertising (%s)"), 'BackLinks.com'); ?></legend> <label for="ads_standard"><?php _e("Standard ads key"); ?></label><input id="ads_standard" type="text" name="ads_standard" value="<?php echo $ads_standard; ?>" placeholder="XXXX-XXXX-XXXX" /> - - <label for="ads_content"><?php _e("Content ads key"); ?></label><input id="ads_content" type="text" name="ads_content" value="<?php echo $ads_content; ?>" placeholder="XXXX-XXXX-XXXX" /> </fieldset> <?php if(($ads_enable == 'on') || $gads_client || $gads_slot) { ?><fieldset><?php } else { ?><fieldset style="display: none;"><?php } ?> diff --git a/server/functions-advertising.php b/server/functions-advertising.php index df2f502e..a06c4cc4 100644 --- a/server/functions-advertising.php +++ b/server/functions-advertising.php @@ -14,16 +14,11 @@ Author: Valérian Saliou */ -// Get the adverts for the given advertising type -function getAdverts($type) { +// Get the adverts +function getAdverts() { // Available pages - if($type == 'content') { - $script = 'enginec.php'; - $key = ADS_CONTENT; - } else { - $script = 'engine.php'; - $key = ADS_STANDARD; - } + $script = 'engine.php'; + $key = ADS_STANDARD; // Not available? if(!$key) { @@ -58,10 +53,10 @@ function getAdverts($type) { return $code; } -// Display the adverts for the given advertising type -function displayAdverts($type, $refer) { +// Display the adverts +function displayAdverts($refer) { // Get content ads - $ads_content = getAdverts($type); + $ads_content = getAdverts(); if(strpos(strtolower($ads_content), '</a>')) { echo($ads_content); diff --git a/server/post-main.php b/server/post-main.php index 591e3156..1f4ced1e 100644 --- a/server/post-main.php +++ b/server/post-main.php @@ -191,13 +191,6 @@ if(isset($_POST['ads_standard']) && !empty($_POST['ads_standard'])) { $ads_standard = stripslashes(htmlspecialchars($main_default['ads_standard'])); } -// Advertising (content) -if(isset($_POST['ads_content']) && !empty($_POST['ads_content'])) { - $ads_content = stripslashes(htmlspecialchars(trim($_POST['ads_content']))); -} else { - $ads_content = stripslashes(htmlspecialchars($main_default['ads_content'])); -} - // Google AdSense Client ID if(isset($_POST['gads_client']) && !empty($_POST['gads_client'])) { $gads_client = stripslashes(htmlspecialchars(trim($_POST['gads_client']))); @@ -273,7 +266,6 @@ $conf_xml = <analytics_id>'.$analytics_id.'</analytics_id> <ads_enable>'.$ads_enable.'</ads_enable> <ads_standard>'.$ads_standard.'</ads_standard> - <ads_content>'.$ads_content.'</ads_content> <gads_client>'.$gads_client.'</gads_client> <gads_slot>'.$gads_slot.'</gads_slot> <multi_files>'.$multi_files.'</multi_files> diff --git a/server/read-main.php b/server/read-main.php index a2401b19..4c728e56 100644 --- a/server/read-main.php +++ b/server/read-main.php @@ -43,7 +43,6 @@ $main_conf = array( 'analytics_id' => '', 'ads_enable' => 'off', 'ads_standard' => '', - 'ads_content' => '', 'gads_client' => '', 'gads_slot' => '', 'multi_files' => 'off', @@ -101,7 +100,6 @@ define('ANALYTICS_URL', $main_conf['analytics_url']); define('ANALYTICS_ID', $main_conf['analytics_id']); define('ADS_ENABLE', $main_conf['ads_enable']); define('ADS_STANDARD', $main_conf['ads_standard']); -define('ADS_CONTENT', $main_conf['ads_content']); define('GADS_CLIENT', $main_conf['gads_client']); define('GADS_SLOT', $main_conf['gads_slot']); define('MULTI_FILES', $main_conf['multi_files']); @@ -111,4 +109,4 @@ define('REGISTER_API', $main_conf['register_api']); define('XMPPD_CTL', $main_conf['xmppd_ctl']); define('XMPPD', $main_conf['xmppd']); -?>
\ No newline at end of file +?> diff --git a/server/vars-main.php b/server/vars-main.php index ef3ef551..425e045e 100644 --- a/server/vars-main.php +++ b/server/vars-main.php @@ -42,7 +42,6 @@ $analytics_url = htmlspecialchars(ANALYTICS_URL); $analytics_id = htmlspecialchars(ANALYTICS_ID); $ads_enable = htmlspecialchars(ADS_ENABLE); $ads_standard = htmlspecialchars(ADS_STANDARD); -$ads_content = htmlspecialchars(ADS_CONTENT); $gads_client = htmlspecialchars(GADS_CLIENT); $gads_slot = htmlspecialchars(GADS_SLOT); $multi_files = htmlspecialchars(MULTI_FILES); |