Closed (outdated)
Project:
Advertisement
Version:
6.x-2.x-dev
Component:
ad_embed module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 May 2009 at 19:39 UTC
Updated:
19 Sep 2024 at 11:33 UTC
Jump to comment: Most recent
Comments
Comment #1
virtualdrupal commentedHi I'm having the same issue, I have a page themed specifically for a newsletter, with all styles inline and absolute paths to all images, I have some ad's hard themed into the page, but since they are called with javascript, the newsletter can't create the ad's...
I need the code to generate just a regular hard coded image tag inside an , like what the browser ultimately creates using javascript
Like this...
I tried changing the method to raw, but it still uses javascript to create the ad... is there a workaround we can use for newsletter integration?
Thanks for your time, this module is otherwise PERFECT
Comment #2
jeremy commentedRemote ads are always displayed with JavaScript so that the ads change each time the "page" is displayed. If you want to use the raw method to display ads, then the same ad will always be displayed in the same place whenever the newsletter is displayed. If this is what you want, locally display the ads in raw mode then cut and paste the resulting HTML into your newsletter -- does that give you what you're looking for?
Comment #3
moropo commented...the resulting HTML contains javascript calls, and this situation is not suitable for email newsletters. I'm taking gregarios idea from here: What if we could put some code like this
to invoke a specific ad on my site?
Is there a workaround for this? Or another module that can accomplish this?
I have a website with advertising in the pages different from the ads that ships with the email newsletters. This GREAT module fulfills all my needs, with the only exception that the advertising are not showing up in the email newsletters due to the need of javascript to serve the ad.
Comment #4
mikeefreedom commentedHi,
I've managed to embed ads in a simplenews newsletter using a combination of the following :
* CCK node reference field
* phptemplate_preprocess_simplenews_newsletter_body() function
* editing the simplenews-newsletter-body.tpl file
I ran in to problem attempting to serve the ad via any of the proper methods i.e. :
$variables['ad_top'] = ad(NULL, 1, array('nids' => $variables['node']->field_ad_468x60[0]['nid'], 'ad_display' => 'raw', 'cache' => 'none'));
Didn't work for me. Instead I had to include the image manually with something like :
$ad = node_load($variables['node']->field_ad_468x60[0]['nid']);
$variables['ad_top'] = sprintf(
'%3$s',
$ad->redirect,
$ad->tooltip,
$ad->ad
);
Not brilliant but does the job.
Using the former method worked for all other ad_display types (e.g. jquery, javascript, etc) none of which can be utilised in a newsletter. I did find why the raw method wouldn't work but it proved too much of a rewrite of core module code.
If you want more code examples of how I managed it let me know.
Comment #5
virtualdrupal commentedWow I posted this problem a year ago and fortunately never HAD to have the functionality until now, and here you've solved it for me. If it works (and based on how you described it I think it will), you've totally made my day/week/month.. PLEASE post any working code examples that you have, thank you thank you.
Comment #6
sersim commentedThank you fr33dom!
It seems that the ads are displayed only once.
Simplenews uses cron.php to send newsletters.
The second time an ad is going to be displayed it is not validated by adserve_cache_validate() in adserve.inc because its node id is in the $displayed array.
What I think the developer should do is to find a way to reset the static $variables used in adserve_variable() when ad() is called.
Comment #7
anonymous07 commentedSubscribe
Comment #8
steno commentedSubscribe
Comment #9
salientknight commentedIs there a solution for this yet?
Comment #10
lrwebks commentedDrupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!