Ok so i have recently posted the integration of vallenato accordion but he sounds to buggy (try resize page and you'll see).
This one is based on the original from jQuery accordion and fix some bugs.
Find in index.php :
[url="http://jqueryui.com/themeroller/"]http://jqueryui.com/themeroller/[/url]. See end of css attachment.
The "à" and "le" are already changed inside the code up. If you speak another language change them.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6629"]accordion.rar[/url]
This one is based on the original from jQuery accordion and fix some bugs.
Find in index.php :
[url="http://jqueryui.com/themeroller/"]http://jqueryui.com/themeroller/[/url]. See end of css attachment.
//Site News
if ($site_config['NEWSON'] && $CURUSER['view_news'] == "yes"){
begin_frame(T_("NEWS"));
$res = SQL_Query_exec("SELECT news.id, news.title, news.added, news.body, users.username FROM news LEFT JOIN users ON news.userid = users.id ORDER BY added DESC LIMIT 10");
if (mysql_num_rows($res) > 0){
print("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>n<ul>");
$news_flag = 0;
while($array = mysql_fetch_assoc($res)){
if (!$array["username"])
$array["username"] = T_('UNKNOWN_USER');
$numcomm = get_row_count("comments", "WHERE news='".$array['id']."'");
// Show first 2 items expanded
if ($news_flag < 2) {
$disp = "block";
$pic = "minus";
} else {
$disp = "none";
$pic = "plus";
}
print("<br /><a href="javascript: klappe_news('a".$array['id']."')"><img border="0" src="".$site_config["SITEURL"]."/images/$pic.gif" id="pica".$array['id']."" alt="Show/Hide" />");
print(" <b>". $array['title'] . "</b></a> - <b>".T_("POSTED").":</b> " . date("d-M-y", utc_to_tz_time($array['added'])) . " <b>".T_("BY").":</b> $array[username]");
print("<div id="ka".$array['id']."" style="display: $disp;"> ".format_comment($array["body"])." <br /><br />".T_("COMMENTS")." (<a href='comments.php?type=news&id=".$array['id']."'>".number_format($numcomm)."</a>)</div><br /> ");
$news_flag++;
}
print("</ul></td></tr></table>n");
}else{
echo "<br /><b>".T_("NO_NEWS")."</b>";
}
end_frame();
}
Replace with :
/**********************************************************************************************/
/* JQUERY ACCORDEON MOD */
/**********************************************************************************************/
if ($site_config['NEWSON'] && $CURUSER['view_news'] == "yes"){
begin_frame(T_("NEWS"));
$res = SQL_Query_exec("SELECT news.id, news.title, news.added, news.body, users.username FROM news LEFT JOIN users ON news.userid = users.id ORDER BY added DESC LIMIT 10");
if (mysql_num_rows($res) > 0){
print('<div id="accordion">');
$news_flag = 0;
while($array = mysql_fetch_assoc($res)){
if (!$array["username"]) $array["username"] = T_('UNKNOWN_USER');
$numcomm = get_row_count("comments", "WHERE news='".$array['id']."'");
print("<h3><a href="#">".$array['title']."</a></h3>");
print("<div class="accordion-content"><br /> ".format_comment($array["body"])."<br /><br /><hr class="accordion-hr"/><p class="accordion-left">".T_("POSTED")." ".T_("BY")." ".$array[username]." à ". date("H:i", utc_to_tz_time($array['added'])) . " le ".date("d/m/Y", utc_to_tz_time($array['added']))."</p><p class="accordion-right"><a href='comments.php?type=news&id=".$array['id']."'>".T_("COMMENTS")." (".number_format($numcomm).")</a></p><br /></div>");
$news_flag++;
}
print('</div>');
}else echo "<br /><b>".T_("NO_NEWS")."</b>";
end_frame();
}
?>
<script>
$( "#accordion" ).accordion({
active: false, collapsible: true, heightStyle: "content", alwaysOpen: false
});
</script>
<?php
In your theme header.php, place this :
<link rel="stylesheet" href="<?php echo $site_config["SITEURL"]; ?>/themes/YOURTHMEGOESHERE/accordion/jquery-ui-1.10.1.custom.css">
<script src="<?php echo $site_config["SITEURL"]; ?>/themes/YOURTHMEGOESHERE/accordion/jquery-1.9.1.js"></script>
<script src="<?php echo $site_config["SITEURL"]; ?>/themes/YOURTHMEGOESHERE/accordion/jquery-ui-1.10.1.custom.js"></script>
Extract the attached file to the root of your current theme.
Done
N.B. :
A) Try formatting that line with your taste. The class="accordion-content" , class="accordion-hr" , class="accordion-left", lass="accordion-right" where added after so if you want to dl another theme but keep the formatting add those classes under your downloaded css
print("<div class="accordion-content"><br /> ".format_comment($array["body"])."<br /><br /><hr class="accordion-hr"/><p class="accordion-left">".T_("POSTED")." ".T_("BY")." ".$array[username]." at ". date("H:i", utc_to_tz_time($array['added'])) . " the ".date("d/m/Y", utc_to_tz_time($array['added']))."</p><p class="accordion-right"><a href='comments.php?type=news&id=".$array['id']."'>".T_("COMMENTS")." (".number_format($numcomm).")</a></p><br /></div>");
The "à" and "le" are already changed inside the code up. If you speak another language change them.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6629"]accordion.rar[/url]
