Hi H,
I actually started hacking as soon as I had posted.
Seem to have hit a snag I don't quite understand.
Firstly, I must point out I am a hacker, not a coder.
My first and only exposure to PHP started 2 years ago when I first installed OsC for our site.
So far, my methods have served me well and slowly I'm learning, but to think of me as a coder is an insult to real coders.
Ok...so far, I've searched and tried to understand your contribution.
From what I can see, admin/adsense_cc.php serves as an interface between the DB and the user.
It allows us to enter data into the DB and to view same.
I added a new line at line 367 of your original code.
| Code: |
<option <?php if(($show_values) && ($position == ACC_BODY)) echo 'SELECTED'; ?> value="<?php echo ACC_BODY; ?>"><?php echo ACC_BODY; ?></option>
|
I searched this file for any instance of the phrase ACC_HEADER and this was the only place I found it.
As you can see, I've merely duplicated your original line and just changed your original code from HEADER to BODY
Definitions were added in the language file.
So far so good.
Data appears in the DB as it should.(Browsed DB in PhPMyAdmin)
Next, the code for placement in the page(s) appears to merely say...."Use the code in catalog/includes/functions/adsense_cc.php to extract the data from the DB named BODY or HEADER etc and put it all together as Google code here please"
I searched that function and can see no reference to any specific position such as header etc.
I used my admin to create a body ad listing and having changed your page code ad suggested in your last post, I tested it.
No show!
But....Change the page code from BODY to HEADER or FOOTER and the relevant ad for each appears in the correct place in the body.
From my very limited experience, the function appears to not be finding the right line in the DB.
There are no line numbers.
Somewhere, there must be a line that instructs the site to select a particular line.
Presumably in an array somewhere.
But I can't find it.
I've obviously missed something.
One further very small niggle.
I added the code in product_info.php "More Information" line and the end of that table thus....
| Code: |
<tr>
<td align="center" class="smallTextMDBA"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_BREAKER, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<tr>
<td align="center">
<?php
$ads = get_adsense_info(ACC_FOOTER);
$placements = getPlacements($ads);
for($i=0; $i < count($placements); $i++) {
create_ad($placements[$i], $ads);
}
?>
</td>
</tr>
<tr>
<td align="center" class="smallTextMDBA"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
|
Simple....This is HTML.
I'm comfortable here.
So....How come I can't make it obey the align="center" tag???
It's aligning left.
Its always the simple things that stuff me up.
So....H....What have I missed do you think?
Oh....And Happy New Year.
Onwards and forward!
