[DEV] Pafiledb [DOWNLOAD MOD] 0.0.9d

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
MJ
Registered User
Posts: 180
Joined: Thu Jan 03, 2002 10:20 pm
Contact:

Post by MJ »

I'm still seeing bugs, damn it!!
Latest release has sorted a few, but some still remaining.....I've sent you details via PM! ;)

The broken image bug wasen't fixed in 0.0.3 either! :(
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Not bad :wink: 0.0.3 is getting closer to perfection. A few problems I see yet:
One more bug I've found.....The Sort feature doesen't work on the "ViewAll Files" page, just returns back to the categories.


-As MJ mentioned above.

-Also as MJ mentioned, you missed the (email) return image fix with the mis-spelling of styl in the /includes/email.php and then the {Style} or whatever in the template...

-Very close but not quite on the Uploading File URL paste in AdminCP. I get this: pafiledb/uploads/test.zip instead of http://www.oasisforum.valcato.net/phpbb ... s/test.zip :lol: I may have a look around and see if I can figure out where to self insert my URL so that it pastes the entire part in although I'll probably just wait to see if you come up with something.

-I also just noticed something that I could swear worked before but I may be mistaken. I just did a test "Email file to friend" and in the ensuing email the link was all there but the clickable portion was cutoff as such:

http://www.oasisforum.valcato.net/phpbb ... =download&id=34

Update: Just tested another email and the above problem didn't occur so maybe its a hit n miss or fault of Outlook :roll:

Very good, the "Edit File" function now works! :D
Mohd
Registered User
Posts: 263
Joined: Mon Jul 15, 2002 9:06 pm
Contact:

Post by Mohd »

I have changed the message after sending email, rating, no result in search to phpbb style (information message) so no need to fix this image problem.

I may change mail function to phpbb class email which defined in
includes/(DON"T REMMBER THE FILE NAME).php

If I finished from removing all bugs I will release the new version, and to add some new feature to it
MJ
Registered User
Posts: 180
Joined: Thu Jan 03, 2002 10:20 pm
Contact:

Post by MJ »

sort for viewall is now fixed..

New return pages are nice Squall!! ;)

Remaining known bugs:
- Uploaded file not returning full URL
- Custom Field data not reading from db
- Email fields can be left blank, but confirmation of email sent is returned
- Ratings on Statistics

- Email not actually sending to address ??? (Not for me anyway!)
Dinosaur Gas
Registered User
Posts: 71
Joined: Thu Jul 11, 2002 11:56 pm
Contact:

Post by Dinosaur Gas »

Anyone have a working toplist file for this mod? I keep getting mysql connect errors when I use the one from the original pafiledb. I then entered the db information into the includes/mysql.php, and I got this error:

"Warning: Cannot use a scalar value as an array in" and it proceded to list all the lines that I entered the db info on. It worked fine, but I had these errors at the top of the page. Anyone know how to fix this? I am loving this mod, but this little problem is the only thing holding me back.

Here is my mysql.php from the phpBB integration version of pafiledb:

Code: Select all

<?php
/*
  paFileDB 3.0
  ©2001/2002 PHP Arena
  Written by Todd
  [email protected]
  http://www.phparena.net
  Keep all copyright links on the script visible
  Please read the license included with this script for more information.
*/

/*You need to change these variables to get paFileDB working. If you are unsure of this information, please contact your host to obtain this information*/
$db[host] = "mysql.tfcgaschamber.com"; //This is the MySQL server paFileDB will connect to
$db[user] = "******"; //This is the MySQL user name
$db[pass] = "********"; //This is the MySQL password
$db[name] = "phpBB2dino"; //This is the MySQL database paFileDB will put it's information in

/*
This is the MySQL table name prefix. The default is "pafiledb" but if you wish to install multiple copies of
paFileDB on the same database, change this to something like "pafiledb2." All tables in the MySQL database will 
be named "$prefix_files," "$prefix_license" ect, for example: "pafiledb_files" and "pafiledb2_files." That will
allow multple copies of paFileDB on the same database. If you are only installing one copy of paFileDB, you dont 
need to change this. NOTE: Your host does not have this information, it is up to you to set it to what you want.
If you are upgrading from an older version of paFileDB, you MUST keep this as "pafiledb"
*/
$db[prefix] = "pafiledb"; //Table name prefix-explained above.

/*Don't mess with anything below here unless you know what you're doing!*/

class pafiledb_sql {
	function query($db,$query,$type) {
		$result = mysql_query($query);
		$error = mysql_error();
		global $query_count;
		global $queries_used;
		$query_count++;
		$queries_used .= "<tr><td width=\"100%\" align=\"left\" class=\"datacell\">$query</td></tr>";
		if (!empty($error)) {
			$errno = mysql_errno();
			$this->error("paFileDB was unable to successfully run a MySQL query.<br>MySQL Returned this error: <b>$error</b> Error number: <b>$errno</b><br>The query that caused this error was: <b>$query</b>");
		}
		if ($type == 0) {
			return $result;
		}
		if ($type == 1) {
			$array = mysql_fetch_array($result);
			return $array;
		}
		if ($type == 2) {
			$array = mysql_num_rows($result);
			return $array;
		}
		if ($type == 3) {
			$array = mysql_insert_id();
			return $array;
		}
		@mysql_free_result($result);
	}
	function error($error) {
		die($error);
	}
	function connect($db) {
		if(!($dbc = mysql_connect($db[host],$db[user],$db[pass]))) $this->error("paFileDB was unable to successfully connect to the MySQL database. Check your settings including the MySQL server, username, and password and try again.");
                if(!(mysql_select_db($db[name],$dbc))) $this->error("paFileDB was able to connect to the MySQL database, but was unable to select the database <b>$db[name]</b> to use.");
	}
}
$pafiledb_sql = new pafiledb_sql;
?>
Image
Narc0sis
Registered User
Posts: 662
Joined: Tue Apr 09, 2002 12:59 am
Contact:

Post by Narc0sis »

here's a toplist script mod for the original pafiledb 3 if you need it. its pretty basic, just lists the top 20 most downloaded files with each file on the list linking to the info about that file. i didnt write it and i dont have pafile integration installed but it works just fine for the regular pafiledb so maybe it will help you out some

Code: Select all

<?php
   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  /////Top Files in Main Page Addon for PafileDB (http://www.phparena.net)//////
 //////////Written by Wh1t3w0lf ([email protected]) (fixed  by NightWolf www.belesh.net )/////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Instructions:
//Change the settings bellow (and the layout in the bottom of this file if you wish).
//After that put include this file in the page and in the place where you want to show the top files
//via the include php command

//Settings
$dbhostname= "localhost";	//Your MySQL Host name
$dbusername= "your_username";	//Your MySQL Username
$dbpassword= "your_password";	//Your MySQL Password
$dbdatabase= "databasename_pafiledb";	//Your MySQL Database Name
$url= "http://www.yoursite.com/pafiledb/pafiledb.php";	//The Url where you have installed pafiledb.php e.g "http://www.yoursite.com/files/pafile.php"
$table ="pafiledb_files";	//Table name including the prefix
$topfilecount= 20;	 // Top X files to show. e.g Top 10

//Don't mess with the following :P
$db = @mysql_connect($dbhostname,$dbusername,$dbpassword);
    if (!$db) {
      echo( "<p>Unable to connect to the " .
            "database server at this time.</p>" );
      exit();
    }
 if (! @mysql_select_db($dbdatabase) ) {
      echo( "<p>Error locating the file " .
            "database at this time.</p >" );
      exit();
    }
$result = @mysql_query("SELECT file_id, file_name, file_dls FROM $table ORDER BY file_dls DESC", $db);
    if (!$result) {
      echo("<p>Error performing query: " . mysql_error() . "</p>");
      exit();
    }
$files = mysql_num_rows($result);

//Style. Change accoridngly e.g Add html tags or css styles to match your site's design.
echo "<body bgcolor='#E0E8EF' text='#000000' link='#2F486F' vlink='#2F486F' alink='#2F486F'>";
echo "<style>
body{
	scrollbar-face-color: #DEE3E7;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #DEE3E7;
	scrollbar-3dlight-color: #D1D7DC;
	scrollbar-arrow-color:  #006699;
	scrollbar-track-color: #A9BAC9;
	scrollbar-darkshadow-color: #98AAB1;
}

