jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: Nyx on 07.01.2015 15:23:11

Title: Module - Top rated & Stats
Post by: Nyx on 07.01.2015 15:23:11
Hello,

I know, it's not the final Version of JD 3 and you have a lot of work.
But when you think are the two Modules:

mod_jdownloads_top_rated
mod_jdownloads_stats

will be updated for JD 3 and available to download?
It's important for me.

Title: Re: Module - Top rated & Stats
Post by: Arno on 08.01.2015 13:17:53
Puh... not easy. We must fix round 4 bugs currently yet then we can publish the first stable release.
So we need a few days for it.

But i will view in this module to check how much work is required to make it compatible...  ::)
Please send me a reminder tomorrow.
Title: Re: Module - Top rated & Stats
Post by: Nyx on 09.01.2015 10:35:09
.... I'm a little reminder ....  ;)

Ps: I think the module mod_jdownloads_stats should be the "same" code as in the JD backend Stats, or?
I try it to find the code and make a own module.... but .. my version don't work.
Title: Re: Module - Top rated & Stats
Post by: Arno on 09.01.2015 11:49:20
Please post it here as zip...
Title: Re: Module - Top rated & Stats
Post by: Nyx on 09.01.2015 12:36:41
oh,..ähm,... i don't think it will be a help for you.   ;D
It is only code snipps from your old module, that don't work with the J 3.x ;)

e.g:


<?php
/**
 * Jdownloads mod_jdownloads_stats
 */
 
// no direct access
defined'_JEXEC' ) or die( 'Restricted access' );
Error_Reporting(E_ERROR);

$database = &JFactory::getDBO(); 
$user = &JFactory::getUser(); 

$text            trim($params->get'text' ) );
$text_admin      trim($params->get'text_admin' ) ); 
$color           trim($params->get'value_color' ) );
$alignment       = ($params->get'alignment' ) ); 
$moduleclass_sfx = ($params->get'moduleclass_sfx' ) );
$sumfiles 0;
$sumfiles2 0;
$sumfiles3 0;
$sumcats 0;
$sumcats2 0;

    if (
$value_color == '#'$value_color '';
    
    
$access '';
    if (
$user->aid == 0$access '01';
    if (
$user->aid == 1$access '11';
    if (
$user->aid == 2$access '22';
    
    
$catids = array();
    
$database->setQuery('SELECT cat_id FROM #__jdownloads_categories WHERE published = 1 AND access <= '.$access);
    
$catids $database->loadResultArray(0);
    
$sumcats count($catids);
    
$catid implode(','$catids);
    
    
$database->setQuery("SELECT COUNT(*) FROM #__jdownloads_files WHERE published = 1 AND cat_id IN ($catid) ");
    
$sumfiles intval($database->loadResult());
    
    
$database->setQuery("SELECT SUM(downloads) FROM #__jdownloads_files WHERE published = 1 AND cat_id IN ($catid) ");
    
$sumdownloads intval($database->loadResult());
        
    
$html '';
    
$html '<table class="moduletable'.$moduleclass_sfx.'">';
    
    if (
$text <> ''){
        
$text str_replace('#1''<font color="'.$color.'">'.$sumfiles.'</font>'$text);
        
$text str_replace('#2''<font color="'.$color.'">'.$sumcats.'</font>'$text);
        
$text str_replace('#3''<font color="'.$color.'">'.$sumdownloads.'</font>'$text);
        
$html .= '<tr valign="top"><td align="'.$alignment.'">'.$text.'</td></tr>';
    }
    
    
$cat_ids = array(); 
    if (
$user->aid == && $text_admin <> ''){
        
$database->setQuery("SELECT cat_id FROM #__jdownloads_categories WHERE published = 0");
        
$catids $database->loadResultArray();
        
$sumcats2 count($catids);
        
        if (
$catids){
            foreach (
$catids as $catid){
               
$database->setQuery("SELECT COUNT(*) FROM #__jdownloads_files WHERE cat_id = $catid");
               
$sumfiles2 $sumfiles2 intval($database->loadResult());
            }
        }
        
$cat_id implode(','$catids);
        if (
$cat_id){
            
$database->setQuery("SELECT COUNT(*) FROM #__jdownloads_files WHERE published = 0 AND cat_id NOT IN ($cat_id)");
            
$sumfiles3 intval($database->loadResult());
        }    

        
$text_admin '<hr>'.$text_admin;
        
$text_admin str_replace('#4''<font color="'.$color.'">'.$sumcats2.'</font>'$text_admin);
        
$text_admin str_replace('#5''<font color="'.$color.'">'.$sumfiles2.'</font>'$text_admin);
        
$text_admin str_replace('#6''<font color="'.$color.'">'.$sumfiles3.'</font>'$text_admin);
        
$html .= '<tr valign="top"><td align="'.$alignment.'">'.$text_admin.'</td></tr>';
    }
    
    echo 
$html.'</table>';     
?>

?>
Title: Re: Module - Top rated & Stats
Post by: Arno on 09.01.2015 14:31:55
ah... okay. Not a problem.  ;D
Title: Re: Module - Top rated & Stats
Post by: Arno on 10.01.2015 13:24:45
I work on it but i need a few days... a few bugs are current more important.  :-\
Title: Re: Module - Top rated & Stats
Post by: Nyx on 10.01.2015 21:05:30
Okay, thanks  :)
Title: Re: Module - Top rated & Stats
Post by: Nyx on 02.03.2015 10:21:21
Hi,... may be new news about the rating module?  ;)
Title: Re: Module - Top rated & Stats
Post by: Arno on 09.03.2015 23:42:21
Hi,
sad to say but i had not the time for this. The work on the stable version was more important.
This is now published so we can work now again also on the missing other modules.
Title: Re: Module - Top rated & Stats
Post by: Nyx on 10.03.2015 10:49:15
Hi,

yes, i have install it. very nice -> thank you for your hard work  :)

For the module, ok then i hope you will have soon time for the rating module.
Then i can start with my website ;-)
Title: Re: Module - Top rated & Stats
Post by: Arno on 26.03.2015 02:45:44
Hi,
the new stats module comes tomorrow:
http://www.jdownloads.com/forum/index.php?topic=7974.msg32015#msg32015
Title: Re: Module - Top rated & Stats
Post by: Nyx on 05.04.2015 00:14:17
Nice, Thanks!
Title: Re: Module - Top rated & Stats
Post by: Nyx on 15.04.2015 23:34:28
Hi me again  :P

,... may be new news about the rating module?  ;)
Title: Re: Module - Top rated & Stats
Post by: Nyx on 02.06.2015 01:07:29
Hi Arno,

I know you have a lot of work,.. but,.. any news or a roadmap about the rating module?

Title: Re: Module - Top rated & Stats
Post by: Arno on 20.06.2015 13:59:57
Hi,
we have worked in the last time on some modules. So it comes with the next version 3.2.34 again two reworked modules (Tree Modules and Last downloaded Files module).
The raing module is still in the ToDo list and will be the next.
Title: Re: Module - Top rated & Stats
Post by: Nyx on 22.06.2015 10:08:22
ok, thanks for the info  :)