Suggestion: Advertisement Admin Panel - Pasting Google AdSense Code
issueid=187 05-01-2011 03:09 PM
Junior Member
Suggestion: Advertisement Admin Panel - Pasting Google AdSense Code
Suggestion for Advertisement Admin Panel

It would be great if some one could enhance the Advertisement Admin Panel to allowing for code pasting for Google AdSense with various option selector layouts through the Main Page or throughout other pages with out having to go into the Global_Header or other areas to paste the code.
Issue Details
Issue Number 187
Issue Type Task
Project WeBid
Category Admin Control Panel
Status Requested
Priority Unknown
Target Version 1.0.0
Completed Version (none)
Milestone (none)
Votes to perform 2
Votes not to perform 2
Assigned Users (none)
Tags (none)




05-01-2011 04:08 PM
Super Moderator
I voted against because adding this code is simple and well explained by Google.

It is a very small edit to make and adding to Admin. is not necessary IMO especially with all the potential ad size variables which would unnecessarily bulk up Admin..

05-01-2011 05:35 PM
Junior Member

05-01-2011 05:38 PM
Junior Member
http://your-toy.com (my website we bid) ,I have a probleme whis buy it now if I buy more than 1 item ,when I whant to pay is just 1 item price

05-01-2011 05:39 PM
Junior Member
I understand. It was just food for thought.

05-01-2011 11:03 PM
Super Moderator
Never a problem and kind of the point of having the forum.

I will say that I actually believe adwords to be a bad idea for many sales sites and certainly for most WeBid auction sites.

Some people don't realize that the ads that will show on your site will be ads for other, potentially competitive, auction sites for the most part. Given that the vast majority of people get far from rich with Adwords I would advice caution.

IMO, Adwords is best suited to a Blog or other type of information site and it's those people who can make a decent amount though I understand it is a very much a rarity. I think Renlok commented once that he was making dimes [10 pences? :) ] here with Adwords.

06-01-2011 01:28 PM
Senior Member
Im working on a mod for this for those who want to add it but havent a clue about code ect. Guess what I voted.. Boxlots right though you would be advertising against your site unless you add alot of differ channels to your google add.



My site

06-01-2011 06:11 PM
Super Moderator
Mmm, not sure how you get around the relevant ads John. It would be good to know for those that do want Google ads on their WeBid sites.

07-01-2011 11:21 AM
Senior Member
Yeah I forgot to put I dont think that will help on the end was late

07-01-2011 03:49 PM
Super Moderator
I guess I just didn't understand the different "channels" reference. Did you mean something like an unrelated Blog in the domain? Curious because I know you know about this kind of stuff.

07-01-2011 04:28 PM
Senior Member
I think but not 100% sure when you create your google add you can pick differ channels for your adds to pick up. Like say a channel for hair products then your add would look for those advertisements on hair products to display to your add. I think thats how it works.

07-01-2011 05:57 PM
Senior Member
Finished the mod uploading now :) but it maybe kind of hard for noobs to install maybe renlok will add it to the next version after boxlot tests it out :)

09-01-2011 06:49 PM
Senior Member
Quote Originally Posted by John
Finished the mod uploading now :) but it maybe kind of hard for noobs to install maybe renlok will add it to the next version after boxlot tests it out :)
eh eh :) i reviewed your source and i have some quastion to u:
1, why just ONLY ONE adsense source will be saving into database (its possible to displaying max 3 adwertise / site)
2,in adsense.php u wrote:

$adsense = $_POST['adsense']; // WHY it is??? u wana seeing nothing in the edited textarea?

and

'ADSENSE1' => $adsense,
well-well
i remaked your source and implemented that into my webidversion085
v085 adsense.php:

<?php
define('InAdmin', 1);
include '../includes/common.inc.php';
include $include_path . 'functions_admin.php';
include 'loggedin.inc.php';

