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)

Elite-Programs 04-26-2007 06:12 AM

I did everything u sead in the insall an i got
Elite-Programs, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

do i have to add the part thats on this site

RS_Jelle 04-26-2007 08:15 AM

Quote:

Originally Posted by Elite-Programs (Post 1235653)
I did everything u sead in the insall an i got
Elite-Programs, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

do i have to add the part thats on this site

You still need to set your usergroup permissions :)

AdminCP -> Usergroups -> Usergroup Manager

logofreax 04-26-2007 09:33 AM

Hi, can someone tell me, how to build in an popup Window, when a User click on the Downloadbutton or if he enter der Downloadbase.

cu
logofreax

RS_Jelle 04-26-2007 10:49 AM

Quote:

Originally Posted by logofreax (Post 1235689)
Hi, can someone tell me, how to build in an popup Window, when a User click on the Downloadbutton or if he enter der Downloadbase.

cu
logofreax

Just add your Javascript popup code to the correct template. For adding it to the downloadbutton together with downloading the file, you need a bit more complicated code.

For Javascript popup code: http://www.google.com/search?hl=en&q=javascript+popup
The first result is already a good one :)

Note that a lot of people are using a popup blocker and that popups are really irritating things.

Kr0nica 04-26-2007 04:10 PM

Quote:

Originally Posted by RS_Jelle (Post 1235644)
You have to edit downloads.php and add this to the end (inside the latest conditional, the else one, before the evals in it):
PHP Code:

$result $db->query_read("SELECT * FROM " TABLE_PREFIX "dl2_files WHERE ".$filesexclude);
while (
$file $db->fetch_array($result))
{
    
$alldownloads .= '<tr><td><a href="downloads.php?do=file&amp;id='.$file['id'].'"></a></td><td></td>'.$file['downloads'].'</tr>";


Now you can add in the downloads_main template {$alldownloads} where you want (indeed, with { and }). So it will look something like this to add in the template:
HTML Code:

<table class="tborder" cellpadding="4" cellspacing="0" border="1">
<tr><td>File</td><td>Downloads</td></tr>
{$alldownloads}
</table>

It should work, but I didn't test it, so there might be an error in it.

I've try, but it seems doesn't work ;( (i think i've do something wrong, cause there is no change on main page when i paste {$alldownloads} to downloads_main template).
But still thank you for help :)

CyberRanger 04-26-2007 04:23 PM

Quote:

Originally Posted by Kr0nica (Post 1235916)
I've try, but it seems doesn't work ;( (i think i've do something wrong, cause there is no change on main page when i paste {$alldownloads} to downloads_main template).
But still thank you for help :)

the query is slightly wrong. should be:

PHP Code:

$filesexclude $dl->exclude_files();
$result $db->query_read("SELECT * FROM " TABLE_PREFIX "dl_files WHERE ".$filesexclude);
while (
$file $db->fetch_array($result))
{
    
$alldownloads .= '<tr><td><a href="downloads.php?do=file&amp;id='.$file['id'].'"></a></td><td></td>'.$file['downloads'].'</tr>";


You should be placing this around line 1977 BEFORE this:
PHP Code:

    eval('$dmain_jr .= "' fetch_template('downloads_main') . '";');

    if (
$dl->statslatestfiles OR $dl->statstopcontributers OR $dl->statsmostpopularfiles 0


RS_Jelle 04-26-2007 04:27 PM

Quote:

Originally Posted by Kr0nica (Post 1235916)
I've try, but it seems doesn't work ;( (i think i've do something wrong, cause there is no change on main page when i paste {$alldownloads} to downloads_main template).
But still thank you for help :)

Have you also added the PHP code to downloads.php like I said? Without that, the $alldownloads variable doesn't exist.

Edit: CyberRanger was a bit faster :p

RS_Jelle 04-26-2007 04:30 PM

Quote:

Originally Posted by CyberRanger (Post 1235921)
the query is slightly wrong. should be:

PHP Code:

$filesexclude $dl->exclude_files();
$result $db->query_read("SELECT * FROM " TABLE_PREFIX "dl_files WHERE ".$filesexclude);
while (
$file $db->fetch_array($result))
{
    
$alldownloads .= '<tr><td><a href="downloads.php?do=file&amp;id='.$file['id'].'"></a></td><td></td>'.$file['downloads'].'</tr>";


You should be placing this around line 1977 BEFORE this:
PHP Code:

    eval('$dmain_jr .= "' fetch_template('downloads_main') . '";');

    if (
$dl->statslatestfiles OR $dl->statstopcontributers OR $dl->statsmostpopularfiles 0


Oops, that's DownloadsII v6 coding with the dl2 prefix :D

Kr0nica 04-26-2007 04:37 PM

Now i have a database error

PHP Code:

Database error in vBulletin 3.6.5:

Invalid SQL:
SELECT FROM dl_files WHERE;

MySQL Error  You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number 
1064
Date         
ThursdayApril 26th 2007 07:43:56 PM
Script       
http://localhost/forum/downloads.php 

You are both fast :D

CyberRanger 04-26-2007 04:42 PM

change the SQL to this:

PHP Code:

$result $db->query_read("SELECT * FROM " TABLE_PREFIX "dl_files WHERE ".$filesexclude." 1=1"); 


Kr0nica 04-26-2007 04:51 PM

1 Attachment(s)
Screen of results ;) Table is for testing, don't laugh :p

CyberRanger 04-26-2007 04:59 PM

LOL! You may want to REPLACE this:

PHP Code:

while ($file $db->fetch_array($result))
{
    
$alldownloads .= '<tr><td><a href="downloads.php?do=file&amp;id='.$file['id'].'"></a></td><td></td>'.$file['downloads'].'</tr>";



WITH:

PHP Code:

while ($file $db->fetch_array($result))
{
    
$alldownloads .= '<tr><td><a href="downloads.php?do=file&amp;id='.$file['id'].'">'.$file['name'].'</a></td><td>'.$file['downloads'].'</td></tr>";



Kr0nica 04-26-2007 05:07 PM

Thank You both very very much :D Everything works now :) You're great :up::up:
My downloads now will be look awesome :D

CyberRanger 04-26-2007 05:11 PM

Quote:

Originally Posted by Kr0nica (Post 1235944)
Thank You both very very much

Awesome! Glad it's doing what you want. My thanks to Jelle! Having a co-developer helps so much!

rayw 04-27-2007 03:27 AM

I'm loving the look of this mod, but can it be installed on 3.6.5 without to many problems?

Thanks! :)

RS_Jelle 04-27-2007 05:00 AM

Quote:

Originally Posted by rayw (Post 1236237)
I'm loving the look of this mod, but can it be installed on 3.6.5 without to many problems?

Thanks! :)

All 3.5.x and 3.6.x versions are fully supported. So 3.6.5 is supported and 3.6.6 will be supported too (or the vBulletin dev's should change something in a very weird method). There are no big vBulletin code changes between small bugfix releases.

Quote:

Originally Posted by CyberRanger (Post 1235945)
Awesome! Glad it's doing what you want. My thanks to Jelle! Having a co-developer helps so much!

If he's not too fast with writing code, so it doesn't work :D

rayw 04-27-2007 06:38 AM

Quote:

Originally Posted by RS_Jelle (Post 1236256)
All 3.5.x and 3.6.x versions are fully supported. So 3.6.5 is supported and 3.6.6 will be supported too (or the vBulletin dev's should change something in a very weird method). There are no big vBulletin code changes between small bugfix releases.

Excellent, Installs!

Thank you. :D

Phatback 04-28-2007 05:06 AM

Cool ^_^ I will begin working on expanding this :) Is there any lisence which this is released under?

RS_Jelle 04-28-2007 06:36 AM

Quote:

Originally Posted by Phatback (Post 1236849)
Cool ^_^ I will begin working on expanding this :) Is there any lisence which this is released under?

Just have a look at the package, there's a license.txt included ;)
It's always great to see some new add-ons. If there are "missing" hook locations, you can always request them for a newer version.

Stifmeister2 04-28-2007 03:17 PM

Why don't you ask the moderators/admins to move this thread over to "vBulletin 3.6 Add-ons" section ? :)


I'm sure there are many persons like me who don't even look 3.5 mods section when they have 3.6 installed. ;)

Black Tiger 04-28-2007 03:28 PM

Or copy the thread! Good idea!

Black Tiger 04-28-2007 03:38 PM

By the way Jelle... update JRE did not solve the little problem I have.
I'll try to update vBA this week and see if that gives any changes.

akulion 04-30-2007 08:16 PM

hey i was wondering is there any way to restrict users from downloading on a basis of : Post per download..

So that if you have 50 posts, u can make 50 downloads.

Cos currently a large number of members just register to download and as a result the "0 post members" is significantly increasing causing my active members % to go down greatly

logofreax 05-01-2007 06:38 AM

Hi, I use vBulletin 3.6.4 with DownloadsII 5.0.4 but now have Problems sorting Files by Name.

Every Categorie is sortet by Uploaddate.

In AdminCP I have this activated:

Sort by Weight: No

If I manually sort Files by Name over Dropdownfield everything is ok.

But if I leave an enter Downloads next time all Files are sorted by Uploaddate.

How can I fix it, that all Downloads are sorted by Filename?

cu
logofreax

rickyreter 05-01-2007 11:33 AM

Hi,have installed and all is great,apart from it won't let me download pdf files.I have set the allowed extention to lowercase with a space,and my limit on attachments is 800000 so plenty there,but it always comes up with upload error.

Can some one got any ideas on what i dong wrong...all other downloads are fine

Peter: :confused:

MotMann 05-01-2007 11:38 AM

What i must do, that the thumbs bigger and the screens in one row and the titels under the Thumbs?

RS_Jelle 05-01-2007 06:13 PM

Quote:

Originally Posted by akulion (Post 1238453)
hey i was wondering is there any way to restrict users from downloading on a basis of : Post per download..

So that if you have 50 posts, u can make 50 downloads.

Cos currently a large number of members just register to download and as a result the "0 post members" is significantly increasing causing my active members % to go down greatly

I'm sorry, but currently there's no add-on to do this or integration with a points system.

Quote:

Originally Posted by logofreax (Post 1238736)
Hi, I use vBulletin 3.6.4 with DownloadsII 5.0.4 but now have Problems sorting Files by Name.

Every Categorie is sortet by Uploaddate.

In AdminCP I have this activated:

Sort by Weight: No

If I manually sort Files by Name over Dropdownfield everything is ok.

But if I leave an enter Downloads next time all Files are sorted by Uploaddate.

How can I fix it, that all Downloads are sorted by Filename?

cu
logofreax

This is some old Ron1n code. Strangely it doens't control the order of the downloads, but the categories :D
Open your downloads.php and search for:
PHP Code:

    if ($sortfield == '')
    {
        
$sortfield 'date';
    } 

Change it to:
PHP Code:

    if ($sortfield == '')
    {
        
$sortfield 'name';
    } 

This is already fixed in v6 as there will be a category based option to control this.

Quote:

Originally Posted by rickyreter (Post 1238864)
Hi,have installed and all is great,apart from it won't let me download pdf files.I have set the allowed extention to lowercase with a space,and my limit on attachments is 800000 so plenty there,but it always comes up with upload error.

Can some one got any ideas on what i dong wrong...all other downloads are fine

Peter: :confused:

Strange, but this isn't a DownloadsII problem -I think-. It works fine for me. Maybe it's a very big PDF and your running over your PHP upload limit? So try a very small PDF to be sure if this is the case.

Quote:

Originally Posted by MotMann (Post 1238876)
What i must do, that the thumbs bigger and the screens in one row and the titels under the Thumbs?

Thumbs have a default size which you can't adjust easily. You need to modify downloads.php for this.
You can change the thumbs lay-out, but that's also in downloads.php ($dimages variable).

MotMann 05-01-2007 07:29 PM

Quote:

Originally Posted by RS_Jelle (Post 1239088)
Thumbs have a default size which you can't adjust easily. You need to modify downloads.php for this.
You can change the thumbs lay-out, but that's also in downloads.php ($dimages variable).

How must look the code, if the thumbs displayes side by side with the Text under the Thumb?

coolgus 05-01-2007 08:49 PM

Is there any way to have a file with the latest 5 entries of uploaded files so we can use it on a frontpage of a cms ?

CyberRanger 05-02-2007 01:49 AM

Quote:

Originally Posted by coolgus (Post 1239243)
Is there any way to have a file with the latest 5 entries of uploaded files so we can use it on a frontpage of a cms ?

We have an add-on for that if you are using vbAdvanced. If you examine how that works, you should be able to adapt it to any cms.

RS_Jelle 05-03-2007 04:42 AM

Quote:

Originally Posted by MotMann (Post 1239153)
How must look the code, if the thumbs displayes side by side with the Text under the Thumb?

Some fast written code:

Open downloads.php

Find
PHP Code:

            while ($image $db->fetch_array($result))
            {
                if ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditallfiles']) OR
                   ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditownfiles']) AND
                    ((
$image['uploaderid'] == $vbulletin->userinfo['userid']) AND ($file['uploaderid'] == $vbulletin->userinfo['userid']))))
                    
$edit '[<a href="./downloads.php?do=file&amp;id='.$file['id'].'&amp;act=delimg&amp;img='.$image['id'].'" onclick="return delete_it()">'.$vbphrase['delete'].'</a>]';
                {
                    if (
file_exists($dl->url.$image['thumb']))
                    {
                        
$dimages .= '<a href="'.$dl->url.$image['name'].'"><img src="'.$dl->url.$image['thumb'].'" alt="'.$file['name'].'" title="'.$file['name'].'" border="0" /></a> by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'<br />';
                    }
                    else
                    {
                        
$dimages .= '<a href="'.$dl->url.$image['name'].'">'.$image['name'].'</a> by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'<br />';
                    }
                }
            } 

Change to
PHP Code:

            $dimages .= '<table cellpadding="0" cellspacing="2" border="0"><tr>';
            while (
$image $db->fetch_array($result))
            {
                if (
file_exists($dl->url.$image['thumb']))
                {
                    
$dimages .= '<td><a href="'.$dl->url.$image['name'].'"><img src="'.$dl->url.$image['thumb'].'" alt="'.$file['name'].'" title="'.$file['name'].'" border="0" /></a></td>';
                }
                else
                {
                    
$dimages .= '<td><a href="'.$dl->url.$image['name'].'">'.$image['name'].'</a></td>';
                }
            }
            
$dimages .= '</tr><tr>';
            while (
$image $db->fetch_array($result))
            {
                if ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditallfiles']) OR
                   ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditownfiles']) AND
                    ((
$image['uploaderid'] == $vbulletin->userinfo['userid']) AND ($file['uploaderid'] == $vbulletin->userinfo['userid']))))
                {
                    
$edit '<span class="smallfont"><a href="./downloads.php?do=file&amp;id='.$file['id'].'&amp;act=delimg&amp;img='.$image['id'].'" onclick="return delete_it()">'.$vbphrase['delete'].'</a></span>';
                }

                if (
file_exists($dl->url.$image['thumb']))
                {
                    
$dimages .= '<td>by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
                }
                else
                {
                    
$dimages .= '<td>by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
                }
            }
            
$dimages .= '</tr></table>'

As I said, it's rough code. It's just written to work, but that's all :D

rickyreter 05-03-2007 07:28 AM

Strange, but this isn't a DownloadsII problem -I think-. It works fine for me. Maybe it's a very big PDF and your running over your PHP upload limit? So try a very small PDF to be sure if this is the case.
[/QUOTE]

Well yes i suppose its a large file,its not often i use pdf for site but was impressed with mod and its simplicity the file is 7.9mb ...not checked the php limit...but not really bothered as just ftp to site then gave a url to file instead as only got the 1 file and most are zip.

Excellent mod and very happy

Thanks Peter

TotalTorque.net 05-03-2007 08:40 AM

Works fine for me although I find the upload error process annoying. It waits, seemingly, for the file upload to complete and then tells you if the file format is incorrect (or similar).

Still, an excellent modification.

MotMann 05-03-2007 01:22 PM

Quote:

Originally Posted by RS_Jelle (Post 1240358)
As I said, it's rough code. It's just written to work, but that's all :D

OK..

Parse error: syntax error, unexpected T_ELSE in /www/htdocs/xxxxxxxx/Board/Forum/downloads.php on line 1022

:D

RS_Jelle 05-03-2007 01:29 PM

Quote:

Originally Posted by rickyreter (Post 1240422)
Well yes i suppose its a large file,its not often i use pdf for site but was impressed with mod and its simplicity the file is 7.9mb ...not checked the php limit...but not really bothered as just ftp to site then gave a url to file instead as only got the 1 file and most are zip.

Excellent mod and very happy

Thanks Peter

7.9MB isn't very small, a lot of hosts are setting smaller values as the PHP upload limit. But you can change this easily with a .htaccess (have a search in the thread for this).

Quote:

Originally Posted by TotalTorque.net (Post 1240450)
Works fine for me although I find the upload error process annoying. It waits, seemingly, for the file upload to complete and then tells you if the file format is incorrect (or similar).

Still, an excellent modification.

And is it really incorrect, or not?

TotalTorque.net 05-03-2007 02:36 PM

Yes, but the point is...if it checked the file type before commencing the full upload, it'd save a lot of time.

RS_Jelle 05-03-2007 04:28 PM

Quote:

Originally Posted by TotalTorque.net (Post 1240645)
Yes, but the point is...if it checked the file type before commencing the full upload, it'd save a lot of time.

That's a bit difficult, just because the PHP routine: it's a post method form, so when you click the submit button the first it does is uploading it totally before processing the php work.

So the same "problem" also exist for the vBulletin attachement manager for forum posts. At the moment there's no real fix possible.

BozzaJos 05-03-2007 06:24 PM

Hi CyberRanger and Jelle,

I just love this mod.. and my member do to!

I'm planning on upgrading my board from 3.5 to 3.6 soon and I was wondering how the developments of the new version are going? Perhaps you could give us a little update, would be sweet!

Anyway, keep up the great job!

logofreax 05-03-2007 06:56 PM

Thank you RS_Jelle's

Now my Downloads are sortet right. But now my Categories are sortet from Z to A. How can I fix this Problem now?

cu
logofreax

wolfe 05-03-2007 10:32 PM

is it possible to make the download page an index infront of the forums example

http://www.site.com/index.php (downloads.php)


All times are GMT. The time now is 02:28 AM.

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.04631 seconds
  • Memory Usage 1,941KB
  • 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
  • (1)bbcode_html_printable
  • (13)bbcode_php_printable
  • (22)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