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 or addon for listings

Started by Corvette, 01.03.2020 00:10:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corvette

Wondering if you all will have available a module of sorts to be able to have on the, for instance, right menu, a listing of "Authors" that can show a list of all files associated with an "Author" - specifically, a D.J., who is the author of the file.
  •  

Corvette

I have the SQL created, just don't know how to create a link.  Goal is to have a menu on the right side of the site with a listing of "Author's" for quick links to all shows/Podcasts by that selected 'Author'.


<? $sql = "SELECT * FROM `pa_jdownloads_files` WHERE `author` = \'philE\'"; ?>
  •  

Corvette

Would I make a copy of "jDownloads Tree" and modify it to reflect 'Author' - and  if so, is it possible?   


<?php
/**
* @version      $Id: mod_jDMTree1.5.5
* @package      DOCMan jDMTree Module for Joomla 1.5
* @copyright   Copyright (C) 2008-2010 youthpole.com. All rights reserved.
* @author     Josh Prakash
* @license      GNU/GPL, see LICENSE.php
* This module is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
*
* Dec-20-2010 Adapted and modified for jDownloads by Arno Betz
* Aug-20-2011 Adapted and modified for jDownloads 1.9 by Arno Betz
* Jun-16-2015 Adapted and modified for jDownloads 3.2 by Arno Betz
* Version 3.8.0
*
*/

// no direct access
    defined('_JEXEC') or die('Restricted access');

    require_once(JPATH_SITE.DS.'modules'.DS.'mod_jdownloads_tree'.DS.'jdtree'.DS.'jdownloadstree.php');
    require_once __DIR__ . '/helper.php';
   
    $user = JFactory::getUser();
   $db     = JFactory::getDBO();
   
    $lang = JFactory::getLanguage();
    $lang->load('com_jdownloads');     
   
    $Itemid  = JRequest::getVar("Itemid");
   
    // get published root menu link
    $db->setQuery("SELECT id from #__menu WHERE link = 'index.php?option=com_jdownloads&view=categories' and published = 1 AND client_id = 0");
    $root_itemid = $db->loadResult();
    if ($root_itemid){
        $Itemid = $root_itemid;
    }

    $home_url = JRoute::_('index.php?option=com_jdownloads&amp;view=categories&amp;Itemid='.$Itemid);
    $home_link = '<a href="'.$home_url.'">'.JText::_('COM_JDOWNLOADS_HOME_LINKTEXT').'</a>';

    $lengthc    = intval( $params->get( 'lengthc', 20 ) );    // Max length of category before truncation
    $baseGif = "modules/mod_jdownloads_tree/jdtree/images/base.gif";
    $nodeId = 0;
    $counter = 0;
    $catlink = "";
    $curcat = 0;
    $precat = -1;

    $rows = modJdownloadsTreeHelper::getList($params);

    if (!count($rows)) {
        return;
    }

    $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));

    require JModuleHelper::getLayoutPath('mod_jdownloads_tree',$params->get('layout', 'default'));   
?>
  •