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:
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
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);
}
}
Closed: won't fix
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.