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

Improved Top Module

Started by HerKle, 13.09.2016 01:18:47

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HerKle

Hi,
I wanted to show the most often downloaded files in a module (using the css style for menus, since the links to the downloads are in a way a menu) and found jDownloads_top. Unfortunately, none of my menu css worked (normally I add 'menu' to the modules suffix and that's it) since the module uses tables. So I started writing a template override. But sooner or later I had to make changes to the module's core files. That's why I decided to copy the module into a new one and apply all my changes there:

  • Use list <ul><ol> instead of <table>. The original module offered an option for an ordered list by adding numbers to table rows. I think using the ordered list is more elegant.
  • Thumbnail in old menu applies one size for both width and height, which means all the images have to be squares - that's among my downloads a rare case. So that's why I added the choice to apply the size for either height or width while the respective other dimension is set to "auto".
  • When using images you might wish to float the text around it. I added this possibility to the menu with the choice to float right or left.
  • When using float in a list element the next list element will float too. In order to prevent this, I added a minimum height for the <li> tag, when float is activated (by taking the value for imagesize as height+15px for the top and bottom margins). This works fine, if you chose 'height' as standard. If 'width' is chosen the scaled height is calculated and 15px for margins added.
  • As fan of generalized css files I hate style attributes in single elements (because they ignore all previous css definitions of the site). So I tried to reduce these to the necessary minimum by adding class definitions to the html tags.
I tried all the possible combinations of option settings and I'm satisfied. You can see it work here http://alkoholpolitik.de/index.php/dokumente. I never made a module, and I'm happy that I managed - thanks to Arno's well done first version. If you find it useful, I share it here with the community.
Kind regards, Herbert
Kind regards, Herbert
  •  

ColinM

Herbert
Will certainly look at your module.  Like you I prefer a non table based css style and have changed the layouts.  Have not yet got around to the Modules.

What you have done looks good.

Colin
Colin M
  •  

HerKle

Image float when "width" is selected standard now works also fine. I exchanged the module package in the original post.
Kind regards, Herbert
  •  

HerKle

Now, after two more days, I offer two modules using list tags, which can easily be used in menus (Latest Downloads and Top Downloads).
These distinguish from the basic modules as follows:

  • Use of list tags <ol> or <ul> lets the module integrate into menu structures offered by Joomla core.
  • Two text fields before and after 'hits' (Top) resp. 'date' (Latest) meet different language requirements and in general offer possibilities to integrate the values into phrases.
  • The value of the thumbnail size can be applied either to height or to width, which allows no-square-images to be presented in correct dimensions.
  • A possibility to let the text float around (left or right) the thumbnails has been added.
  • Floating requires a minimum height for the <li> tag. According to the choice of height or width as fixed value, the corresponding other dimension defines the minimum height, including some additional margin.
  • Two text fields before and after the download's category (link) offer the same advantages mentioned earlier (see hits resp. date values).
  • Values for font size and color are no longer compulsory. This leaves the possibility to apply css styles defined elsewhere (eg. stylesheets in css file).
  • Values for font size and color can be set either or both.
  • Values for font size and color apply to all additional text, i.e. hits and category (link) in Top Menu resp. date and category (link) in Latest Module. This allows consistent layout appearance, while leaving freedom to design otherwise by using  css styles.
All the other elements of the original modules (text before and after list, category selection, title truncation, alignment, link to download (page), description in tooltip and file format icon are of course still in use.
Hope the jDownload developers will find this useful and integrate it into the future packages.
The modules can be seen live on http://alkoholpolitik.de/index.php/dokumente.
Kind regards, Herbert

[gelöscht durch Administrator]
Kind regards, Herbert
  •