vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   ecDownloads Buddy (https://vborg.vbsupport.ru/showthread.php?t=111293)

DementedMindz 04-18-2006 03:04 PM

would you be interested in adding a Bytes to Mega Bytes Converter/Bandwidth Calculator??? say as a link like manage files and such? i made a script and its 100% html complaint

DementedMindz 04-18-2006 03:47 PM

ill upload the converter so you can take a look i think it would be nice on another link this way its easier for members who upload large files to convert there files size easier... its 100% html complaint too :banana:.... would even be good for members to run from desktop if they want too since its html right now to show you what it does... i run it from my desktop right now but it would be so much easier if it was on the downloads page....

CyberRanger 04-18-2006 07:25 PM

Thanks, I'll take a look at it (looks nice!) and see if I can figure out how to integrate it.;)

DementedMindz 04-18-2006 08:16 PM

thanks :) i figured it would come in handy if members upload larger files and they had to link to this way they can get the file size easy...

EvilHawk 04-20-2006 09:25 AM

Quote:

Originally Posted by DementedMindz
um maybe a feature... would you be able to include something to clear out who downloaded? like if your in admincp and you click on the downloads it shows you everyone who downloaded... im up to page 45 lol and its not lookin to nice it goes all the way across the bottom...

heres a example

[1][2][3][4][5][6][7][8][9][10]

I have fixed this problem, i also send the code to Ron1n but he refused to change it !

Open your downloadadmin.php (at your admincp dir) find this

Code:

// ########################################################
// ###################### Downloads #######################
// ########################################################
if ($_GET['do'] == 'downloads')
{
        if ($_GET['page'] == '')
                $_GET['page'] = 1;
        $start = (25)*($_GET['page']-1);
               
        $result = $db->query_first("SELECT COUNT(`id`) AS downloads FROM " . TABLE_PREFIX . "dl_downloads");

        $results = $result['downloads'];
        if ($results > 25)
                for ($i = 0; $i < $results; $i+=25)
                {
                        if ($i > $start && $i < $start+25)
                                $navigation .= '[<a href="downloadadmin.php?do=downloads&page='.($i/25+1).'"><font color="#FF0000">'.($i/25+1).'</font></a>]';
                        else
                                $navigation .= '[<a href="downloadadmin.php?do=downloads&page='.($i/25+1).'">'.($i/25+1).'</a>]';
                }
       
        print_cp_header('Downloads');
        print_table_start('downloadadmin');
        print_table_header('Downloads', 4);
       
        $class = fetch_row_bgclass();
        echo '<tr><td class="'.$class.'"><b>User</b></td><td class="'.$class.'"><b>File</b></td><td class="'.$class.'"><b>Time</b></td><td class="'.$class.'"><b>Filesize</b></td></tr>';
       
        $result = $db->query("SELECT * FROM " . TABLE_PREFIX . "dl_downloads ORDER BY `id` DESC LIMIT ".$start.",".(25));
        while ($download = $db->fetch_array($result))
        {
                $class = fetch_row_bgclass();
                echo '<tr><td class="'.$class.'"><a href="../member.php?u='.$download['userid'].'">'.$download['user'].'</a></td><td class="'.$class.'"><a href="../downloads.php?do=file&id='.$download['fileid'].'">'.$download['file'].'</a></td><td class="'.$class.'">'.vbdate($vbulletin->options['dateformat'],$download['time'],true).'</td><td class="'.$class.'">'.$download['filesize'].'</td></tr>';
        }       
        $class = fetch_row_bgclass();
        echo '<tr><td class="'.$class.'" colspan="4" align="center">'.$navigation.'</td></tr>';
       
        print_table_footer(4);       
        print_cp_footer();
}

and replace the code with this

Code:

