diff --git a/includes/simpleads.helper.inc b/includes/simpleads.helper.inc index cbd3532..5e7df49 100644 --- a/includes/simpleads.helper.inc +++ b/includes/simpleads.helper.inc @@ -147,9 +147,16 @@ 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, 'css_class' => $css_class)); } - else { + elseif ($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); + } + } $count++; } $this_block_settings = _simpleads_adgroup_settings($tid); @@ -503,4 +510,5 @@ function _simpleads_get_node_status($nid) { ->execute() ->fetchField(); return (int)$node_status; -} \ No newline at end of file +} +