vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - DownloadsII (https://vborg.vbsupport.ru/showthread.php?t=120122)

DemoVFW 12-13-2008 09:33 PM

Quote:

Originally Posted by carrlos (Post 1672317)
I'm having this same issue and I see that others are having it too. Why can't we get some support on this??? :mad:

You can fix this issue (the security token problem) by editing or creating a PHP.ini file. I had the same problem and saw that it was answered on page 200 of this thread. See below (edit the "post_max_size" to a larger size then 8M). Worked for me.

Quote:

Originally Posted by lilP
Thanks columbusgeek. After your reply my co-worker and I checked what you had told us, but after testing found out it wasn't it. It was actually the post_max_size was set at 8M. As soon as we changed it to 100M, it started to work with bigger files.
Thanks again for your help. Much appreciated.


SeanMT 12-13-2008 09:47 PM

1 Attachment(s)
I've managed to create a simple RSS feed for mine. You just need to create 3 files.

Mine can be seen working by clicking the large RSS button here

The code for the files follow:


rss.php
PHP Code:

<?php 

error_reporting
(E_ALL); 

$siteURL "http://" $_SERVER['HTTP_HOST']; 
$feedTitle "FM-Base.co.uk - Latest FM2009 Downloads"
$rssVersion 2.0

function 
generateFeed $homeURL$title$version 2.0) { 
// a little check for the arguments thrown in. 
if (func_num_args() < 2
exit (
"Insufficant Parameters"); 

include 
'config.php';
include 
'opendb.php'

// only select the columns you need, thus reducing the work the DBMS has to do. 
$query "SELECT name, description, date, id, purgatory FROM vb3_dl_files WHERE purgatory = 0 ORDER BY id DESC LIMIT 5";
// execute the query 
$results mysql_query ($query) or exit(mysql_error()); 

// check for the number of rows returned before doing any further actions. 
if (mysql_num_rows ($results) == 0){ 
exit(
"Nothing to Show Here"); 


else { 
$rss ""
// tell the browser we want xml output by setting the following header. 
header("Content-Type: text/xml; charset=utf-8"); 

// set the xml document properties and tell it a location of a stylesheet. 
$rss .= "<?xml version=\"1.0\" ?>\r\n";

// set the RSS version using the version parameter 
$rss .= "<rss version=\"$version\">\r\n"

// each RSS feed has a channel and a title, Using the title parameter we set the title of the feed. 
$rss .= "<channel>\r\n"
$rss .= "<title>" ucwords($title) . "</title>\r\n"

while (
$row mysql_fetch_array($results)){ 

$rss .= "<item>\r\n"
$rss .= "<title>" $row['name'] . " (" date("d/m/y"$row['date']) . ") </title>\r\n"
$rss .= "<description>" stripslashes(trim($row['description'])) . "</description>\r\n"

$rss .= "<link>" "http://www.fm-base.co.uk/forum/downloads.php?do=file&amp;id=" $row['id'] . "</link>\r\n"

$rss .= "</item>\r\n\r\n"



$rss .= "</channel>\r\n"
$rss .= "</rss>\r\n"

echo 
$rss




// call the function with all our settings from the top of the script 
generateFeed$siteURL $feedTitle$rssVersion ); 

?>

config.php
PHP Code:

<?php
$dbhost 
'localhost';
$dbuser 'root';
$dbpass '';
$dbname 'downloads';
?>

opendb.php
PHP Code:

<?php
$conn 
mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
?>

Oh and if you want you may use the RSS button I made (attached).

Attachment 90559

d2sector 12-13-2008 11:08 PM

Is this working with v3.8?
I see http://www.minatica.be/downloads.php is running V6. When will that be released?

Digital Jedi 12-14-2008 02:33 AM

Quote:

Originally Posted by SeanMT (Post 1684813)
I've managed to create a simple RSS feed for mine. You just need to create 3 files.

Mine can be seen working by clicking the large RSS button here

The code for the files follow:


rss.php
PHP Code:

<?php 
 
error_reporting
(E_ALL); 
 
$siteURL "http://" $_SERVER['HTTP_HOST']; 
$feedTitle "FM-Base.co.uk - Latest FM2009 Downloads"
$rssVersion 2.0
 
function 
generateFeed $homeURL$title$version 2.0) { 
// a little check for the arguments thrown in. 
if (func_num_args() < 2
exit (
"Insufficant Parameters"); 
 
include 
'config.php';
include 
'opendb.php'
 
// only select the columns you need, thus reducing the work the DBMS has to do. 
$query "SELECT name, description, date, id FROM vb3_dl_files ORDER BY id DESC LIMIT 5"
// execute the query 
$results mysql_query ($query) or exit(mysql_error()); 
 
// check for the number of rows returned before doing any further actions. 
if (mysql_num_rows ($results) == 0){ 
exit(
"Nothing to Show Here"); 

 
else { 
$rss ""
// tell the browser we want xml output by setting the following header. 
header("Content-Type: text/xml; charset=utf-8"); 
 
// set the xml document properties and tell it a location of a stylesheet. 
$rss .= "<?xml version=\"1.0\" ?>\r\n";
 
// set the RSS version using the version parameter 
$rss .= "<rss version=\"$version\">\r\n"
 
// each RSS feed has a channel and a title, Using the title parameter we set the title of the feed. 
$rss .= "<channel>\r\n"
$rss .= "<title>" ucwords($title) . "</title>\r\n"
 
while (
$row mysql_fetch_array($results)){ 
 
$rss .= "<item>\r\n"
$rss .= "<title>" $row['name'] . " (" date("d/m/y"$row['date']) . ") </title>\r\n"
$rss .= "<description>" stripslashes(trim($row['description'])) . "</description>\r\n"
 
$rss .= "<link>" "http://www.fm-base.co.uk/forum/downloads.php?do=file&amp;id=" $row['id'] . "</link>\r\n"
 
$rss .= "</item>\r\n\r\n"
 

 
$rss .= "</channel>\r\n"
$rss .= "</rss>\r\n"
 
echo 
$rss
 


 
// call the function with all our settings from the top of the script 
generateFeed$siteURL $feedTitle$rssVersion ); 
 
?>

config.php
PHP Code:

<?php
$dbhost 
'localhost';
$dbuser 'root';
$dbpass '';
$dbname 'downloads';
?>

opendb.php
PHP Code:

<?php
$conn 
mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
?>

Oh and if you want you may use the RSS button I made (attached).

Attachment 90559

Consider releasing that as an add-on for the mod.

tlwwolfseye 12-14-2008 11:21 AM

Is it possible that bigger files (couple hundred MB) take a very long time as download to start ? I just noticed that today. Or is there anything that can be done to make that faster ? Isn?t normal for Download Scripts generally, even with big files.

I installed MEMCACHE on my Server, was already not so easy when you?re no Linux freak. ;) Anyways, that works and I got a bit less drain on the CPU now but still, the time it takes before a bit bigger files actually start and you got the SAVE AS window, takes far too long. And thats just with me testing, imagine 20 people do that at the same time, don?t want to know whats going on then.

Any ideas why this script takes so long time with bigger files to actually start downloading ?

SeanMT 12-14-2008 05:12 PM

I've made a slight change to the RSS feed above. I have edited line 18. The RSS feed will now only show files that have been approved.

Quote:

Originally Posted by Digital Jedi (Post 1684935)
Consider releasing that as an add-on for the mod.

I would but I don't have the time to provide support for it.

Stifmeister2 12-14-2008 10:41 PM

Quote:

Originally Posted by SeanMT (Post 1685339)
I've made a slight change to the RSS feed above. I have edited line 18. The RSS feed will now only show files that have been approved.



I would but I don't have the time to provide support for it.

There are many unsupported mods here. If you think it works well, you could release it and let it up to others to decide whether it's worth installing. ;)

tlwwolfseye 12-17-2008 07:41 AM

Ok, i think i know why this Mod is taking such a huge CPU load when using very big Files (couple hundred MB or even 1 GB or more). There are 2 ways to add files. One is uploading (adding manually) which is fine for smaller files but of course overkill with File sizes over 1 GB or so.

For that the Import function seems to be there. But, this Import function kinda makes the imported Files downloadable as stream. Which means as far as I know, anytime someone starts a download, the file will be copied from its original location and made ready for the Download. That way making it impossible to get the original Location. Problem is, anytime a download starts to copy for example a file over 1 GB is madness, thats why the CPU is going up in usage beyond normal. If many people would download that file at the same time the Webserver probably would collapse.

So the only way to add files that are that big is with manually adding a file as if one would upload it but then not to upload from the own PC but to enter the link (direct) to the File. Then the download wouldn?t start as stream but get the file from the link entered and works fast. Only problem is, that way the direct link location of that file is easy to find out in the Browser and can be used without actually going through the Website. :(

MrEyes 12-19-2008 08:57 AM

Just downloaded and installed this on my test site and all it well, extremely easy to setup and use.

Anyway, I have found one small problem....

One of the templates (editor_css) isn't cached so an unnecessary SQL call is perform. The fix for this is extremely easy:
  1. Get your downloads.php file and open it in your favourite text editor
  2. Find the following line@
    Code:

    'file' => array(
    this should be around line 95
  3. Immediately after this line enter the following (exactly as it appears here):
    Code:

    'editor_css',
    You should now have something that looks like this:
    Code:

    ),
    'file' => array(
            'editor_css',
            'downloads_file',
            'downloads_file_addit',

  4. Save the file and reupload to your server

EDIT: You also need to follow these same steps for the "'add' => array(" section

Job done

There is also another feature that might prove to be somewhat annoying to end users. Lets say UserX decides to upload a file, the enter the filename, author, a really long and informative description, the file path but forgets to choose a category. They then click submit and they will get the "complete the sections marked in red" message.

The problem is that it seems the contents of the description/filepath are lost so they have to retype it all or hope that clicking back will get their description back.

tlwwolfseye 12-19-2008 09:43 AM

But this doesnt change the high CPU load with the import or starting a download which is quite large, right ? Because i think that is the result of the streaming that this Mod is working with.

Wolfseye

dfidler 12-20-2008 07:51 AM

Guys, installed on my board; works great. Thank you for sharing this mod with the community.

Also, I can't believe that you have supported this mod for so long without tearing your hair out. You give some stellar support and even give code to hack the mod (and people's boards) for free.

You're nutters and you should be charging money for this (or at least for support). You should also include some Paypal information in the mod text so that we can donate. I'm sure that some of the people that have installed are making money from their sites and they probably use this addon. It seems fair, to me, that you give them the opportunity to at least donate a piece of their pie.

Anyways, you guys rock.. and you're one hell of a lot nicer than I am.

Aceman 12-20-2008 04:27 PM

Is version 6.0 out? I can't find it anywhere... except on these sites.

http://forums.bleachboard.com/downloads.php
http://www.minatica.be/downloads.php

Any help would be appreciated.

rabidkevin 12-20-2008 04:45 PM

Hi,

Is there a more advanced stats block made for this already? I am trying to incorporate the latest files stats on my home page which is templated in vbulletin. Adding $dpanel_latest_files just shows a single file name. I would like something more advanced like:


$Date: $Author - $Title
$Description

I've been trying to create a new function in class_downloads.php but that has proved harder than I expected.

Help, please :D

RS_Jelle 12-20-2008 07:26 PM

1 Attachment(s)
Quote:

Originally Posted by Aceman (Post 1689622)
Is version 6.0 out? I can't find it anywhere... except on these sites.

http://forums.bleachboard.com/downloads.php
http://www.minatica.be/downloads.php

Any help would be appreciated.

It's in beta development ;)


@ALL: I've made a 5.1 version in the meantime. It contains the vB 3.7 integration.

Quote:

DownloadsII 5.1.0 Changelog

!!! REQUIRES VBULLETIN 3.7.X !!!

Jelle
- Backported vB 3.7 integration from v6 beta (navbar button/search, profile stats/tab)
- Added HTTPS support for linked files
- Better calculation of the usergroup download restrictions
- Some other small code updates
I'm posting it here as it needs some basic testing (but I'm 99% sure of its stability). If you have any problems with it, just overwrite it with the old version.

Aceman 12-21-2008 12:43 AM

LOVE YOU!

Since I got your attention - Whats the possibility of allowing for custom files for file info like: (I run a 3D model site: format, geometry, textures, materials, animated, etc).

Aceman

Aceman 12-21-2008 12:53 AM

Upgrade to 5.1.0 was smooth.

Had an issue with GARS but fixed it. Thank you!

tlwwolfseye 12-21-2008 06:03 AM

Will make me upgrade to 5.1 loose any of the old so far done settings, categories, permissions or downloads ? I would appreciate some help before I do something wrong.

Thank you in advance.

Wolfseye

P.S: Will 6.0 also work with the streaming principle which takes far too much CPU load with big files ?

RS_Jelle 12-21-2008 04:29 PM

Quote:

Originally Posted by Aceman (Post 1689941)
LOVE YOU!

Since I got your attention - Whats the possibility of allowing for custom files for file info like: (I run a 3D model site: format, geometry, textures, materials, animated, etc).

Aceman

That's not possible at the moment.

Quote:

Originally Posted by tlwwolfseye (Post 1690101)
Will make me upgrade to 5.1 loose any of the old so far done settings, categories, permissions or downloads ? I would appreciate some help before I do something wrong.

Thank you in advance.

Wolfseye

P.S: Will 6.0 also work with the streaming principle which takes far too much CPU load with big files ?

You won't loose any data: just upload the product XML with the overwrite option on (+ overwrite all FTP files).
NEVER uninstall-install it to upgrade: that's a reinstall and it will remove all data.

The download part of v6 is still unfinished. I'm not fully sure about it.

Aceman 12-21-2008 05:27 PM

RS Jelle - Thanks for answering my above question. I did notice I typed "files" instead of fields as in "custom fields". Sorry if I confused you.

I do have another question - Is it possible to write a short script that could show the last five uploaded THUMBNAILS of files in a vbadvanced module? In other words I'd like to show the thumbnail of the file rather than the name or "text" of the latest upload. I do realize this is NOT in the current design, but I'm wondering if it's possible to code up something like that.

BTW - If your interested. Here's what I've done with your script: http://www.scifi-meshes.com/forums/downloads.php

Aceman 12-21-2008 05:54 PM

Found an error which could be specific to me:

When you click the download button on the information page specific to a file it goes to this link: http://www.scifi-meshes.com/forums/d...id=XX&act=down and the message: ERROR: File not found. shows.

XX = the number assigned to the file. (ie. 27, 43, 18, etc).

Any ideas?

TEMP ACCOUNT:

user: downloads
pass: temppass

RS_Jelle 12-21-2008 06:11 PM

Quote:

Originally Posted by Aceman (Post 1690501)
Found an error which could be specific to me:

When you click the download button on the information page specific to a file it goes to this link: http://www.scifi-meshes.com/forums/d...id=XX&act=down and the message: ERROR: File not found. shows.

XX = the number assigned to the file. (ie. 27, 43, 18, etc).

Any ideas?

This is new after the upgrade?
If yes, is it solved when you put the old (5.0.8) downloads.php back on your FTP (only that file)?

Aceman 12-21-2008 06:18 PM

No. I put the 5.0.8 file online over the updated one and no difference.

Also i did not change the downloads directory which is located at: /forums/downloads/

In the admincp for downloads it's set to ./downloads/

Aceman 12-21-2008 06:23 PM

TEMP ACCOUNT:
user: downloads
pass: temppass

If you missed it on the other page.

RS_Jelle 12-21-2008 07:55 PM

Quote:

Originally Posted by Aceman (Post 1690524)
No. I put the 5.0.8 file online over the updated one and no difference.

Also i did not change the downloads directory which is located at: /forums/downloads/

In the admincp for downloads it's set to ./downloads/

Then it's probably not caused by the upgrade. I checked it on another site and there were no download problems.
Did you have the problem already before the upgrade?

Check if your /downloads/ and /downloads/ec_tmp/ folders have a 777 chmod.

Digital Jedi 12-21-2008 08:09 PM

Seems to be working fine on my board Jelle. Thanks for the update. Is the addition of the navbar link hard coded into the PHP file? Where would I go to remove the navbar link? I didn't see anything in the plugins or in the Settings.

RS_Jelle 12-21-2008 08:19 PM

1 Attachment(s)
Quote:

Originally Posted by Digital Jedi (Post 1690580)
Seems to be working fine on my board Jelle. Thanks for the update. Is the addition of the navbar link hard coded into the PHP file? Where would I go to remove the navbar link? I didn't see anything in the plugins or in the Settings.

It's a setting:
Quote:

Show Navbar Button
Show a link to the downloads section in the navigation bar
(It seems I switched the "Show Navbar Button" and "Show Navbar Search" titles. I've attached an updated zip file, just overwrite the product XML.)

Digital Jedi 12-21-2008 08:42 PM

I knew I'd done it simply the first time. Maybe the switched names threw me. Let's just say that was what happened. =/

OCPerformance 12-21-2008 09:55 PM

Hallo

I've a short question. Can anybody help me, I need a separately new table for description right next Datei (red marked in the pic German phrase for file). It look likes confusing. Please help.


Link to Pic


Sorry for my bad english.

Digital Jedi 12-21-2008 10:59 PM

Quote:

Originally Posted by OCPerformance (Post 1690651)
Hallo

I've a short question. Can anybody help me, I need a separately new table for description right next Datei (red marked in the pic German phrase for file). It look likes confusing. Please help.

https://vborg.vbsupport.ru/external/2008/12/44.jpg

Sorry for my bad english.

You pasted in the thumbnail, but not the link to the full size image. We can't see anything.

OCPerformance 12-21-2008 11:29 PM

Its right link but in this forum it does't works. Im my forum 3.7.4. Pl1 it works.

Link to Pic

Aceman 12-22-2008 01:09 AM

RS Jelle - Thanks so much for looking into the issue I was having. I reuploaded all the files again. Rechecked ALL for file permissions and found that the folder "ec_tmp" was infact 755. I changed that to 777 and then installed the 5.1.0 update you provided on page 156.

I'm happy to report everything is now working perfectly.

If I could imposed one more question:

Is it possible to write a short script that could show the last five uploaded THUMBNAILS of files in a vbadvanced module? In other words I'd like to show the thumbnail of the file rather than the name or "text" of the latest upload. I do realize this is NOT in the current design, but I'm wondering if it's possible to code up something like that.

In fact it would be IDEAL if I could show the thumbnail for the top 5 files in each of the two categories (latest files and Most Popular Files) ON the downloads page (vbadvanced would be a bonus). Is that possible?

Aceman

RS_Jelle 12-22-2008 07:11 AM

Quote:

Originally Posted by OCPerformance (Post 1690651)
Hallo

I've a short question. Can anybody help me, I need a separately new table for description right next Datei (red marked in the pic German phrase for file). It look likes confusing. Please help.


Link to Pic


Sorry for my bad english.

You need to edit the downloads_cat_files and downloads_cat_filebit templates for that (split up the "Datei" <td> in two <td>'s) ;)

RS_Jelle 12-22-2008 08:18 AM

DownloadsII 5.1.0 introduces full vBulletin 3.7.x integration. Without any template edits you can get a navbar button, navbar downloads search, profile statistics, postbit statistics and a downloads tab in the profile!

Version 5.1.0 requires vBulletin 3.7.x (or 3.8.x). If you are still running vBulletin 3.5.x or 3.6.x, please use the old 5.0.8 version.

Note: you need to remove all previous template edits for DownloadsII if you had any.
Note for people running the 5.1.0 beta: I did some small changes to the product XML. Just overwrite it with the new one.

DownloadsII 5.1.0 Changelog

https://vborg.vbsupport.ru/external/2011/08/15.gif!!! REQUIRES VBULLETIN 3.7.X !!!

Jelle
  • Backported vB 3.7 integration from v6 beta (navbar button/search, profile stats/tab)
  • Added HTTPS support for linked files
  • Better calculation of the usergroup download restrictions
  • Some other small code updates

Sunka 12-22-2008 08:58 AM

Updated...thanks :up:

bezibaerchen 12-22-2008 09:01 AM

Updated too, but version number didnt change. Any hints what might be the problem? download interface looks same as before. template changes etc were automatically made, but download base itself didn't change (neither did the version number).

RS_Jelle 12-22-2008 09:09 AM

Quote:

Originally Posted by bezibaerchen (Post 1690937)
Updated too, but version number didnt change. Any hints what might be the problem? download interface looks same as before. template changes etc were automatically made, but download base itself didn't change (neither did the version number).

What do you mean with "download base"?

For the version number: have you translated the ecdownloads_copyright phrase? If yes, you need to update your translation.

bezibaerchen 12-22-2008 09:13 AM

With "download base" I mean downloads.php

Phrase was translated, that was my problem. Thanks for the fast help. Looking forward to next version. Keep up your good work dude!

RS_Jelle 12-22-2008 09:15 AM

Quote:

Originally Posted by bezibaerchen (Post 1690942)
With "download base" I mean downloads.php

Phrase was translated, that was my problem. Thanks for the fast help. Looking forward to next version. Keep up your good work dude!

There are code changes to the downloads.php file (and other php files in the package). As always, you just need to overwrite the old DownloadsII files on your FTP with the new ones.

bezibaerchen 12-22-2008 09:23 AM

Yeah, I did the overwrite. Nevertheless I do not see any changes, what should I see?

RS_Jelle 12-22-2008 09:25 AM

Quote:

Originally Posted by bezibaerchen (Post 1690948)
Yeah, I did the overwrite. Nevertheless I do not see any changes, what should I see?

Nothing except what's in the changelog, nothing visible (except the vB 3.7 integration). HTTPS support isn't visible :)


All times are GMT. The time now is 03:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04970 seconds
  • Memory Usage 1,933KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete