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

Comments

jjeff’s picture

I love this idea. I'm working on a complete rewrite of Similar By Terms based on Views. I will make sure that this type of thing is easy to do with the new module!

jjeff’s picture

I've added a note to the Similar By Terms 2 documentation on how to do this:

See "alternate uses" at the bottom of the Readme file:

http://github.com/jjeff/similarterms

liliplanet’s picture

That is tremendous Jeff!

Just to mention for the advertising capability, the uploaded images need to have a alternative link or external url to click through to, and this following module accomplishes that : http://drupal.org/project/linkimagefield

What would make this an all-rounded advertising system is if somehow we could have statistics by day, week, month etc of the (image node) clicks or times viewed.

In Ubercart this would be a product (as a class), so users pay to create the content and then to automatically expire in 30 days by means of http://drupal.org/project/node_expire

These are just thoughts I had in March last year :) and will test soon as possible.

Lilian

rmiddle’s picture

Status: Active » Closed (fixed)

Fixed in the 2.x branch.