| 11 |
* Module will provide block per key |
* Module will provide block per key |
| 12 |
*/ |
*/ |
| 13 |
|
|
| 14 |
define('TEXTLINKADS_VERSION', '$Id: textlinkads.module,v 1.5.2.1 2007/10/03 17:07:21 greggles Exp $'); |
define('TEXTLINKADS_VERSION', '$Id: textlinkads.module,v 1.5.2.2 2007/11/19 18:08:21 robertDouglass Exp $'); |
| 15 |
define('TEXTLINKADS_MODULE_PATH', drupal_get_path('module', 'textlinkads')); |
define('TEXTLINKADS_MODULE_PATH', drupal_get_path('module', 'textlinkads')); |
| 16 |
|
|
| 17 |
function textlinkads_help($section) { |
function textlinkads_help($section) { |
| 206 |
function textlinkads_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { |
function textlinkads_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { |
| 207 |
switch ($op) { |
switch ($op) { |
| 208 |
case 'load': |
case 'load': |
| 209 |
$q = $_GET['q']; |
// TODO: This is here for Feedvertising |
| 210 |
if ($q == 'rss.xml' || $q == 'node/feed') { |
//$q = $_GET['q']; |
| 211 |
$link = theme('textlinkads_rss_ad', textlinkads_next_rss_ad()); |
//if ($q == 'rss.xml' || $q == 'node/feed') { |
| 212 |
$node->teaser .= $link; |
// $link = theme('textlinkads_rss_ad', textlinkads_next_rss_ad()); |
| 213 |
} |
// $node->teaser .= $link; |
| 214 |
|
//} |
| 215 |
} |
} |
| 216 |
|
|
| 217 |
} |
} |
| 286 |
* theme functions |
* theme functions |
| 287 |
*/ |
*/ |
| 288 |
|
|
| 289 |
function theme_textlinkads_rss_ad($link) { |
//function theme_textlinkads_rss_ad($link) { |
| 290 |
$advertisement = variable_get('textlinkads_advertisement_word', t('Advertisement')); |
// $advertisement = variable_get('textlinkads_advertisement_word', t('Advertisement')); |
| 291 |
return "\n\n$advertisement: {$link['rssbeforetext']} <a href='{$link['url']}'>{$link['rsstext']}</a> {$link['rssaftertext']}"; |
// return "\n\n$advertisement: {$link['rssbeforetext']} <a href='{$link['url']}'>{$link['rsstext']}</a> {$link['rssaftertext']}"; |
| 292 |
} |
//} |
| 293 |
|
|
| 294 |
|
|
| 295 |
function theme_textlinkads_ads($links, $key) { |
function theme_textlinkads_ads($links, $key) { |