How about an option to show advert block based on taxonomy term(s); no match, no show.
There are a number PHP snippets that might do this, and the Block term module, but they all require a knowledge of PHP. For example, see:
- Show block by taxonomy term - Drupal 4.7
- Overview-approach to block visibility and then scroll down to the comment: "Visibility set to TRUE based on taxonomy term OR url"
Comments
Comment #1
jeremy commentedAd groups are taxonomy terms. If you want to show ads by taxonomy, just pass in the appropriate tid when calling ad() (or use the ad_embed module if you don't want to use a PHP block). This should work with ad groups as well as with other taxonomy terms.
Comment #2
iantresman commentedCan you give an example of how and where I might do this for one of my own existing taxonomical terms in an advert block? I assume that tid is the taxonomical ID, but I don't know where and how I would pass this when called ad().
Comment #3
jeremy commentedPlease review README.txt for more details.
If you want to display ads with a tid of 76, then you'd simply call ad(76); If you want to display ads from multiple tids, then you'd call something like ad('76,94,123');
Comment #4
iantresman commentedThanks for that, very useful, but I think we're discussing slightly different taxonomical issues here. If I understand it correctly (and I could be wrong, in which case, my apologies):
For example, if my Drupal news site displayed a music story with a "music" category term, then I might want to show a music-related advert (ie. the block displays only when the "music" term is showing).
And this is my suggested feature request, an option to show an advert block, only when my own specific taxonomical terms are showing, either:
Comment #5
jeremy commentedI wonder if this functionality could be built using the views module? If so, this feature request would probably be better applied against the ad_views project.
Comment #6
jeremy commentedRe-assigning to the ad_views project, which still needs an owner.
Comment #7
milesgillham commentedAt present the ad_views module is intended to be a 'vanilla' implementation of exposing views into the ads tables and fields. I'm going with 'won't fix' due to the age of this, but happy for this to be reopened if still a requirement not satisfied in any other obvious way.
Cheers,
Miles