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
Torrents images
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2015-04-08 11:38:51
Hello,
 
Before any changes are advised to make a service of your files.
 
Modified files: Yes
 
SQL: No
 
Open your index.php and look for:
 
//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();
}

Add below:

begin_frame("Torrents en Image ");
 
echo '<IFRAME  src="'.$site_config["SITEURL"].'/carroussel.php" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="160"  scrolling="no" align="middle"></IFRAME>';
end_frame();

Put the "carroussel.php" file in the root of your, dice zipper "js" file and put the js folder at the root of your site.Enfin image "arrow.png" in your "images" folder.

Css of this mod is in the php file carousel it will play with the values for a good fit on your sites

result:




[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7207"]carroussel.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7208"]js.zip[/url]
arrow.png
arrow.png
carroussel.php
Download
js.zip
Download
Unknown User
2017-04-06 11:58:39
[ATTACH]2469._xfImport[/ATTACH]



[ATTACH]2469._xfImport[/ATTACH]
Capture.PNG
Capture.PNG
2017-04-06 16:41:34
I tried this and for me it works. Do you get any SQL-Error?

I got this error:

Database Error in carroussel.php on line 217: Unknown column 'safe' in 'where clause'. Query was: SELECT id, name, image1 , seeders,leechers, category, size FROM torrents WHERE banned ='no' AND visible='yes' AND safe='yes' AND image1 <> '' ORDER BY added DESC limit 45.


I change this:

$query="SELECT id, name, image1 , seeders, leechers, category, size FROM torrents WHERE  banned ='no' AND visible='yes' AND safe='yes' AND image1 <> '' ORDER BY added DESC limit 45";


to this:


$query="SELECT id, name, image1 , seeders, leechers, category, size FROM torrents WHERE  banned ='no' AND visible='yes' AND image1 <> '' ORDER BY added DESC limit 45";
Unknown User
2017-04-06 16:48:13
"UFFENO1, post: 94049":
I tried this and for me it works. Do you get any SQL-Error?

I got this error:

Database Error in carroussel.php on line 217: Unknown column 'safe' in 'where clause'. Query was: SELECT id, name, image1 , seeders,leechers, category, size FROM torrents WHERE banned ='no' AND visible='yes' AND safe='yes' AND image1 <> '' ORDER BY added DESC limit 45.


I change this:

$query="SELECT id, name, image1 , seeders, leechers, category, size FROM torrents WHERE  banned ='no' AND visible='yes' AND safe='yes' AND image1 <> '' ORDER BY added DESC limit 45";


to this:

$query="SELECT id, name, image1 , seeders, leechers, category, size FROM torrents WHERE  banned ='no' AND visible='yes' AND image1 <> '' ORDER BY added DESC limit 45";




[size=20px]Hi, thanks. That was the problem.[/size]
Unknown User
2017-04-21 03:14:22
update

[ATTACH]2480._xfImport[/ATTACH]
carroussel.php
Download
Unknown User
2017-04-28 11:22:56
delete this line AND safe='yes'
Unknown User
2020-09-30 07:25:19
Hello,

Before any changes are advised to make a service of your files.

Modified files: Yes

SQL: No

Open your index.php and look for:

[php]
//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();
}
[/php]

Add below:

[php]
begin_frame("Torrents en Image ");

echo '<IFRAME  src="'.$site_config["SITEURL"].'/carroussel.php" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="160"  scrolling="no" align="middle"></IFRAME>';
end_frame();
[/php]

Put the "carroussel.php" file in the root of your, dice zipper "js" file and put the js folder at the root of your site.Enfin image "arrow.png" in your "images" folder.

Css of this mod is in the php file carousel it will play with the values for a good fit on your sites


fix bug carroussel

[php]
<?php
require_once("backend/functions.php");
dbconn(true);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Infinite Carousel</title>
<style type="text/css" media="screen">
<!--
body { font: 1em "Trebuchet MS", verdana, arial, sans-serif; font-size: 100%; }
input, textarea { font-family: Arial; font-size: 125%; padding: 7px; }
label { display: block; }

a:link {color: transparent; text-decoration: underline; border:0; }
a:active {color: transparent; text-decoration: underline; border:0; }
a:visited {color: transparent; text-decoration: underline; border:0; }
a:hover {color: transparent; text-decoration: none; border:0; }

.infiniteCarousel {
   width: 990px;
   position: relative;
}

.infiniteCarousel .wrapper {
   width: 890px; /* .infiniteCarousel width - (.wrapper margin-left + .wrapper margin-right) */
   overflow: auto;
   min-height: 10em;
   margin: 0 40px;
   position: absolute;
   top: -6px;
}

.infiniteCarousel ul a img {
 border: 0px solid #000;
 border-radius: 14px;/* taille coins en rond */
 margin-left: auto;
 margin-right: auto;
 -moz-border-radius:14px;/* taille coins en rond */
 -webkit-border-radius:14px;/* taille coins en rond */
}

.infiniteCarousel .wrapper ul {
   width: 9999px;
   list-style-image:none;
   list-style-position:outside;
   list-style-type:none;
   margin:0;
   padding:0;
   position: absolute;
   top: 0;
}

.infiniteCarousel ul li {
   display:block;
   float:left;
   padding: 8px;
   height: 120px;
   width: 110px;
}

