Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
My Downloads v1.2 - A Download Manager for VBulletin Details »»
My Downloads v1.2 - A Download Manager for VBulletin
Version: 1.20, by ipas2 ipas2 is offline
Developer Last Online: Aug 2006 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-25-2004 Last Update: 01-08-2005 Installs: 14
DB Changes
 
No support by the author.

Well well.. have I been busy in such a short time.. hehehe.. I listened and i changed... here's a newer version, more integrated it is..

What does this script do ?

This script indexes your download directory of your website and put this information
into records on your database. Now you can track who is downloading your files and you get
information how popular each file is.

version 1.2
- Use of templates in vbulletin
- The download database is integrated into the forumdatabase
- Use of vbulletin stylesheets
- Auto index of subdirectories ( 1 layer ) into download-categories.
- Auto clean up of log database when file is removed from the database
(The Cleanup button has been removed)
- IP address logging added
- Gifs are made transparent
- Non admin auto update option
- Some other small tunes...

version 1.1
not released

version 1.0
Features:
- Auto index of the download directory
- Easy add descriptions to files
- Easy database cleanup of deleted files
- Restrict the usergroups who may download
- Tracking of downloads.
- Display download history of a file by admin group.
- Database cleanup by admingroup

Nice to know:
- Easy to install for not-dummies
- Its just one php script

The package:
- download.php - this is the actual script ( you can rename this )
- mydownloads.sql - database strucure
- mydownloads.template.txt - Vbulletin template
- ./gifs/ - gifs
- install.txt - this file

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-18-2005, 01:48 AM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those people who wants to have formated filesizes:

find:
Code:
// Check if the file is OFFLINE
if ($runrootonce){
   if (file_exists($dir . $filename)) {
   $filesize= (filesize($dir . $filename));
   }
   else{
   $filesize='OFFLINE';
   $offline=true;
   }
 }
 else{
   if (file_exists($dir . $catname . '/' . $filename)) {
   $filesize= (filesize($dir . $catname . '/' . $filename));
   }
   else{
   $filesize='OFFLINE';
   $offline=true;
and replace it with:
Code:
// Check if the file is OFFLINE
if ($runrootonce){
   if (file_exists($dir . $filename)) {
   $filesiz= (filesize($dir . $filename));
   	if ($filesiz < 1024) {
   			$filesize= $filesiz.' b';
   		}
   elseif ($filesiz < 1048576) {
   		$filesize= vb_number_format($filesiz / 1024 ,0).' kb';
    }
   elseif ($filesiz > 1048576) {
   		$filesize= vb_number_format($filesiz / 1048576 ,2).' mb';
		 }
   }
   else{
   $filesize='OFFLINE';
   $offline=true;
   }
 }
 else{
   if (file_exists($dir . $catname . '/' . $filename)) {
   $filesiz= (filesize($dir . $catname . '/' . $filename));
   if ($filesiz < 1024) {
   			$filesize= $filesiz.' b';
   		}
   elseif ($filesiz < 1048576) {
   		$filesize= vb_number_format($filesiz / 1024 ,0).' kb';
    }
   elseif ($filesiz > 1048576) {
   		$filesize= vb_number_format($filesiz / 1048576 ,2).' mb';
   		}
   }
   else{
   $filesize='OFFLINE';
   $offline=true;
It's only quick and dirty but it works
Reply With Quote
  #33  
Old 01-18-2005, 02:04 AM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, some more bugfixes:

In Template mydownloads find at the end:
Code:
$footer
add after:
Code:
</body> 
</html>
Find in file download.php:
Code:
eval('$dlnavbar = "' . fetch_template('navbar') . '";');
add before:
Code:
$navbits = array(); 
$navbits[$parent] = 'Downloads'; 

$navbits = construct_navbits($navbits);
But my "exploded" tablesize is not gone
horizontal size is toooo long for my display..
I will look for that tomorrow
Reply With Quote
  #34  
Old 01-18-2005, 08:03 AM
ipas2 ipas2 is offline
 
Join Date: Apr 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks a version 1.3 is needed Uncle Tom, I will look at your fixes soon.
I have to familliar myself more with those templates I guess.

I found a bug myself. In the template replace the phrase $error to $errormsg
This are messages when a non-logged-in user tries to download a file.

Grtz,
Ipas
Reply With Quote
  #35  
Old 01-18-2005, 02:00 PM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get the following db error on the screen while downloading a file from downloads root directory. But the download will happen ! It's only an error on the screen.
Code:
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 18 in /download.php on line 80
I changes line 80 to the original line of your version ipas2
I think this happen because there is no catid entry for the root download dir in the database...
Reply With Quote
  #36  
Old 01-18-2005, 08:06 PM
ipas2 ipas2 is offline
 
Join Date: Apr 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're right. Will be fixed in 1.3
For now:
Replace line 80,81,82

PHP Code:
   $cat="SELECT * FROM mydl_category WHERE catid=$dlcat";
   
$catresult=mysql_query($cat);  
   
$dldir=mysql_result($catresult,0,"directory"); 
To:

PHP Code:
   if ($dlcat!=0){
   
$cat="SELECT * FROM mydl_category WHERE catid=$dlcat";
   
$catresult=mysql_query($cat);  
   
$dldir=mysql_result($catresult,0,"directory");
   } 
Grtz
Ipas
Reply With Quote
  #37  
Old 01-19-2005, 06:06 AM
ipas2 ipas2 is offline
 
Join Date: Apr 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE=Onkel_Tom]For those people who wants to have formated filesizes:

Thnx Oncle_Tom.. added !
Reply With Quote
  #38  
Old 01-19-2005, 06:59 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent hack, but how about adding the ability to count the downloads and display the top 5, 10, 20 (or however many the admin wants) most popular downloads?
Reply With Quote
  #39  
Old 01-19-2005, 08:06 AM
ipas2 ipas2 is offline
 
Join Date: Apr 2004
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo
excellent hack, but how about adding the ability to count the downloads and display the top 5, 10, 20 (or however many the admin wants) most popular downloads?
That should not be a problem. I thought about this myself. Version 1.3 I guess
Reply With Quote
  #40  
Old 01-19-2005, 08:38 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ipas2
That should not be a problem. I thought about this myself. Version 1.3 I guess
cool. Would a password protected download be a problem? maybe each file could have a password that the admin specifies in the control panel? or only certain user ID #s are allowed to d/l certain files?
Reply With Quote
  #41  
Old 01-20-2005, 10:15 PM
gigaenvy gigaenvy is offline
 
Join Date: Jul 2004
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Onkel_Tom
Hi all,
I installed this hack on my testboard. Great Idea !
But there are so many wishes for the new release:
  • include in vB database and get the dbname etc. from includes/config.php
  • vB Style
  • transparent background in images
  • phrasen version to translate in other languages
  • installation script for phrases from a .xml file
  • vbformating for date, filesize etc.
  • last download also add the date
  • if somebody uses a link like "http://www.yourdomain.tld/forums/download.php?download=18" don't show the content of the download page
I'm waiting for the next release
thanks in advance

along with anti-leeching support such as specifying 1 download for each ip address.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10597 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete