4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: kar76 on May 02, 2013, 04:05:46 AM
-
Hello friends
Is there a way to disable-Enable Adsence code or any advertisement code for particular images only through admin control panel? I found some tags which disable or enable particular functions but those tags do that for whole site. But i want for particular pages only.
-
hi kar!
yes that is easily possible.
just build up a custom field for images (https://www.4homepages.de/forum/index.php?topic=30264.0) (e.g. called ads)... this field you can then specifically edit in admin panel as you want.
greetz,
bergblume
-
Hello bergblume :)
First thanks for reply and help
I did what suggested on page "http://www.4homepages.de/forum/index.php?topic=30264.0"
But that isn't working. I put adsense code in text area and it not visible, i think javascript causing problem.
Then i try radio button option instead of text field, for yes/no option. So i created two tags
{if adsense} Show Adsense Code {endif adsense} for yes option
{ifnot adsense} Hide Adsense Code {endifnot adsense} for no option
But i don't know how to link these tags with yes or no option in Control Panel
Can you solve this problem?
-
hi!
it could be that for your adcode the character line is too short...
try VARCHAR( 5000 ) NOT NULL;
instead of VARCHAR( 255 ) NOT NULL;
-
I did what you suggest but its still doesn't work.
------------------------------------------------------------------------------------------
I also did a little trick. I created two text field in CP. In fist filed i put {ifnot adsense}
In second field put {endifnot adsense}
And in my html file did this {image_photograph}Advertisement code{image_photograph2}
But tags not doing their work. I thought its some mistake so i replace {ifnot adsense} , {endifnot adsense}
with some text and those text appeared around advertisement code.
I wonder why tags isn't working.
-
Hi!
Is there always the same adsense code?
mfg Andi
-
Yes, in every page same adsense code.
I use tags around 468x60 advertisement.
I wonder why tags isn't working. I can see adsence code by View Page Source in browser.
Those tags must hide adsence code but only tags hide adsence code appears.
But when i use them directly in html files they hide adsence code.
-
1.) add in your DB:
ALTER TABLE 4images_images ADD image_ads TINYINT(1) DEFAULT '0' NOT NULL
2.) add in db_field_definitions.php :
$additional_image_fields['image_ads'] = array($lang['image_ads'], "radio", 0);
3.) add in lang/main.php:
$lang['image_ads'] = "View Adsence :";
4.) add in your details.html:
{if image_ads}
your ads code....
{endif image_ads}
mfg Andi
-
Its perfect :D
This is what i can say
great help
-
:thumbup:
-
I just realize that its only for images, its not for category
How about category? :)
-
I try above code for categories but no luck, its not working for categories. :(
Does anyone know, how to implement Rembrandt code for categories?
-
Hi!
...Does anyone know, how to implement Rembrandt code for categories?
yes, I myself. :)
http://www.4homepages.de/forum/index.php?topic=31232.0
mfg Andi
-
{if image_ads}
your ads code....
{endif image_ads}
This tag isn't working in multi_popup.html window mode.
I think multi-popup mod belongs to download.php file.
I even try to put conditional tag in download.php but it show enabled code but not disable code.
How to configure download.php so this mode work there too?