4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: ahsancharming on October 08, 2009, 12:55:20 PM
-
can we add any size banner after the first image row? like
rows...
i m a g e s
a d d s
i m a g e s
i m a g e s
1,2,3,4,>>(paging)
-
In categories.php find:
$thumbnails .= "</tr>\n";
$count = 0;
Insert below:
if ($bgcounter == 1)
{
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
$thumbnails .= '
your html code here, can be multiline,
don`t need escape quotes:
<a href="index.php">link</a>
';
$thumbnails .= "\n</td>\n";
$thumbnails .= "</tr>\n";
}
-
Change
if ($bgcounter == 2)
to
if ($bgcounter == 1)
In V@no's code to have the ad after the first row of thumbs
-
fixed, thanks
-
this dosnt work fine for me,i've pasted the code like this
if ($bgcounter == 1)
{
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
$thumbnails .= '
google adsense full code here
<a>
';
$thumbnails .= "\n</td>\n";
$thumbnails .= "</tr>\n";
}
when i uploaded the categories.php file my categories page messed up..i have set 3 images in a row..the google adsense banner appears but the category page was fully messed up. please fix it and let me know
thanx
-
you have extra <a> in the code.
-
super sache...
kann man das auch irgendwie mit dem code von openx zum banner einbinden verwenden...
der code schaut so aus
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'./www/delivery/ajs.php':'http://www.via-ferrata.de/via/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=2");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='./www/delivery/INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='./www/delivery/avw.php?zoneid=2&cb=INSERT_RANDOM_NUMBER_HERE' border='0' alt='' /></a></noscript>
wenn ich das allerdings an die genannte Stelle einfüge erhalte ich:
Parse error: syntax error, unexpected T_STRING in .../categories.php on line 251
was muss ich ändern?
-
Are you trying use javascript code inside php? if so, it's never going to work. Perhaps you need insert that code in cetegories.html template instead.
-
Are you trying use javascript code inside php? if so, it's never going to work. Perhaps you need insert that code in cetegories.html template instead.
Edit...
ok..solved by myself...
I only have to put this part in categories.php
<a href="./www/delivery/INSERT_RANDOM_NUMBER_HERE" target="_blank"><img src="./www/delivery/avw.php?zoneid=2&cb=INSERT_RANDOM_NUMBER_HERE" alt="" /></a>
and the rest of the code in header.html
this works fine now!
BUt one question I have left... can I exclude somehow specific categories??
thank you, v@no!
-
oh, I see now where that code meant to go...my bad :)
I know it's irrelevant now, but the reason you got that error is because in this particular case you have to escape every single-quote in your HTML/JavaScript with a back slash: \'
As of exclude some categories, try replace
if ($bgcounter == 1)
with:
if ($bgcounter == 1 && !in_array($cat_id, array(1,2,3)))
(numbers 1,2,3 are the categories IDs you want to exclude)
-
good morning v@no!
works like a charm!! thank you!! perfect modification!!
:D
-
you have extra <a> in the code.
Hi Vano ,
How are you 8)
When I try to add my adsense code, it doesnt work.
Can you help me? Also I dont have extra <a> in the code. :P
-
Sorry for my English. I refresh the topic.
Adds extensive advertising
It is inserted below the first picture.
How to add advertising to the width of the line?
-
i have the same trouble.
-
I give example:
looks like this:
http://img534.imageshack.us/img534/4495/screen1fi.jpg
is supposed to look like this:
http://img828.imageshack.us/img828/4234/screen2ec.jpg
Please help.
-
....
is supposed to look like this:
...
search in the code: ( http://www.4homepages.de/forum/index.php?topic=26027.msg141892#msg141892 )
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace:
$thumbnails .= "<td colspan=\"".$config['image_cells']."\" valign=\"top\">\n";
mfg Andi
-
....
is supposed to look like this:
...
search in the code: ( http://www.4homepages.de/forum/index.php?topic=26027.msg141892#msg141892 )
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
and replace:
$thumbnails .= "<td colspan=\"".$config['image_cells']."\" valign=\"top\">\n";
mfg Andi
THX :)
-
I have managed to get this working on the index page with new images. Plain text and html code work fine but when I use my own custom language tags {blahblahblah} they do not show up. The language tags work properly when placed in the home template. I am using version 1.7.11. Thank you.
-
Hi!
you must register your custom tags in the categories.php or where ever
$site_template->register_vars("blahbla", $lang['blablub']);
or:
$site_template->register_vars(array(
"blahbla" => $lang['blablub'],
"huhu" => $lang['blubblub'],
"hallo" => $lang['huhu']
));
mfg Andi