jDownloadsownloads.com


Author Topic: Minor issue with {sort_order} in File layout's subheading (jDownloads v1.9 b925)  (Read 2237 times)

0 Members and 1 Guest are viewing this topic.

Offline formidable

  • Newbie
  • *
  • Posts: 1
I'm loving the flexibility of jDownloads; made a donation for our domain after a single weekend of use!  I'm especially fond of the custom layout feature; definitely better than any other Joomla file manager component I've used!

For the time being -- until the next release, where we'll hopefully see a customizable front-end upload form --, I've modified "components\com_jdownloads\jdownloads.html.php" to customize our front-end upload form.  (We dropped the tables with the absolute column widths and opted for a more CSS-able structure.)  That need was specific to our environment, and I've seen other enhancement requests in the forum to make a configurable layout for the front-end upload form, so I didn't bother creating a thread to document our changes.  (Besides, that's purely an enhancement request, not a bug!)


I found another issue though -- one that's so minor that it probably barely qualifies as a bug.  It's extremely minor, but it isn't just specific to my environment.  On the front end File view, the {sort_order} in the subheading has an odd nesting.  The left square-bracket around the sort order (ascending/descending) was embedded within the link, but the right bracket was outside the link.  Like I said, this is incredibly minor... except that I'm using CSS to add horizontal margins around the links in the subheading.  It seems to me that both brackets ought to be within the link tag, or outside of it.  (I opted to drop the brackets outside the link tag in my fix.)

To fix this, I just changed 1801-1805 in "components\com_jdownloads\jdownloads.php" from:
Code: [Select]
if ($dir == 'asc' || $dir == ''){
   $sort_direction = '<a href="'.JRoute::_('index.php?option=com_jdownloads&amp;Itemid='.$Itemid.'&amp;view=viewcategory&amp;catid='.$catid.'&amp;limitstart='.$limitstart.'&amp;order='.$order.'&amp;dir=desc').'">['.JText::_('COM_JDOWNLOADS_FE_SORT_ORDER_DESC').'</a>]';
} else{
   $sort_direction = '<a href="'.JRoute::_('index.php?option=com_jdownloads&amp;Itemid='.$Itemid.'&amp;view=viewcategory&amp;catid='.$catid.'&amp;limitstart='.$limitstart.'&amp;order='.$order.'&amp;dir=asc').'">['.JText::_('COM_JDOWNLOADS_FE_SORT_ORDER_ASC').'</a>]';
}   

To:
Code: [Select]
if ($dir == 'asc' || $dir == ''){
   $sort_direction = '[<a href="'.JRoute::_('index.php?option=com_jdownloads&amp;Itemid='.$Itemid.'&amp;view=viewcategory&amp;catid='.$catid.'&amp;limitstart='.$limitstart.'&amp;order='.$order.'&amp;dir=desc').'">'.JText::_('COM_JDOWNLOADS_FE_SORT_ORDER_DESC').'</a>]';
} else{
   $sort_direction = '[<a href="'.JRoute::_('index.php?option=com_jdownloads&amp;Itemid='.$Itemid.'&amp;view=viewcategory&amp;catid='.$catid.'&amp;limitstart='.$limitstart.'&amp;order='.$order.'&amp;dir=asc').'">'.JText::_('COM_JDOWNLOADS_FE_SORT_ORDER_ASC').'</a>]';
}


Joomla version: 2.5.2 Stable
jDownloads version: 1.9.0 Stable, build 925
PHP version: 5.3.10
MySQL version: 5.5
Webserver: IIS 7.5