.infiniteCarousel ul li a img {
   display:block;
}

.infiniteCarousel .arrow {
   display: block;
   height: 36px;
   width: 37px;
 background: url(images/arrow.png) no-repeat 0 0;
     text-indent: -999px;
   position: absolute;
   top: 50px;
   cursor: pointer;
}

.infiniteCarousel .forward {
   background-position: 0 0;
   right: 0;
}

.infiniteCarousel .back {
   background-position: 0 -72px;
   left: 0;
}

.infiniteCarousel .forward:hover {
   background-position: 0 -36px;
}

.infiniteCarousel .back:hover {
   background-position: 0 -108px;
}
-->
</style>

<script src="js/jquery.min.js"></script>
<script src="js/overlib.js"></script>

<script type="text/javascript">

(function () {
$.fn.infiniteCarousel = function () {
function repeat(str, n) {
       return new Array( n + 1 ).join(str);
}
     
return this.each(function () {
           // magic!
   var $wrapper = $('> div', this).css('overflow', 'hidden'),
               $slider = $wrapper.find('> ul').width(9999),
               $items = $slider.find('> li'),
               $single = $items.filter(':first')
             
               singleWidth = $single.outerWidth(),
               visible = Math.ceil($wrapper.innerWidth() / singleWidth),
               currentPage = 1,
               pages = Math.ceil($items.length / visible);
             
           /* TASKS */
         
           // 1. pad the pages with empty element if required
if ($items.length % visible != 0) {
               // pad
               $slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
               $items = $slider.find('> li');
}
         
           // 2. create the carousel padding on left and right (cloned)
           $items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));
           $items.filter(':last').after($items.slice(0, visible).clone().addClass('cloned'));
           $items = $slider.find('> li');
         
           // 3. reset scroll
           $wrapper.scrollLeft(singleWidth * visible);
         
           // 4. paging function
function gotoPage(page) {
               var dir = page < currentPage ? -1 : 1,
                   n = Math.abs(currentPage - page),
                   left = singleWidth * dir * visible * n;
             
$wrapper.filter(':not(:animated)').animate({
                   scrollLeft : '+=' + left
}, 500, function () {
                   // if page == last page - then reset position
if (page > pages) {
                       $wrapper.scrollLeft(singleWidth * visible);
                       page = 1;
} else
if (page == 0) {
   page = pages;
   $wrapper.scrollLeft(singleWidth * visible * pages);
}
   currentPage = page;
});
}
         
           // 5. insert the back and forward link
   $wrapper.after('<a href="#" class="arrow back" border=0>&lt;</a><a href="#" class="arrow forward" border=0>&gt;</a>');
         
           // 6. bind the back and forward links
$('a.back', this).click(function () {
               gotoPage(currentPage - 1);
               return false;
});
         
$('a.forward', this).click(function () {
               gotoPage(currentPage + 1);
               return false;
});
         
$(this).bind('goto', function (event, page) {
               gotoPage(page);
});
         
           // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
$(this).bind('next', function () {
               gotoPage(currentPage + 1);
});
});
};
})(jQuery);

$(document).ready(function () {
   // THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
   var autoscrolling = true;
 
$('.infiniteCarousel').infiniteCarousel().mouseover(function () {
       autoscrolling = false;
}).mouseout(function () {
       autoscrolling = true;
});
 
setInterval(function () {
if (autoscrolling) {
           $('.infiniteCarousel').trigger('next');
}
}, 10000);
});

</script>
</head>

<body>
<?php
if($CURUSER) {
   $query="SELECT id, name, image1, seeders, leechers, category, size FROM torrents WHERE  banned ='no' AND visible='yes' AND image1 <> '' ORDER BY added DESC limit 45";
   $result=SQL_Query_exec($query);
   $num = mysql_num_rows($result);
{
?>
 
<div class="infiniteCarousel">
<div class="wrapper">
<ul>
<?php
while($row = mysql_fetch_assoc($result)) {
   $t_name  = substr(htmlspecialchars($row["name"]), 0, 30)."...";
   $res = SQL_Query_exec("SELECT name FROM categories WHERE id=$row[category]");
   $arr = mysql_fetch_assoc($res);
   $cat = $arr["name"];
   $name=$row["name"];
?>

<li>
   <a href="torrents-details.php?id=<?php echo $row["id"]; ?>" target="_top" onmouseover="return overlib('<table width=150 border=1"><tr><td class="tablea"><center><?php echo $name;?><br /><?php echo $cat;?><br /><font color="green"><?php echo $row["seeders"];?></font><font color="black"> Seed\'s /</font> <font color="red"><?php echo $row["leechers"];?></font><font color="black"> Leech\'s</font></center></td></tr>',BORDER, 2, CAPTIONSIZE, '0.5ems', TEXTFONT, 'Times Roman' ,CAPCOLOR, '#FFFF99',FGCOLOR, '#ADCBE7', VAUTO); " onmouseout="return nd();"><img src="uploads/images/<?php echo $row["image1"]; ?>" height="150" width="100"></a>
</li>
<?php } ?>
</ul>      
</div>
</div>

<?php
}
}
?>
</body>
</html>

<?php
?>
[/php]
js.zip
Download
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728