unset($ERR);
// Get adsense code
$adsenseconfirm = 'Insert google adsense codes in textareas';
$queryads = "SELECT adsense1,adsense2,adsense3 FROM " . $DBPrefix . "settings";

$resads = mysql_query($queryads);
$adsensei1 = mysql_result($resads, 0, 'adsense1');
$adsensei2 = mysql_result($resads, 0, 'adsense2');
$adsensei3 = mysql_result($resads, 0, 'adsense3');

if (isset($_POST['submit']) && $_POST['action'] == 'update') {
$adsense1 = $_POST['adsense1'];
$adsense2 = $_POST['adsense2'];
$adsense3 = $_POST['adsense3'];

if (empty($adsense1) AND empty($adsense2) AND empty($adsense3)) {
$adsenseconfirm = 'Insert google adsense code in textarea';
} elseif (!empty($adsense1) OR !empty($adsense2) OR !empty($adsense3)) {
$adsenseconfirm = 'Code submitted';
}
// Update database
$query = "UPDATE " . $DBPrefix . "settings SET
adsense1 = '" . $_POST['adsense1'] . "'"
.", adsense2 = '" . $_POST['adsense2'] . "'"
.", adsense3 = '" . $_POST['adsense3'] . "'";
$system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
$system->SETTINGS['adsense1'] = $_POST['adsense1'];
$system->SETTINGS['adsense2'] = $_POST['adsense2'];
$system->SETTINGS['adsense3'] = $_POST['adsense3'];

$ERR = "Adsense settings updated";
}

$template->assign_vars(array(
'ERROR' => (isset($ERR)) ? $ERR : '',
'ADSENSE1' => $adsensei1,
'ADSENSE2' => $adsensei2,
'ADSENSE3' => $adsensei3,
'ADSENSECONFIRM' => $adsenseconfirm
));

$template->set_filenames(array(
'body' => 'adsense.tpl'
));
$template->display('body');
?>

v085 adsense.tpl:

<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="{SITEURL}style.css" />
</head>
<body style="margin:0;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="{SITEURL}images/bac_barint.gif">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="30"><img src="{SITEURL}images/i_ban.gif" ></td>
<td class="white">{L_25_0011}&nbsp;&gt;&gt;&nbsp;{L__0013}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center" valign="middle">
<table width="95%" border="0" cellpadding="1" bgcolor="#0083D7">
<tr>
<td align="center" class="title">{L__0013}</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<div style="width:75%; float:right;">
<div class="main-box">
<h4 class="rounded-top rounded-bottom">{L_25_0011}&nbsp;&gt;&gt;&nbsp;Google Adsense</h4>
<form method="post" action="" enctype="multipart/form-data">
<!-- IF ERROR ne '' -->
<div class="error-box"><b>{ERROR}</b></div>
<!-- ENDIF -->
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th><label for="adsense">Google Adsense</label></th>
</tr>
<tr>
<td>
{ADSENSECONFIRM}
</td>
</tr>
<tr>
<td>
<textarea id="adsense1" name="adsense1" cols="60" rows="10">{ADSENSE1}</textarea>
</td>
</tr>
<tr>
<td>
<textarea id="adsense2" name="adsense2" cols="60" rows="10">{ADSENSE2}</textarea>
</td>
</tr>
<tr>
<td>
<textarea id="adsense3" name="adsense3" cols="60" rows="10">{ADSENSE3}</textarea>
</td>
</tr>
</table>
<input type="hidden" name="action" value="update">
<input type="submit" value="Add Google Codes" name="submit">
</form>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>

<!-- INCLUDE footer.tpl -->



welll u can check out here, how its works

09-01-2011 07:51 PM
Senior Member
Because kiss.
Second question I wanted to see what was in the textarea incase I wanted to edit it.
If it works for you good share it with the community. Im done with 8.5 and will not be making any mods or themes for it.

09-01-2011 09:05 PM
Super Moderator
I think discussion of the Mod itself should go in the Mod thread.