Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Trader (http://www.bvlist.com/forumdisplay.php?f=29)
-   -   torrents-upload.php (http://www.bvlist.com/showthread.php?t=5892)

dumorim 7th January 2011 19:43

torrents-upload.php
 
I would like to know how to add these boxes in torrents-upload.php

http://img687.imageshack.us/img687/535/imagen1fl.png

daffy 7th January 2011 20:11

there is alot more to it than just adding them to torrent-upload.php, you need sql and to edit torrent-edit.php and torrent-details.php etc... its more of a modification, the scripts are alread made for these if you search dude.

dumorim 7th January 2011 21:34

ok
 
thank you for answering most sought here found nothing more you can post the link or even speak the name of this mod that does that would be very grateful

");
add after:

Code:

// screenshots //
print ("
");
print ("
");
print ("
");
print ("
");
//screenshots //

find in torrents-edit.php:

Code:

$updateset[] = "name = " . sqlesc($name);
add after:

Code:

///screenshot
    $updateset[] = "screens1 = " . sqlesc($screens1);
    $updateset[] = "screens2 = " . sqlesc($screens2);
    $updateset[] = "screens3 = " . sqlesc($screens3);
    $updateset[] = "screens4 = " . sqlesc($screens4);
    ///screenshot end

now find:

Code:

echo "
";
add after:

Code:

///screenshots
echo "
";
echo "
";
echo "
";
echo "
";
///screenshots

no find in torrents-details.php:

Code:

torrents.name,
add directly after:

Code:

torrents.screens1, torrents.screens2, torrents.screens3, torrents.screens4,
now find:

Code:

if ($row["image1"] != "" OR $row["image2"] != "") {
  if ($row["image1"] != "")
    $img1 = "";
  if ($row["image2"] != "")
    $img2 = "";
  print("
". $img1 . "&nbsp&nbsp" . $img2."

");
}

add after:

Code:

echo "

";
if ($row["screens1"] != "" OR $row["screens2"] != "" OR $row["screens3"] != "" OR $row["screens3"] != "") {
  if ($row["screens1"] != "")
    $screens1 = "";
  if ($row["screens2"] != "")
    $screens2 = "";
if ($row["screens3"] != "")
    $screens3 = "";
  if ($row["screens4"] != "")
    $screens4 = "";
  print("
". $screens1 . "&nbsp&nbsp" . $screens2 ."

");
  print("
". $screens3 . "&nbsp&nbsp" . $screens4 ."

");
}

now find in functions.php:

Code:


add after:

Code:


now find:

Code:

if ($row["nfo"]=='yes') {
            print("
");
        }else{
                print("
");
        }

add after:

Code:

$simg = @mysql_fetch_array(@mysql_query("SELECT screens1, screens2, screens3, screens4 FROM torrents WHERE id=$id"));
                $simg1 = $simg[screens1];
                $simg2 = $simg[screens2];
                $simg3 = $simg[screens3];
                $simg4 = $simg[screens4];
                $screens1 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens1!=''"));
                $screens2 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens2!=''"));
                $screens3 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens3!=''"));
                $screens4 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens4!=''"));
                $screenstotal = $screens1 + $screens2 + $screens3 + $screens4;
                if ($simg["screens1"]!=''){
                print("
\n");               
                }else{
                print("
\n");
                }

now if you do not have the overlib already on your site then add this to your header.php for every theme you use it goes between the and :

Code:


also upload the file below to the default folder in your themes folder

and add the screens.php to your root folder

I hope I did not forget anything enjoy :D

http://i214.photobucket.com/albums/c...creenshot1.png

http://i214.photobucket.com/albums/c...creenshot2.gif

http://i214.photobucket.com/albums/c...creenshot3.gif
daffy 8th January 2011 22:50

all credit goes to walker1977
So this one has been in the premium section for about 2 years now so i decided it is time for the normal users to enjoy it and maybe build on it.


Ok I got the idea from the IMDB mod. some torrents have screenshots so this lets your uppers up them with the torrent to display in the torrent details and to display in the torrent tables with the ballon mod.

sql:

Code:

ALTER TABLE `torrents` ADD `screens1` LONGTEXT NOT NULL;
ALTER TABLE `torrents` ADD `screens2` LONGTEXT NOT NULL;
ALTER TABLE `torrents` ADD `screens3` LONGTEXT NOT NULL;
ALTER TABLE `torrents` ADD `screens4` LONGTEXT NOT NULL;

find in torrents-upload.php:

Code:

$descr = unesc($_POST["descr"]);

    if (!$descr)
        $descr = "No description given.";

add above it:

Code:

///screenshot
        $screens1 = unesc($_POST["screens1"]);
        if (!$screens1)
        $screens1 = "";

        $screens2 = unesc($_POST["screens2"]);
        if (!$screens2)
        $screens2 = "";

        $screens3 = unesc($_POST["screens3"]);
        if (!$screens3)
        $screens3 = "";

        $screens4 = unesc($_POST["screens4"]);
        if (!$screens4)
        $screens4 = "";
        ///screenshot

Code:

now find:
Code:

$ret = mysql_query("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang) VALUES (".sqlesc($fname).", '".$uploaderid."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$type."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."')");
in this query you need to add a few things:

directly after:

Code:

name,
add:

Code:

screens1, screens2, screens3, screens4,
now still in the same query directly after:

Code:

".sqlesc($name).",
add:

Code:

".sqlesc($screens1).", ".sqlesc($screens2).", ".sqlesc($screens3).", ".sqlesc($screens4).",
now find:

Code:

print ("
" . NFO . ": \n
Screenshot 1:
\n
Screenshot 2:
\n
Screenshot 3:
\n
Screenshot 4:
\n
Name:
Screenshot 1:
Screenshot 2:
Screenshot 3:
Screenshot 4:
NFO Screens -

Screen Shots:


', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\">" . $screenstotal . "

Screen Shots:


Sorry no screens available
', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\">" . $screenstotal . "

rouxlas 22nd January 2011 10:46

where is the file??


All times are GMT +2. The time now is 16:18.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.