// ########################################################
// ###################### Downloads #######################
// ########################################################
if ($_GET['do'] == 'downloads')
{
                $vbulletin->input->clean_array_gpc('r', array(
                'perpage'    => TYPE_UINT,
                'pagenumber' => TYPE_UINT,
                ));
       
        $vbulletin->GPC['perpage'] = 25;
       
        $result = $db->query_first("SELECT COUNT(`id`) AS downloads FROM " . TABLE_PREFIX . "dl_downloads");
        $logs = $result['downloads'];
        $totalpages = ceil($result['downloads'] / $vbulletin->GPC['perpage']);

        if ($vbulletin->GPC['pagenumber'] < 1)
        {
                $vbulletin->GPC['pagenumber'] = 1;
        }
        $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
       
       
        $result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl_downloads ORDER BY `id` DESC LIMIT $startat, " . $vbulletin->GPC['perpage'] . "        ");
        if ($db->num_rows($result))
        {
                if ($vbulletin->GPC['pagenumber'] != 1)
                {
                        $prv = $vbulletin->GPC['pagenumber'] - 1;
                        $firstpage = "<input type=\"button\" class=\"button\" value=\"&laquo; " . $vbphrase['first_page'] . "\" tabindex=\"1\" onclick=\"window.location='downloadadmin.php?do=downloads&page=1'\">";
                        $prevpage = "<input type=\"button\" class=\"button\" value=\"&lt; " . $vbphrase['prev_page'] . "\" tabindex=\"1\" onclick=\"window.location='downloadadmin.php?do=downloads&page=$prv'\">";
                }

                if ($vbulletin->GPC['pagenumber'] != $totalpages)
                {
                        $nxt = $vbulletin->GPC['pagenumber'] + 1;
                        $nextpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['next_page'] . " &gt;\" tabindex=\"1\" onclick=\"window.location='downloadadmin.php?do=downloads&page=$nxt'\">";
                        $lastpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['last_page'] . " &raquo;\" tabindex=\"1\" onclick=\"window.location='downloadadmin.php?do=downloads&page=$totalpages'\">";
                }

  }
  $page = $vbulletin->GPC['pagenumber'];
       
        print_cp_header('Downloads');
        print_table_start('downloadadmin');
        print_table_header("Downloads - Total log entries: $logs - Page: $page of $totalpages", 4);
       
        $class = fetch_row_bgclass();
        echo '<tr><td class="'.$class.'"><b>User</b></td><td class="'.$class.'"><b>File</b></td><td class="'.$class.'"><b>Time</b></td><td class="'.$class.'"><b>Filesize</b></td></tr>';

        while ($download = $db->fetch_array($result))
        {
                $class = fetch_row_bgclass();
                echo '<tr><td class="'.$class.'"><a href="../member.php?u='.$download['userid'].'">'.$download['user'].'</a></td><td class="'.$class.'"><a href="../downloads.php?do=file&id='.$download['fileid'].'">'.$download['file'].'</a></td><td class="'.$class.'">'.vbdate($vbulletin->options['dateformat'],$download['time'],true).'</td><td class="'.$class.'">'.$download['filesize'].'</td></tr>';
        }       
 
  print_table_footer(4, "$firstpage $prevpage &nbsp; $nextpage $lastpage");       
        print_cp_footer();
}

and your downloads log will look like this :

Attachment 46101

CyberRanger 04-20-2006 09:28 AM

Quote:

Originally Posted by EvilHawk
I have fixed this problem, i also send the code to Ron1n but he refused to change it !

Yeah, he's interesting about that. I wish I could fix that with Downloads Buddy but it's outside the scope of what I can get to without another hook.

EvilHawk 04-20-2006 09:34 AM

Westpointer let's face the truth, without you and the support you gave this hack would have been obsolete a long time ago. The author, from the very first vesion for vb 3.0.x, never supported it ..

DementedMindz 04-20-2006 11:34 AM

EvilHawk thanks for that fix lol cause the way it was looked terrible... thanks again

Crazy Serb 04-22-2006 06:47 PM

what's weird is that when I installed this plugin, added that line of code to downloads.php, and went to my usergroup manager to edit one of the usergroups, here is what I keep getting (once I choose "edit usergroup" for any of my usergroups):

"Rebuilt Bitfields Successfully"

and that page keeps on refreshing over and over... and I can't get into the usergroup options whatsoever...

so I was forced to disable this plugin for now.

CyberRanger 04-22-2006 10:33 PM

That's very weird. The "rebuild bitfield" command is the same one that I added to the main ecDownloads product and the command is at the product install level, not at the plugin level. I'll see if I can figure out anything that could make that happen.


All times are GMT. The time now is 10:27 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.01294 seconds
  • Memory Usage 1,763KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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