Advertisment modul - akkor is létrehoz blokkot, ha kikapcsolt a reklám..

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Leírás

Az AD modulnak van egy furcsasága: Hiába nincs bekapcsolva a reklám, ha már egyszer elhelyeztük egy régióban a reklámblokkot, akkor minden esetben kerül bele tartalom. Ez több kavarodást is okozhat.
Az én esetemben az volt a gond, hogy a page.tpl.php-ban a reklámblokk régiójának meglétét kellet volna vizsgálni egy feltételben, hogy a logonak extra classt tudjak adni attól függően, hogy van-e hirdetés a fejlécben, vagy nincs.

Ennyi lett volna a feltétel:

[geshifilter-code]<div id="logo" class="<?php if (!$ad_top): print "no-ad"; ?><?php endif; ?>">[/geshifilter-code]

A kérdés az volt, hogyan tudnánk rávenni a Drupalt, hogy aktív reklám nélkül az $ad_top régió tök üres legyen?

Először az ad.module alapján a theme_ad_display-t kezdtem el babrálni a sminkem template.php-jében, de ez még egy egyszerűbb modul esetében is néha meghaladja a tudásomat, az ad pedig nem az kimondottan egyestés parti..

Kb. akkor akartam feladni, amikor a dorg-on is láttam a témát hónapok óta megoldatlan issue-ként. Itt ugyan egy patch részmegoldást nyújthat, de elég aktív site lesz ahhoz, hogy ne kezdjek ilyesmivel kísérletezni.

Egyetlen szerencsém volt, hogy hirdetés megjelenés típusa "Nyers" volt, és fix időre kiadott hirdetések lesznek, így a cache-sal sem kellett törődni.
Ez azt jelenti, hogy kikapcsolt hirdetésként ilyen tartalommal jelenik meg a blokk:

<!-- No active ads were found in t1 -->

Miután ha megvesztem sem sikerült a reklámot tartalmazó $contentet vizsgálni a page.tpl.php-ban, a block preprocess felé kezdtem keresgélni.

Kíváncsi voltam, hogy egy üres block template-tel hogy viselkedik a régió.

Ez került block preprocessbe:

[geshifilter-drupal6]function SMINKNEVE_preprocess_block(&$vars, $hook) { $block = $vars['block']; if (($block->module == 'ad') && ($block->content == '<!-- No active ads were found in t1 -->')) { $vars['template_files'] = array('empty-block'); } return $vars; }[/geshifilter-drupal6]

Feltöltöttem a smink template könyvtárába egy teljesen üres empty-block.tpl.php nevű file-t, smink gyorstár ürítés, és máris dobtam a hátast: Az $ad_top régióváltozó tök üres volt! Tehát a továbbiakban a page.tpl.php-ban minden további nélkül lehet vizsgálni azt a feltételt, hogy van-e hirdetés, vagy nincs.

Természetesen ez is elég fapados megoldás.. Mindenképpen külön régió kell a hirdetéseknek, és csak a nyers megjelenési formánál működik (mondjuk ezek után csak meg kell nézni a többi forma által generált html-t, és kiegészíteni..), de sajnos azt nem tudom elképzelni egyelőre, hogy több hónapja lezáratlan issue-t oldok meg.

Annyiban tartom jónak ezt a megoldást, hogy legalább page.tpl.php-ban nem generál felesleges html szemetet..

Azért ha valakinek van jobb ötlete, szeretettel várom a kommentek között.

Hozzászólások

I'm gone to say to my little

I'm gone to say to my little brother, that he should also visit this blog on regular basis to get updated from most up-to-date reports.|

It's hard to come by

It's hard to come by knowledgeable people for this subject, but you sound like you know what you're talking about! Thanks|

These are really enormous

These are really enormous ideas in concerning blogging. You have touched some good things here. Any way keep up wrinting.|

My spouse and I stumbled over

My spouse and I stumbled over here coming from a different
website and thought I might as well check things out.
I like what I see so now i am following you.
Look forward to finding out about your web page
for a second time.

