- Posts: 16
COMMUNITY FORUM
Features Added :: Mod Tools (UNOFFICIAL)
- Jason
-
Topic Author
- Offline
- New Member
Modified Category List Menu Mode:
+ Added Auto/Manual Category Detection to Category List Menu Mode: Will automatically detect the current category or set it manually.
+ Optional list ID option for the Category List Menu Mode.
Added new Mode: Article List Menu with identical features to the Category List Menu Mode
+Auto/Manual Category Detection
+Optional ul#id css selector
Please Log in or Create an account to join the conversation.
- Jason
-
Topic Author
- Offline
- New Member
- Posts: 16
Rather than try to install the module - copy the contents over to your devbed and overwrite the originals.
Please Log in or Create an account to join the conversation.
- Jason
-
Topic Author
- Offline
- New Member
- Posts: 16
getk2.org interface for adding extensions is broken.
PS> K2 team... Any interest in adding these modifications to the official mod tools?
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
Lovely work, I was just about to add the same features.
I have merged the changes into K2 2.5.5 and added K2_ARTICLES_LIST_MENU="Articles List (Menu)" to the language file.
Generic
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
Seems to be randomly adding in another category/article list, I have had a good look at my categories and articles but can't seem to find any relationships to cause this, any ideas.
In my attached screen shot the level1 articles are in a separate category yet the list is pulling them in and setting the level to 0 makes no difference. This is also happening for the categories list in some parts of my site.
Generic
### UPDATE & WARNING ###
I have found the bug, what appears to be happening is that the random bits are actually items from a category set to registered access but where the items themselves are still set to public.
Joomla access levels work so that the items automatically inherit access levels from the category but this mod is not abiding to this and allowing access restricted content to be publicly viewable.
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
function hasItems($id) {
$mainframe = &JFactory::getApplication();
$user = &JFactory::getUser();
$aid = (int) $user->get('aid');
$id = (int) $id;
$db = &JFactory::getDBO();
$query = "SELECT * FROM #__k2_items WHERE catid={$id} AND published=1 AND trash=0 ";
if(K2_JVERSION=='16'){
$query .= " AND access IN(".implode(',', $user->authorisedLevels()).") ";
if($mainframe->getLanguageFilter()) {
$languageTag = JFactory::getLanguage()->getTag();
$query .= " AND language IN (".$db->Quote($languageTag).", ".$db->Quote('*').") ";
}
}
else {
$query .= " AND access <= {$aid}";
}
$db->setQuery($query);
$rows = $db->loadObjectList();
if ($db->getErrorNum()) {
echo $db->stderr();
return false;
}
if (count($rows)) {
return true;
} else {
return false;
}
}
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
See README file in the zip for changelog, this is now working really well hope it gets added to a future K2 release.
I would like to add a limit (like item count in mod_k2_content) setting to the Category and Article lists. I will try and find some time for this but if anyone wants to help that would be great.
I check this forum every few days so post if you find any bugs, please K2 admin add a PM option to this forum
Generic
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
Example: set limit to 5 and show the most recent 5 articles related to the category being viewed. Nice!
Generic
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
See README.txt in Zip
Please Log in or Create an account to join the conversation.
- Jason
-
Topic Author
- Offline
- New Member
- Posts: 16
Awesome Work GENARIC !!!
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
- Offline
- Junior Member
This module will become most useful when it display related items from same category on the item pages and show nothing on other pages, just like K2 Split Content module. Only drawback of k2 Split content is that it display Related items by Tags instead of category.
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
Thanks for the feedback, I too see the advantages of the module working on items.
The code at present looks to the category for items when you are in an item you are no longer in the category.
Another function would need to be added to look for other items in the same category as the item being viewed, if you are a coder please have a go I don't have the time at present to look for a solution.
I got round this (though not ideal) by adding the breadcrumbs module to items.
If you or your clients can keep on top of tagging then the split content module is ideal, in my case I had over a 1,000 untagged items to import and without Mod Tools (UNOFFICIAL) there would have been no easy way to create navigation to these items.
Generic
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
- Offline
- Junior Member
On Joomla extension directory I found a module K2 Related content. It is a nice module as it can show the list of related articles from same category on item/article page, and shows nothing on other pages. Its perfect for me.
About Your Modified Module : - Your modified module shows the item/articles list in ascending or descending list on category pages. Presently it is not useful, but it can be very useful if it can show "MOST POPULAR ARTICLES" of the same category on category pages, and show nothing on other pages.
I am not a coder but I can do a lot if you can give me hint on how to add feature to show articles by popularity.
Please Log in or Create an account to join the conversation.
- Generic
-
- Offline
- New Member
- Posts: 9
I did look at the K2 Related content module but could not get this to work on Joomla 2.5, please let me know if you get it working (the module may have since been updated).
The 'Mod Tools (UNOFFICIAL)' has the same 'order by' options as the original K2 Mod Tools
Default (by ID - ascending)
Reverse default (by ID - descending)
Name alphabetical
Name reverse alphabetical
Ordering
Adding an option for popularity should be quite straightforward.
Generic
Please Log in or Create an account to join the conversation.