A.pFo:link         {color:#2F486F; text-decoration:overline;}
A.pFo:visited      {color:#2F486F; text-decoration:overline;}
A.pFo:active       {color:#2F486F; text-decoration:overline;}
A.pFo:hover        {color:#8AA0B4; text-decoration:overline;}

</style>";
echo "<center><u><b>Top 20 Downloads</b></u>:";
echo "<br><center><font face='Arial, Helvetica, sans-serif' size='-1'>";
$i=1;
while (($myrow = mysql_fetch_row($result)) And ($i<=$topfilecount)){
$i=$i + 1;
echo "<a href='$url?action=file&id=$myrow[0]' target='_parent'>$myrow[1]</a><br>\n";}

   ///////////////////////////////////////////////////////////////////////////////
  /////Top Files in Main Page Addon for PafileDB (http://www.phparena.net)///////
 //////////Written by Wh1t3w0lf ([email protected])/////////////////
///////////////////////////////////////////////////////////////////////////////
?>
dane
Registered User
Posts: 753
Joined: Fri May 24, 2002 12:43 am
Location: The best place to live, Canada!
Contact:

Post by dane »

hey i have pafiledb right now, and a bunch of stuff in it, is it possible to keep the stuff i have?
Image
LordOden
Registered User
Posts: 56
Joined: Wed Sep 11, 2002 5:00 pm
Contact:

Post by LordOden »

phpBB : Critical Error

Error updating sessions table

DEBUG MODE

SQL Error : 1054 Unknown column 'PAGE_DOWNLOAD' in 'field list'

UPDATE phpbb_sessions SET session_time = 1039763230, session_page = PAGE_DOWNLOAD, session_topic = '0' WHERE session_id = 'cdc89ab5499783d8e9aec8b02c08d93c'

Line : 285
File : /home/lordoden/lordoden.com/Forum2/includes/sessions.php
i get thgis error when trying to to dload.php
Dreams And Fantasy Are Ways To Get Away From A Boring and Every Day Life, That Is Where Myths And Magic Begins!
Dinosaur Gas
Registered User
Posts: 71
Joined: Thu Jul 11, 2002 11:56 pm
Contact:

Post by Dinosaur Gas »

Narc0sis wrote: here's a toplist script mod for the original pafiledb 3 if you need it. its pretty basic, just lists the top 20 most downloaded files with each file on the list linking to the info about that file. i didnt write it and i dont have pafile integration installed but it works just fine for the regular pafiledb so maybe it will help you out some


Thanks, I didn't use your file, but it gave me the clue I needed to fix mine. I just had to add all the database connect info into the toplist.php and now it's all set. :D
Last edited by Dinosaur Gas on Fri Dec 13, 2002 8:31 am, edited 1 time in total.
Image
MJ
Registered User
Posts: 180
Joined: Thu Jan 03, 2002 10:20 pm
Contact:

Post by MJ »

danez wrote: hey i have pafiledb right now, and a bunch of stuff in it, is it possible to keep the stuff i have?


Yeah, the database hasen't changed at all from the original pafiledb tables, except one additions to pafiledb_settings which can be found in the sql file, just compare that to your current database for pafiledb and make the addition using phpMyAdmin.
LordOden wrote: phpBB : Critical Error
Line : 285
File : /home/lordoden/lordoden.com/Forum2/includes/sessions.php
i get thgis error when trying to to dload.php


Add this to includes/constants.php as per install instructions ;)
define('PAGE_DOWNLOAD', -12);
Mohd
Registered User
Posts: 263
Joined: Mon Jul 15, 2002 9:06 pm
Contact:

Post by Mohd »

hi guys I will attach the toplist file which I integrated with phpbb:

top downloaded file
top rated file
top recent file
Narc0sis
Registered User
Posts: 662
Joined: Tue Apr 09, 2002 12:59 am
Contact:

Post by Narc0sis »

Dinosaur Gas wrote: Thanks, I didn't use your file, but it gave me the clue I needed to fix mine. I just had to add all the database connect info into the toplist.php and now it's all set. :D


cool, glad that helped

This mod is getting better and better. Once you guys iron out the rest of the bugs and add the comment feature i'll have to implement it into my site.
Dinosaur Gas
Registered User
Posts: 71
Joined: Thu Jul 11, 2002 11:56 pm
Contact:

Post by Dinosaur Gas »

Got a small error. My custom field is showing up twice on the file page.

Take a look:
http://www.tfcgaschamber.com/dload.php? ... ile&id=105

Anyone know a fix for it?
Image
User avatar
Daz
Registered User
Posts: 5236
Joined: Fri Dec 07, 2001 2:39 pm
Location: Yorkshire, UK

Post by Daz »

Hi,

Is the template side of this MOD now finalised?
Please and Thank You works wonders...
I reserve the right to post illogical (and totally wrong) replies.
...It's the subtle perfection in attention to detail that makes your work rock the way it does - cdkrg
Think simple - it's not necessarily what you draw that matters, it's what you perceive - Daz

Note: ForumImages<dot>com is no longer anything to do with me.
MJ
Registered User
Posts: 180
Joined: Thu Jan 03, 2002 10:20 pm
Contact:

Post by MJ »

Yes...templates are nearly finished.

Squall:
I've removed the pafiledb timezone (from templates & database) and set it up to run of the phpBB board timezone, added the forum jumpbox also. PM me for details or files is you need ;)

Demo is here!!
Locked

Return to “[2.0.x] MODs in Development”