This is really interesting,

This is really interesting, You are an excessively professional blogger.
I have joined your rss feed and sit up for in quest of extra of your magnificent
post. Also, I've shared your site in my social networks

Touche. Great arguments. Keep

Touche. Great arguments. Keep up the good spirit.

I don't even know how I ended

I don't even know how I ended up here, but I thought this post
was good. I don't know who you are but definitely you are going to a famous blogger if you are not already ;) Cheers!

Hi my friend! I want to say

Hi my friend! I want to say that this post is awesome,
nice written and come with approximately all important infos.
I'd like to look more posts like this .

Asking questions are really

Asking questions are really good thing if you are
not understanding something entirely, but this paragraph presents good understanding even.

If some one needs to be

If some one needs to be updated with latest technologies after that
he must be pay a visit this site and be up to date everyday.

Hi all, here every person is

Hi all, here every person is sharing these kinds of knowledge, therefore
it's nice to read this blog, and I used to visit this web site daily.

Hmm it appears like your blog

Hmm it appears like your blog ate my first comment (it was extremely
long) so I guess I'll just sum it up what I wrote and say, I'm thoroughly enjoying your blog.
I as well am an aspiring blog writer but I'm still new to the whole thing.
Do you have any suggestions for first-time blog writers? I'd certainly appreciate it.

Its such as you read my

Its such as you read my thoughts! You appear to know a lot about this, like you
wrote the ebook in it or something. I feel that you simply can do with some percent to drive the message house a bit, however other than that, this is magnificent blog.
An excellent read. I will definitely be back.

Please let me know if you're

Please let me know if you're looking for a author for your weblog.
You have some really good posts and I feel I would be a good asset.

If you ever want to take some of the load off, I'd absolutely love
to write some content for your blog in exchange for a link back to mine.
Please blast me an e-mail if interested. Kudos!

I every time used to study

I every time used to study post in news papers but now
as I am a user of net therefore from now I am using net for articles
or reviews, thanks to web.

I'm truly enjoying the design

I'm truly enjoying the design and layout of your site. It's a very easy on the eyes which makes it much more pleasant for me to
come here and visit more often. Did you hire out a designer to create your theme?

Fantastic work!

Generally I don't read post

Generally I don't read post on blogs, however I would like to say that this write-up very pressured me to try and
do so! Your writing style has been surprised me.
Thank you, very nice article.

I every time used to study

I every time used to study article in news papers but now as I
am a user of web thus from now I am using net
for posts, thanks to web.

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

I'm impressed, I have to admit. Rarely do I come across a blog that's equally
educative and amusing, and let me tell you, you have hit the
nail on the head. The problem is something not enough folks are speaking intelligently about.

I'm very happy that I stumbled across this during
my hunt for something relating to this.

Right here is the right

Right here is the right website for anybody who wants to find out about this topic.
You realize a whole lot its almost hard to argue with you (not that I really will need to…HaHa).
You definitely put a fresh spin on a topic which has been written about for many years.
Great stuff, just excellent!

Hi, I do think this is a

Hi, I do think this is a great site. I stumbledupon it ;) I am going to come back once
again since I bookmarked it. Money and freedom is the best
way to change, may you be rich and continue to guide other people.

Hey there! Would you mind if

Hey there! Would you mind if I share your blog with my twitter group?
There's a lot of people that I think would really enjoy your content.

Please let me know. Cheers

Wow, wonderful blog

Wow, wonderful blog structure! How lengthy have you been running a blog for?
you make blogging glance easy. The total look of your website is magnificent,
as well as the content material!

Hello! I know this is

Hello! I know this is somewhat off topic but I was wondering if you
knew where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having problems
finding one? Thanks a lot!

It's in reality a nice and

It's in reality a nice and useful piece of info. I'm satisfied that you just
shared this helpful information with us. Please stay us up
to date like this. Thank you for sharing.

Thanks to my father who

Thanks to my father who stated to me on the topic of this
webpage, this weblog is in fact awesome.

