For example like this:
Code: Select all
<__script__ type="text/javascript" src="uploads/jquery.js"></__script>./plugins/function.startExpandCollapse.php
You will have to make som changes here to make it work, replace the function smarty_cms_function_startExpandCollapse with this code.
Code: Select all
function smarty_cms_function_startExpandCollapse($params, &$smarty) {
	global $gCms;
	$config =& $gCms->GetConfig();
	if (!empty($params['id']) && !empty($params['title'])) {
		$id = $params['id'];
		$title = $params['title'];
	} else {
		echo 'Error: The expand/collapse plugin requires that both parameters (id,title) are used.';
		return;
	}
	echo '<span class="expander">'.$title.'</span>';
	echo '<div id="'.$id.'" class="expand">';
}In the head section add this code:
Code: Select all
<__script__ type='text/javascript'>
{literal}
$(document).ready(function(){
	// Just to be sure, hide the forms.
	$(".expand").hide();
	$("span.expander").toggle(
		function () {
			$(this).next().slideDown("slow");
		},
		function () {
			$(this).next().slideUp("slow");
		}
	);
});
{/literal}
</__script>
