News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Module - Top rated & Stats

Started by Nyx, 07.01.2015 15:23:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nyx

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.

  •  

Arno

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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

.... 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.
  •  

Arno

Please post it here as zip...
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

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>';     
?>

?>
  •  

Arno

ah... okay. Not a problem.  ;D
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Arno

I work on it but i need a few days... a few bugs are current more important.  :-\
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

  •  

Nyx

Hi,... may be new news about the rating module?  ;)
  •  

Arno

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.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

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

Arno

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Nyx

  •  

Nyx

Hi me again  :P

,... may be new news about the rating module?  ;)
  •  

Nyx

Hi Arno,

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

  •