In module simpleads we are only support 3 type default: text, image, flash. And in another module we don't have way to define a new type of simpleads. In this case, I thinks we need support another module define new simpleads type, and defined an template for this.
We need change small source code in function: _simpleads_render_ajax_template.

From:

<?php
if ($ad['type'] == 'graphic') {
     
$result .= theme('simpleads_img_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
    elseif (
$ad['type'] == 'text') {
     
$result .= theme('simpleads_text_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
    else {
     
$result .= theme('simpleads_flash_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
?>

To be changed

<?php
   
if ($ad['type'] == 'graphic') {
     
$result .= theme('simpleads_img_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
    elseif (
$ad['type'] == 'text') {
     
$result .= theme('simpleads_text_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
    else if (
$ad['type'] == 'flash'){
     
$result .= theme('simpleads_flash_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class));
    }
    else {
     
$func = $ad['type'] . '_simpleads_display';
      if (
function_exists($func)) {
       
/// allow another module defined new ads type and render this.
       
$result .= $func($ad, $ad_setting, $css_class);
      }
    }
?>
Files: 
CommentFileSizeAuthor
#1 2044263.patch1.14 KBzkday
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2044263.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

zkday’s picture

Issue summary:View changes

change content.

zkday’s picture

StatusFileSize
new1.14 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2044263.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

This is an patch for this. ;)

zkday’s picture

Version:7.x-1.8» 7.x-1.x-dev
zkday’s picture

Status:Active» Needs review

change status,
(sorry because spam).

Status:Needs review» Needs work

The last submitted patch, 2044263.patch, failed testing.

Anonymous’s picture

Issue summary:View changes

change content.

SocialNicheGuru’s picture

this no longer applies

shevgeny’s picture

После применения патча, авторизованным пользователям HTML5-баннеры показываются, но анонимам — нет. В чем дело?