Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 2.X » General Help for 2.X » Modifying the Torrent Description
Modifying the Torrent Description [message #4701] Mon, 09 August 2010 08:00 Go to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
I've been working to modify the torrent description area and need a little help. All of the changes I have made have been in details.php but I want to know how I can modify the info in the different tabs (like Torrent Info and Rating / Comments) and how I can set a certain tab's info to load as default. Just as an example, I want to take the comments and put them on a 'Torrent Details' tab I made (which is different from the 'Torrent Info' section), and I want that Torrent Details section to load automatically when the torrent is clicked on.

In details.php I noticed this code:
onclick=\"sndReq('op=view_coments_page&torrent=" . $id . "&

Where is "view_comments_page" coming from? How can I edit it?

I can explain more if need be.

thanks.
Re: Modifying the Torrent Description [message #4702 is a reply to message #4701] Mon, 09 August 2010 08:42 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

ajax.php

on torrent descritions, you will notice buttons along top.
Torrent Info | NFO FILE | View Ratings | View Comments. etc...these are controled by javascript. the infomation your looking at is for comments which is in ajax.php


Re: Modifying the Torrent Description [message #4708 is a reply to message #4702] Mon, 09 August 2010 20:30 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Awesome! Thanks for the info.

I've started to change up the buttons and info within the torrent description section...

One issue I've run into is making a button that just shows the description of the current torrent.

First, I made the button in details.php like so:

echo"<br><left><input class=\"button\" type=\"submit\" title=\""._btview_tordescript."\" value=\"" . _btrequestdetails_desc . " \" onclick=\"sndReq('op=view_torrentinfo_page&torrent=" . $id . "', 'DT')\">\n";

Works great.

Next, I defined view_torrentinfo_page in ajax.php like so:

case 'view_torrentinfo_page':{
OpenTable(_bt_torrentdescriotion);

echo "Put the Torrent's description in here.";

#Description
$descript = format_comment($torrent["descr"],false,true);
parse_smiles($descript);
#Description

if ($descript != strip_tags($descript)) {//Means it is written in HTML
echo $descript;
} else {
echo "<p>".str_replace("\n","<br>",$descript)."</p>";
}
}

The problem is this doesn't seem to grab the torrent description and display it. It actually just displays "1". Any thoughts?
Re: Modifying the Torrent Description [message #4710 is a reply to message #4708] Tue, 10 August 2010 00:22 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
you have to perform a sql query to get the description.

http://a.imageshack.us/img831/5562/mybikes.png
Re: Modifying the Torrent Description [message #4712 is a reply to message #4710] Tue, 10 August 2010 03:01 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Got it - figured it out. Do you know how to make a page open by default? Currently, the "view_torrentdetails_page" opens automatically when a torrent is clicked on - I'd like to switch that to the new page I made which only shows the torrent description: "view_torrentinfo_page".

I've looked around the details.php and ajax.php, but don't see how a page is loaded by default.
Re: Modifying the Torrent Description [message #4713 is a reply to message #4710] Tue, 10 August 2010 03:03 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
Got it - figured it out. Do you know how to make a page open by default? Currently, the "view_torrentdetails_page" opens automatically when a torrent is clicked on - I'd like to switch that to the new page I made which only shows the torrent description: "view_torrentinfo_page".

I've looked around the details.php and ajax.php, but don't see how a page is loaded by default.
Re: Modifying the Torrent Description [message #4714 is a reply to message #4713] Tue, 10 August 2010 04:33 Go to previous message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
on details.php find and edit this
echo"<script type=\"text/javascript\">
<!--
	// Main PMBT Javascript Initialization
	sndReq('op=view_details_page&torrent=" . $torrent["id"] . "', 'DT');
//-->
</script>";


http://a.imageshack.us/img831/5562/mybikes.png
Previous Topic:Formatting the Help Popup window
Next Topic:401 error in utorrent
Goto Forum:
  


Current Time: Wed Feb 08 11:57:47 GMT 2012

Total time taken to generate the page: 0.01115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software