Hello

I would like to know if there's a way to show certain ads to users according to their interests.
I have created a custom dropdown list user profile which is "interests", and I would like to use it as ads filter.

I could create a group, and then a block, but I wouldn't have any way to filter its display according to user's interests.
I could create a channel as well, but I would have the same problem.

Is there any official approach to this?

Thank you

Comments

gennadiy’s picture

Hi,
I need to get ads ids filtered according to user's interests:
Need to change this code:

case 'tids':
      $result = db_query("SELECT a.aid FROM {ads} a INNER JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IN(%s)", $id);

from function adserve_cache_id($type, $id) in the adcache.inc
into something like this:

$result = db_query("SELECT a.aid FROM {ads} a INNER JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IN(%s) AND a.aid IN(%s)", $id, $filtered_aids);

where $filtered_aids is set of ads ids that corresponds to user's interests for the specific ad group.

The question is: Is anything could be done proper "drupal" way (hooks or anything else) to allow the same results?

TIA,
Gennady

lrwebks’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!