diff --git a/includes/simpleads.helper.inc b/includes/simpleads.helper.inc index 21e4cee..8abc42c 100644 --- a/includes/simpleads.helper.inc +++ b/includes/simpleads.helper.inc @@ -145,8 +145,15 @@ function _simpleads_render_ajax_template($nodes, $tid, $limit, $settings1 = arra elseif ($ad['type'] == 'text') { $result .= theme('simpleads_text_element', array('ad' => $ad, 'settings' => $ad_setting)); } + elseif ($ad['type'] == 'flash'){ + $result .= theme('simpleads_flash_element', array('ad' => $ad, 'settings' => $ad_setting, 'css_class' => $css_class)); + } else { - $result .= theme('simpleads_flash_element', array('ad' => $ad, 'settings' => $ad_setting)); + $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); + } } $count++; } @@ -414,4 +421,4 @@ function _simpleads_theme_attributes_init($vars) { $vars['content_attributes_array'] = array(); $vars['classes_array'] = array(''); return $vars; -} \ No newline at end of file +}