Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

And how do you make the newest news item to start open. Mine are all collapsed  :

$( "#accordion" ).accordion({

collapsible: true, heightStyle: "content"

});

I have a few local URL links in my news area, but the text is just white like the rest of the news text.

http://stackoverflow.com/questions/332384/jquery-accordion-links-dont-work (Problem solved)

Thanks for feedback  :) ,

It's a fast answer, i'll look later at it when i have more time. Btw don't hesitate to visit jquery api for more details on what you can do with it.
Upload Avatar stuck ? — 2013-03-09 21:56:33 in General Chat
Seems like i can't change my avatar, both upload or via link.  A i the only one in here ?
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.



//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("&nbsp;<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&amp;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 />&nbsp;".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&amp;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 />&nbsp;".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&amp;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]
happy you found problem, you weren't disturbing :)
Thx for code, gonna test it will be easier  :P

edit 1 : css display well on my local website, no border error. (Chrome & IE 10)

- Your css is right, so it might be a html problem. Check from start if everything fit correctly.
If you want to close the first tab when page loads comment those lines :



$('.accordion-header').first().toggleClass('active-header').toggleClass('inactive-header');

$('.accordion-content').first().slideDown().toggleClass('open-content');


in vallenato.js
Salut,

euhm chrome, firefox, ie 6,7,8,9,10 ?

l'erreur d'alignement est minime. Probablement un problème dans le css (les navigateurs n'ont pas la même notions des pixels ...)

Je viens de restester avec l'orignal aucune erreur. (Chrome & FF)

Ok, voila la solution à ton problème :



border: 1px solid #cccccc;

border-top: 0;

-moz-border-radius: 0 0 5px 5px;

-webkit-border-radius: 0 0 5px 5px;

border-radius: 0 0 5px 5px;

Assure toi que ce code soit bien présent dans .accordion-content{} dans le css. Et si il y est mais c'est pas la même chose remplace les lignes correspondantes par celles ci (tjs dans .accordion-content).





--- English



So here is the solution :










border: 1px solid #cccccc;

border-top: 0;

-moz-border-radius: 0 0 5px 5px;

-webkit-border-radius: 0 0 5px 5px;

border-radius: 0 0 5px 5px;





Make sure this code exist in .accordion-content{} inside the css. And if it exist but it ain't the "same" code, replace the lignes with those.
@Jessy explain what you want.. Just play with parameters. (you can find a lot of information about it on google..).

has it something to do with guiro's comment ?

If you speak french don't hesitate to translate what you are asking
don't understand what you mean
yea i edited above its the

à
tag that means à -> change that tag with "at" and the "le" as "the"

(haven't read your edit)
yea you are wrong there, that way it should work :



//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("<div id="accordion-container">");

 $news_flag = 0;

May you post your code please. So i can look at it.
Hi so i post here my first mod  :ph34r:

Info : This mod allows you to have an accordion-like news reader (pictures are down)

Disclaimer : - I don't did the accordion by myself i used one provided by Switchroyale and integrated it.

- Tested it on v2.08 -> fully compatable

- There is some text in french inside it, (think there is a "le" & a "à", on same line as comments) ; change "le" to "the" and "à" to "at"

Edit :  [url="https://www.torrenttrader.org/index.php?/topic/17646-mod-better-jquery-news-accordion/"]https://www.torrenttrader.org/index.php?/topic/17646-mod-better-jquery-news-accordion/[/url]

Installation :

Go to index.php find :



if ($site_config['NEWSON'] && $CURUSER['view_news'] == "yes"){

Under






if (mysql_num_rows($res) > 0){






Replace this line :







print("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>n<ul>");






with this one :







print("<div id="accordion-container">");






Remove this while loop and the print after his end " } " :







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 < 1) {

$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("&nbsp;<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&amp;id=".$array['id']."'>".number_format($numcomm).")</a></div><br /> ");

$news_flag++;

}

print("</ul></td></tr></table>n");








Now paste this loop instead :









while($array = mysql_fetch_assoc($res)){

if (!$array["username"])

$array["username"] = T_('UNKNOWN_USER');

$numcomm = get_row_count("comments", "WHERE news='".$array['id']."'");

print("<h2 class="accordion-header"><span>".$array['title']."</span></h2>");

print("<div class="accordion-content"><br />&nbsp;".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&amp;id=".$array['id']."'>".T_("COMMENTS")." (".number_format($numcomm)."</a>)</p><br /></div>");

$news_flag++;

}

print("</div>");






In your themes/NB-TT-3c upload the attached file vallenato (i edited the css to fit with the design, the NB-TT theme, which is in my point of vue very nice) :



Now in the header.php  paste those line inside the <head> tag :







<script src="<?php echo $site_config["SITEURL"]; ?>/themes/NB-TT-3c/vallenato/jquery-latest.js" type="text/javascript"></script>

<script src="<?php echo $site_config["SITEURL"]; ?>/themes/NB-TT-3c/vallenato/vallenato.js" type="text/javascript"></script>

<link rel="stylesheet" href="<?php echo $site_config["SITEURL"]; ?>/themes/NB-TT-3c/vallenato/vallenato.css" type="text/css" media="screen">




if you use another theme, folder, aso.. think about renaming the path.





N.B. To download the original &/or see it in action :  [url="http://www.switchroyale.com/vallenato/"]http://www.switchroyale.com/vallenato/[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6457"]vallenato.rar[/url]
shoutbox banned — 2013-01-06 18:26:07 in v2.08 Mods Completed
Thanks a lot :

one closed tag missing



<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32" alt=""/><br />Punished Users</a><br /></td>

latest little bug : when clicking "info" on the password recover frame the text doesn't appear
Hi tanks for that nice mod !

A little bug when showing an error : when clicking on the cross of the error box, it disapear but the text "the cookies must be activated..." slip under de blue box "login".

Another issue (which isn't really one) : is about the comment from articwolf who explain how to force to go on that page for unlogged users. But i have like half a second showing the normal index before being redirected to that page, a way to force it directly  ? (guess not since it's a redirect)

For french users : the php from the comments above aint really french since it's "google translated :-/ "
Thanks a lot for your mod,  here is the French translation of your english language block :



// Mode Don

$LANG["THANKS_YOU_DONATE"] = "Merci de visiter la page des donations";

$LANG["SUPPORT_DON"] = "Si vous aimez le tracker aidez-nous à le maintenir en vie";

$LANG["DONATE"] = "Faire un don";

$LANG["AND_RECEIVE"] = "Et vous recevrez";

$LANG["WEEKS"] = "Semaines";

$LANG["WEEKS_FREE_DL"] = "Semaines de Téléchargement Gratuit";

$LANG["GB_CREDITS_UP"] = "GB Crédits d'Upload";

$LANG["INVITES_SITE"] = "Invitations sur notre site";

$LANG["STATUS"] = "Status";

$LANG["PM_ADMIN_DON"] = "Si vous ne recevez rien après un don envoyez nous un message";

$LANG["HERE"] = "ICI";

$LANG["CONFIRMED_ACCOUNT"] = "pour confirmation et mise à niveau de votre compte";

$LANG["-IMPORTANT-"] = "- IMPORTANT -";
Thanks a lot, works perfectly
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728