Advertising by means of Similar Terms

Liliplanet - March 2, 2009 - 10:13
Project:Similar By Terms
Version:6.x-1.9
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm so content .. figured out how a user can automatically create advertising and then select the similar term (country) where their ad will show.

Created a content type called advertisement, added an advertising_image field (image upload). Created an imagecache type called 'advertising' set at 300px (w) by 100px (h).

In similarterms.tpl.php

if ($display_options == 'teaser') {
    foreach ($items as $node) {
      print '<a href="/node/'. $node->nid.'"><img height="100" width="300" title="" alt="" '.theme('imagecache', 'advertising', $node->field_advertising_image[0][filepath]).'</a>';
      print "</li>\n";
    }
  }
}

For when users click on the advertisement, created a node-advertisement.tpl.php and added:

<?php
// We don't ever want to go to the usernode itself. Always redirect to the user page.
drupal_goto("user/$node->uid", NULL, NULL, 301)
?>

This will be available to users as a product in Ubercart with expire.module :)

The problem is that the advertisement (image) does not show on Safari, and possibly other browsers? Seems to be 2 empty image holders.

See the 'Similar Advertising' right block on http://www.filmcontact.com/film-festivals/skin-wins-santa-barbara-intern....

Any suggestions would be greatly appreciated.

Lilian

 
 

Drupal is a registered trademark of Dries Buytaert.