Thanks for ones marvelous

Thanks for ones marvelous posting! I seriously enjoyed reading it, you're a great author.I
will ensure that I bookmark your blog and definitely will come back
from now on. I want to encourage that you continue your great job,
have a nice weekend!

I blog frequently and I

I blog frequently and I really appreciate your content.

This great article has truly peaked my interest. I
will book mark your site and keep checking for new details about once per week.
I opted in for your RSS feed as well.

always i used to read smaller

always i used to read smaller posts which also clear their motive,
and that is also happening with this paragraph which I am reading at this place.

Great blog here! Also your

Great blog here! Also your web site quite a bit up very fast!
What web host are you the usage of? Can I get your associate link for your host?
I desire my site loaded up as fast as yours lol

This is a topic that is close

This is a topic that is close to my heart... Take care! Exactly
where are your contact details though?

Read lots of usefull tips and

Read lots of usefull tips and trick how to win on online casino
here :

https://www.bbd.casino/info_details/cara-menang-baccarat

https://www.bbd.casino/info_details/how-to-register

https://www.bbd.casino/info_details/how-to-deposit

https://www.bbd.casino/info_details/how-to-withdraw

https://www.bbd.casino/info_details/how-to-play-game

https://www.bbd.casino/info_details/how-to-win-online-casino

https://www.bbd.casino/info_details/best-way-to-play-roulette-online

https://www.bbd.casino/info_details/guaranteed-win-online-casino

https://www.bbd.casino/info_details/how-to-win-918kiss-jackpot

https://www.bbd.casino/info_details/best-game-to-play-at-casino

https://www.bbd.casino/info_details/tricks-to-winning-on-slot-machines

https://www.bbd.casino/info_details/malaysia-online-casino-promotion

https://www.bbd.casino/info_details/slot-game-malaysia

https://www.bbd.casino/info_details/online-slots-malaysia

https://www.bbd.casino/info_details/online-betting-malaysia

https://www.bbd.casino/info_details/trusted-online-casino-malaysia

https://www.bbd.casino/info_details/online-gambling-in-malaysia

https://www.bbd.casino/info_details/genting-casino

https://www.bbd.casino/info_details/online-casino-malaysia

https://www.bbd.casino/info_details/best-slot-machines-to-play-2021

https://www.bbd.casino/info_details/best-casino-games-for-beginners

https://www.bbd.casino/info_details/how-are-slot-machines-made

https://www.bbd.casino/info_details/how-do-slot-machine-work

https://www.bbd.casino/info_details/how-to-play-slot-machine-for-beginners

https://www.bbd.casino/info_details/how-to-play-slot-machine

https://www.bbd.casino/info_details/how-to-tell-if-a-slot-machine-is-rea...

https://www.bbd.casino/info_details/how-to-win-at-roulette

https://www.bbd.casino/info_details/how-to-win-online-casino-games

https://www.bbd.casino/info_details/mobile-slot-malaysia

https://www.bbd.casino/info_details/online-gambling-real-money

https://www.bbd.casino/info_details/real-casino-online-malaysia

https://www.bbd.casino/info_details/slot-machine-payout-schedule

https://www.bbd.casino/info_details/how-to-win-roulette-in-real-casino

https://www.bbd.casino/info_details/how-to-win-slot

https://www.bbd.casino/info_details/mobile-casino-pay-with-phone-credit

https://www.bbd.casino/info_details/online-casino-top-up-by-mobile

https://www.bbd.casino/info_details/tricks-to-winning-on-slot-machines-a...

https://www.bbd.casino/info_details/which-slot-machines-pay-the-best-2021

https://www.bbd.casino/info_details/best-online-betting-sites-malaysia

https://www.bbd.casino/info_details/how-to-read-betting-odds

https://www.bbd.casino/info_details/understanding-betting-lines

https://www.bbd.casino/info_details/how-to-read-horse-racing-program

https://www.bbd.casino/info_details/how-to-read-a-horce-racing-form

