By Ash Quadir on Wednesday, 27 July 2011
Posted in General Issues
Replies 12
Likes 0
Views 805
Votes 0
<p>Currently all the categories for mod_easyblogcategories module are show as a list.  Is there any way to list all the categories in a dropdown?</p>
<p> </p>
<p><span style="font-family: Arial, Helvetica, sans-serif; color: #666666;"><span style="font-size: 11px; line-height: normal; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br /></span></span></p>
<p> </p>
So I need to do the same but if I use this template override it breaks my site. I'm assuming because it's pretty old. Is there anyway you guys would update it for me so I could use it with the latest versions of Easyblog?
·
Thursday, 10 April 2014 06:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Justin,

Sure, can you pass me your Joomla admin access and your ftp account so that I can modify the file directly from your site? Please copy the default.php and item.php file from module theme folder into your Joomla template first Also, please let me know the url to where this module will be appeared.

Thanks and have a nice day
Sam
·
Thursday, 10 April 2014 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm sorry, I got impatient and went ahead and did it. I'm posting what I did here for other users:

/template/html/mod_easyblogcategories/default.php
<?php
/**
* @package EasyBlog
* @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
* @license GNU/GPL, see LICENSE.php
*
* EasyBlog 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.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access');
?>


<script type="text/javascript">
function redirectMe( element )
{
window.location.href= element.value;
}
</script>
<div id="ezblog-categories" class="ezb-mod mod_easyblogcategories<?php echo $params->get( 'moduleclass_sfx' ) ?>">
<?php if(!empty($categories)){ ?>
<select name="eblog-category" onchange="redirectMe( this );">
<?php echo modEasyBlogCategoriesHelper::accessNestedCategories( $categories , $selected , $params ); ?>
</select>
<?php } else { ?>
<?php echo JText::_('MOD_EASYBLOGCATEGORIES_NO_CATEGORY'); ?>
<?php } ?>
</div>


/template/html/mod_easyblogcategories/item.php
<?php
/**
* @package EasyBlog
* @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
* @license GNU/GPL, see LICENSE.php
*
* EasyBlog 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.
* See COPYRIGHT.php for copyright notices and details.
*/

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



<option value="<?php echo EasyBlogRouter::_('index.php?option=com_easyblog&view=categories&layout=listings&id='.$category->id . $menuItemId );?>"><?php echo JText::_( $category->title ); ?></option>
·
Thursday, 10 April 2014 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Justin
·
Friday, 11 April 2014 00:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually I do need a little help with that. With what I have the ordering parameter no longer does anything. Any ideas?
·
Friday, 11 April 2014 03:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

Your code changes only modified the output to a dropdown listing. What ordering are you referring to here?
·
Friday, 11 April 2014 11:08
·
0 Likes
·
0 Votes
·
0 Comments
·
I want to be able to order them alphabettically, by popularility, order etc...like the module parameters offer.
·
Friday, 11 April 2014 23:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

You will need to hack the file /modules/mod_easyblogcategories/helper.php
·
Friday, 11 April 2014 23:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Anyway you could advise me on how to get child categories to display as if they were parents. I want to sort categories alphabetically for ALL categories but with helper.php as is, it sorts the parents alpabetically and then the children are directly underneath. I.e.

About - Parent
A - Child
B - Child
C - Child
All About - Parent

I'm looking for:

About
A
All About
B
C
·
Wednesday, 16 April 2014 03:06
·
0 Likes
·
0 Votes
·
0 Comments
·
This requires quite a bit of customization Justin and it's not just a simple hack because the current logics on the helper.php is to fetch all parent categories, then find all it's descendents and it's grouped up that way.
·
Wednesday, 16 April 2014 03:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark, actually I relooked at it and it's not doing anything alphabetically, so I'm wondering if there is something wrong with helper.php anyways. Take a look at
http://www.goodlookingloser.com - module is sidebar, titled Blog Categories. Currently set to Alphabetical - Ascending - no modifications to helper.php.
·
Thursday, 17 April 2014 00:49
·
0 Likes
·
0 Votes
·
0 Comments
·
When you are sorting categories alphabetically, it is sorting the "parent" items alphabetically. The child categories are still beneath the parent's category.
·
Thursday, 17 April 2014 03:21
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post