Forums Logo
 
Reply to this topicStart new topic
> Torrents Page v2, a torrents page which lists the torrents :)
Farjad
post Jun 30 2006, 11:38 PM
Post #1


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



Torrents v2

Tested & Working & The best I could have done
The code also includes top 5 torrents by peers

Upload the 2 Files:
torrents.php -> sources/action_public/
lang_torrents.php -> cache/lang_cache/en/

Open index.php

Find:
CODE
                 "online"     => array( "online"             , 'online'       , array() ),


Add under:
CODE
                 "torrents"    => array( "torrents"            , 'torrents'      , array() ),


Add new skin:
(Go to any of the skins and click Add Template)

Name: torrents
Variables: $top5_torrents="",$all_torrents="",$pagenav=""
Create New Group: torrents (skin_torrents)

Template Data:
CODE
<table cellspacing="0" width="100%">
    <tr>
<p>
<td valign="top" class="nopad" width="100%">
<div id="ucpcontent">
<div class="maintitle">Torrents</div>
<div class="borderwrapm"><div class="postlinksbar">Top 5 Torrents</div><table width='100%' cellspacing='1' cellpadding='5' align='center' border='0'>
            <tr>
                <th align="left" class="formsubtitle" width="30%">Forum</th>
                <th align="left" class="formsubtitle" width="30%">Torrent</th>
                <th align="center" class="formsubtitle" width="10%">Size</th>
                <th align="center" class="formsubtitle" width="6%">Se.</th>
                <th align="center" class="formsubtitle" width="6%">Le.</th>
                <th align="center" class="formsubtitle" width="6%">Co.</th>
                <th align="center" class="formsubtitle" width="6%">Files</th>
                <th align="center" class="formsubtitle" width="16%">Added</th></tr>
{$top5_torrents}
</table></div>
<div class="borderwrapm"><table width='100%' cellspacing='1' cellpadding='5' align='center' border='0'>
            <tr>
                <th align="left" width="30%">Forum</th>
                <th align="left" width="30%">Torrent</th>
                <th align="center" width="10%">Size</th>
                <th align="center" width="6%">Se.</th>
                <th align="center" width="6%">Le.</th>
                <th align="center" width="6%">Co.</th>
                <th align="center" width="6%">Files</th>
    
                <th align="center" width="16%">Added</th></tr>
{$all_torrents}

</table></div>
&nbsp;&nbsp;{$pagenav}
<br /><br />
</div>
</td>
    </tr>
</table>
<div align='center' class='copyright'><a href='http://ipbtracker.eu'>IPBTracker</a> - Torrents v2 &copy; 2006 - 2008 , Coded by <a href='http://farjad.net'>Farjad</a></div>



Add new skin:
(Go to any of the skins and click Add Template)

Name: torrent_rows
Variables: $r
Skin Group: skin_torrents

Data:
CODE
<tr><td align="left" class="row2"><a href='{ipb.script_url}showforum={$r['forumid']}' style="text-decoration: underline;">{$r[forum_name]}</a></td>
<td align="left" class="row2"><a href='{ipb.script_url}showtopic={$r['topic_id']}' style="text-decoration: underline;">{$r['attach_file']}</a><br />{$r['title']}</td>
<td align="center" class="row1">{$r['size']}</td>
<td align="center" class="row1">{$r['seeders']}</td>
<td align="center" class="row1">{$r['leechers']}</td>
<td align="center" class="row1">{$r['completed']}</td>
<td align="center" class="row1">{$r['numfiles']}</td>
<td align="center" class="row2"><a href='{ipb.script_url}showuser={$r['id']}' style="text-decoration: underline;">{$r['name']}</a></td>
</tr>



Add to your navbar index.php?act=torrents ...


P.S. This code couldn't be without the help of Jaggi smile.gif

Updates:
Fix 1: New Torrent file fixes number of pages listed..

v2 Changes:
Fix 1: Removes HTML from php files.
Fix 2: Uses {ipb.script_url} for links.
Change: 20 Torrents per Page.

This post has been edited by Farjad: Sep 18 2006, 04:07 AM


Attached File(s)
Attached File  torrents.v2.rar ( 1.43k ) Number of downloads: 12
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Jul 1 2006, 01:02 AM
Post #2


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



have u got a demo of this or a screenshot, looks interesting so far.... had a quick breeze through the code would like to see it in action.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Farjad
post Jul 1 2006, 01:09 AM
Post #3


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



QUOTE
have u got a demo of this or a screenshot, looks interesting so far.... had a quick breeze through the code would like to see it in action.

