News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Show All Downloads Sort by Hits as a URL / Link?

Started by Nyx, 04.03.2019 16:51:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nyx

Hello,

I want make a button in the Module "Top downloads" for a Link to show All Downloads Sort by Hits.
The default Sort from jDownloads is by Date.

e.g. http://www.jdownloads.com/index.php/downloads/all.html

Sort only for this Link by "Hits" and not the default Sort from the jdownloads config.

e.g.:


echo $html = '<a href="/all" onclick="Joomla.tableOrdering('downloads','asc','');return false;" class="hasTip" title="" data-content="" data-placement="top" data-original-title="Downloads">Alle Top Downloads</a>';



$topfiles_url   = JRoute::_('index.php?option=com_jdownloads&view=downloads&type=top&Itemid='.$root_itemid);

echo $html = '<a href="'.$topfiles_url.'">Alle Top Downloads</a>';


but this codes are don't work for a button / link.

Any ideas?
  •  

Arno

Hm,
are not sure that I understand you correctly but the url seems to be okay for me. What get you as result?


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

ColinM

Hi
I am also confused! :(

By 'hits' do you mean the number of times a Download has been downloaded? 
Hits are the Number of times the file in a Download has beed downloaded

The Top Module shows the Downloads ordered  by hits .  If you leave the Category blank in the module setup then it shows the ordered list for all Downloads. Editted

Colin
Colin M
  •  

Nyx

Thanks for the Answers!

For better understanding:

i have the Module "jDownloads Top" that shows the title of the top 10 Downloads of all Categorys.

Now i want make a "show more" butten at the end oft the 10 Downloads in the Module.

If you click this, the should go to the Downloadsite, with all Downloads / items, sort by Hits/ Top downloads
e.g. http://www.jdownloads.com/index.php/downloads/all.html

This is the code of the sort button from Jdownloads (Order files by)
echo $html = '<a href="/all" onclick="Joomla.tableOrdering("downloads","asc","");return false;" class="hasTip" title="" data-content="" data-placement="top" data-original-title="Downloads">Alle Top Downloads</a>';


When i make a link with this code in the Top module, the echo command have a problem with the , or ;.

Quotesyntax error, unexpected 'downloads' (T_STRING), expecting ',' or ';'

and this modified code:

echo $html = '<a href="/all" onclick="Joomla.tableOrdering("downloads"\,"asc"\,"");return false;" class="hasTip" title="" data-content="" data-placement="top" data-original-title="Downloads">Alle Top Downloads</a>';

When i click the button, it will go to the url: https://xxx.com/all without errors.
But the File Order is the default File order and not, by "top/hits"


The second Code, i have from "/xxx/components/com_jdownloads/views/downloads/tmpl/default.php"

$topfiles_url   = JRoute::_('index.php?option=com_jdownloads&view=downloads&type=top&Itemid='.$root_itemid);

echo $html = '<a href="'.$topfiles_url.'">Alle Top Downloads</a>';


When i click the button, it will go to the url: https://xxx.com/all?type=top without errors.
But the File Order is the default File order and not, by "top/hits".


  •  

Nyx

Any Idea?
@Arno: Or should i explain in german for better understanding?
  •  

Nyx

Hello again,

maybe i found a way to do this.
I need a link, that will show all Downloads sort by Top Downloads/Hits.

I can make a new menu link for this, but there is no option for sort by top downloads /hits.
See the attachment.

Maybe as a new feature in the next release?

[gelöscht durch Administrator]
  •  

ColinM

Nyx,
Think the best scheme is for you make a suggestion that jD supports 'sort by hits' as well as existing sort options.  Think that might be usefull to many people
Another suggestion could be that the jD modules have a show next button.Both involve quite a bit of work.
ColinPS you could also make the number shown in the list longer!
Colin M
  •  

ColinM

Nyx
jD does support searching by Hits - I had forgotten!!  You can also add navigation at the top and bottom.

One can set up a menu item 'Show All Downloads' and in that select order by Most Hits.  Also one can set the number of Downloads listed per pageColin
Colin M
  •  

Nyx

Quote from: ColinM on 25.06.2019 14:30:36
One can set up a menu item 'Show All Downloads' and in that select order by Most Hits.  Also one can set the number of Downloads listed per pageColin

Maybe in german it's call "Beliebteste zuerst" ?

but, i can't test it - I have the Bug / Error 0 -> http://www.jdownloads.com/index.php/support-forum.html?topic=11646.0
  •