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"); 



All times are GMT. The time now is 12:37 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.04211 seconds
  • Memory Usage 1,781KB
  • 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
  • (7)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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