https://www.bbd.casino/info_details/how-to-be-good-at-poker

https://www.bbd.casino/info_details/how-to-play-fish-table-online

https://www.bbd.casino/info_details/how-to-play-idn-poker-malaysia

Simply desire to say your

Simply desire to say your article is as amazing.
The clarity for your publish is simply excellent and i could suppose you are
a professional on this subject. Fine together with your
permission allow me to take hold of your RSS feed to keep updated with imminent post.
Thanks 1,000,000 and please carry on the enjoyable
work.

hey there and thank you for

hey there and thank you for your info – I've certainly picked up something new from right here.

I did however expertise some technical issues using this web
site, as I experienced to reload the website many times previous to I could get
it to load correctly. I had been wondering if your web
host is OK? Not that I'm complaining, but slow loading instances times will very frequently affect your placement in google and could damage
your quality score if ads and marketing with Adwords.
Well I'm adding this RSS to my e-mail and could look out
for a lot more of your respective exciting content. Make sure you update this again soon.

In fact when someone doesn't

In fact when someone doesn't know afterward its up to other
viewers that they will assist, so here it happens.

Hey there! Would you mind if

Hey there! Would you mind if I share your blog with my zynga group?
There's a lot of folks that I think would really appreciate your content.
Please let me know. Thank you

Hi, for all time i used to

Hi, for all time i used to check webpage posts here in the
early hours in the morning, since i like to gain knowledge of more and
more.

Wonderful article! That is

Wonderful article! That is the kind of info that are meant to be shared
across the internet. Disgrace on the search engines
for not positioning this put up higher! Come on over and
discuss with my website . Thank you =)

We are a group of volunteers

We are a group of volunteers and opening a brand new scheme in our
community. Your web site provided us with helpful information to work on. You have done a
formidable activity and our entire neighborhood will likely be thankful to you.

bookmarked!!, I love your web

bookmarked!!, I love your web site!

I am extremely impressed with

I am extremely impressed with your writing skills as well
as with the layout on your weblog. Is this a paid theme
or did you modify it yourself? Anyway keep up the excellent quality writing,
it's rare to see a nice blog like this one nowadays.

I just like the helpful info

I just like the helpful info you supply in your articles. I will bookmark
your blog and take a look at once more here regularly. I'm quite sure I'll be
informed plenty of new stuff proper right here!
Good luck for the following!

Pretty! This has been an

Pretty! This has been an extremely wonderful post.
Many thanks for providing this info.

Hi there! I know this is

Hi there! I know this is kinda off topic however I'd figured I'd ask.
Would you be interested in exchanging links or maybe guest writing a
blog article or vice-versa? My website discusses a lot of the same topics as yours and I feel we could
greatly benefit from each other. If you are interested feel free to shoot me an e-mail.
I look forward to hearing from you! Awesome blog by the way!

Very good blog! Do you have

Very good blog! Do you have any tips for aspiring writers?
I'm planning to start my own blog soon but I'm a little lost on everything.
Would you propose starting with a free platform like Wordpress or go for a paid option? There are so many choices out there that I'm completely confused ..
Any suggestions? Many thanks!

of course like your web-site

of course like your web-site however you need to check
the spelling on several of your posts. Several of them are rife with spelling problems and I find it very troublesome to inform the reality nevertheless I will surely
come back again.

These are genuinely enormous

These are genuinely enormous ideas in concerning blogging.
You have touched some nice things here. Any way keep up wrinting.

What's up, I check your blogs

What's up, I check your blogs on a regular basis.
Your story-telling style is awesome, keep doing what you're doing!

Hello, i think that i saw you

Hello, i think that i saw you visited my website thus i came to “return the favor”.I am attempting to find things to improve my
web site!I suppose its ok to use a few of your ideas!!

Excellent article. Keep

Excellent article. Keep posting such kind of information on your site.
Im really impressed by your blog.
Hi there, You've performed a great job. I'll definitely digg
it and personally suggest to my friends. I'm confident they will be benefited from this site.

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.