Well.. I did have it.. but I just tested it and removed it as I was using a bit different one .. or should I say bit similar one to Tracker CP tongue.gif... lol with a few other features hehehe (ex. passkey reset & reseed based on one user e.g. whatever the user has downloaded/released, and reseed is displayed globally under navbar if the user has saying You have # torrents to reseed...)

This post has been edited by Farjad: Jul 1 2006, 01:10 AM
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Jul 1 2006, 02:00 AM
Post #4


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



sounds cool, would like to see your forum *hint* url *hint*
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
local
post Jul 1 2006, 02:17 AM
Post #5


Advanced Member
***

Group: Members
Posts: 30
Joined: 21-May 06
Member No.: 194



QUOTE(Farjad @ Jul 1 2006, 07:08 AM) *
Add to your navbar index.php?act=torrents ...

Where'z this 1?
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Farjad
post Jul 1 2006, 02:20 AM
Post #6


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



Well... I expected you would know this anyways...

All Global HTML --> global_board_header -->
Find:
CODE
<if="ipb.vars['gallery_images_path'] != ''">
<a href="{ipb.script_url}act=module&module=gallery">{ipb.lang['gallery']}</a>
</if>


Add after:
CODE
<a href="{ipb.script_url}act=torrents">Torrents</a>
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
local
post Jul 1 2006, 02:38 AM
Post #7


Advanced Member
***

Group: Members
Posts: 30
Joined: 21-May 06
Member No.: 194



Thanks smarty! tongue.gif

How about this 1!
CODE
IPB WARNING [2] load_template(): Unable to access /var/www/httpdocs/forums/cache/skin_cache/cacheid_56/skin_torrents.php (Line: 1375 of /sources/ipsclass.php)
IPB WARNING [2] load_template(/var/www/httpdocs/forums/cache/skin_cache/cacheid_56/skin_torrents.php): failed to open stream: No such file or directory (Line: 1375 of /sources/ipsclass.php)


Ty
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Farjad
post Jul 1 2006, 06:06 AM
Post #8


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



It says in instructions add new skin... so go to like All Global HTML and then scroll all the way down and click add Template bit and then name it show_page and for the group make it torrents all instructions in first post wink.gif
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
local
post Jul 2 2006, 01:56 AM
Post #9


Advanced Member
***

Group: Members
Posts: 30
Joined: 21-May 06
Member No.: 194



Sorry man but i got a permission problem with my server right now and i can't add this bit.
If you don't mind, please include the full code from the file skin_torrents.php in here or PM it to me.

Thanks for your help m8!
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Jul 2 2006, 03:00 AM
Post #10


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



you need to chmod your skins file folder or you'll seriously hamper the running of your forum.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
local
post Jul 2 2006, 03:27 AM
Post #11


Advanced Member
***

Group: Members
Posts: 30
Joined: 21-May 06
Member No.: 194



QUOTE(Jaggi @ Jul 2 2006, 10:30 AM) *

you need to chmod your skins file folder or you'll seriously hamper the running of your forum.

It is Jaggi. Somehow due to a root/user permission i can't get it right for this task.

If someone has this file (skin_torrents.php) please sent

Thanks.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Jul 2 2006, 12:06 PM
Post #12


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



chmod 777 DONE tongue.gif
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Eddie
post Jul 2 2006, 03:39 PM
Post #13


Advanced Member
***

Group: Xtra Member
Posts: 53
Joined: 13-May 06
Member No.: 73



very nice, thanks
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
kevs2g
post Jul 15 2006, 08:46 AM
Post #14


Newbie
*

Group: Members
Posts: 4
Joined: 11-July 06
Member No.: 387



Thankyou for this mod, we are using it at moonlords and has gone down well with members smile.gif

I had to edit the file though, all the links had to be changed because our forum resides two levels down from the domain root, removing one of the proceeding fullstops from the links fixed it so ../link here became ./link here and all worked fine biggrin.gif
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
r5a
post Aug 20 2006, 08:09 PM
Post #15


Member
**

Group: Members
Posts: 14
Joined: 20-August 06
Member No.: 499



Nevermind!

This post has been edited by r5a: Aug 21 2006, 12:29 AM
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Aug 20 2006, 09:46 PM
Post #16


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



QUOTE(kevs2g @ Jul 15 2006, 07:46 AM) *
Thankyou for this mod, we are using it at moonlords and has gone down well with members smile.gif

I had to edit the file though, all the links had to be changed because our forum resides two levels down from the domain root, removing one of the proceeding fullstops from the links fixed it so ../link here became ./link here and all worked fine biggrin.gif


in the skins we use summit like {ipb.script.url} but since as they not used in this case use something like:

ROOT_PATH."/index.php"
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Farjad
post Sep 18 2006, 03:23 AM
Post #17


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



Torrents v2 Released smile.gif
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Jaggi
post Sep 18 2006, 03:31 AM
Post #18


Administrator
***

Group: Project Developer
Posts: 350
Joined: 31-March 06
Member No.: 1



nice, looking much better.

update instructions? should be just replace files and edit skins...
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
Farjad
post Sep 18 2006, 03:46 AM
Post #19


Member
**

Group: Members
Posts: 28
Joined: 23-June 06
Member No.: 333



QUOTE(Jaggi @ Sep 18 2006, 01:31 AM) *

nice, looking much better.

update instructions? should be just replace files and edit skins...


Replace all files.. And you may delete show_page template from skin_torrents and just add those new 2 templates.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post
nightwisher
post Sep 22 2006, 10:46 AM
Post #20


Advanced Member
***

Group: Beta Tester
Posts: 66
Joined: 25-April 06
From: Bosnia
Member No.: 17



Thanks sweet codes !

And Thank you for share with us !

Friendly
Nightwisher
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
1 Members: OPPZeroCool

 

Lo-Fi Version 0.1020 sec    0.27    11 queries    GZIP Enabled
Time is now: 9th October 2006 - 11:43 PM