Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod in Categories (k2, jomsocial)
MetaMod in Categories (k2, jomsocial)
MetaMod in Categories (k2, jomsocial)
Hi Stephen. Has decided to create a forum on unit display in a category and in the category content in different components.
Continuation http://www.metamodpro.com/forums/topic?id=405 but more detailed
It will be very convenient if many categories for links between different components with relevant sections if for example to deliver the menu unit
With relevant links
Example. A component k2 with a category title "auto-rally" and a blog from the same a category "auto-rally"/rally blog. In them the same unit will be displayed
With links to identical categories in jomsocial groups, events, video.
That is very convenient for перелинковки between sections with the identical content
As in jomsocial groups, events, video. In categories with a title "auto-rally" and in the category content the same unit should be displayed
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
1). Unit display in a category k2 and in a blog of an appropriate category (is solved)
(Category) index.php? option=com_k2&view=itemlist&layout=category&task=category&id=2&Itemid=58
(A blog from the given category) index.php? option=com_k2&view=item&id=2&Itemid=58
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
2). Unit display in a category jomsocial (groups) and in group of an appropriate category
In the previous forum http://www.metamodpro.com/forums/topic?id=405 you to me have made the recipe.
(A group category for example auto-rally) index.php? option=com_community&view=groups&categoryid=3&Itemid=58
(Group of the given category) index.php? option=com_community&view=groups&task=viewgroup&groupid=2&Itemid=58
$categoryid = "";
if ($option == "com_community" and $view == "groups") {
$categoryid = JRequest:: getInt (' categoryid ', 0);
if ($categoryid == 0 or JRequest:: getVar ("task") == "viewgroup") {
$groupid = JRequest:: getInt ("groupid", 0);
$query = "select categoryid from #__community_groups where id =". $groupid;
$db-> setQuery ($query);
$categoryid = $db-> loadResult ();
}
}
if ($categoryid == 4) return 60;
if ($categoryid == 1) return 63;
It works.
Truth in the group the unit isn't displayed in following sections:
Create new album (group) index.php? option=com_community&view=photos&groupid=2&task=newalbum&Itemid=55
Show all albums (group) index.php? option=com_community&view=photos&groupid=2&Itemid=55
View all videos (group) index.php? option=com_community&view=videos&groupid=2&Itemid=62
It would be desirable that and in them the unit was displayed
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
3). Unit display in a category jomsocial (videos) and in video of an appropriate category
(Video category for example auto-rally) index.php? option=com_community&view=videos&catid=2&Itemid=62
(Video from the given category) index.php? option=com_community&view=videos&task=video&userid=62&videoid=9&Itemid=62
Your recipe for groups here didn't work as didn't try and didn't suffer
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
4). Unit display in a category jomsocial (events) and in events of an appropriate category
(A category events for example auto-rally) index.php? option=com_community&view=videos&catid=2&Itemid=62
(event from the given category) index.php? option=com_community&view=videos&task=video&userid=62&videoid=9&Itemid=62
Here too similar to your recipe for groups didn't work, again has all night long stayed ((
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
I will be grateful to any decision of a question. As the idea of my site is based on powerful metamod
//I use the translator
31-Aug-10 03:54:46
Re: MetaMod in Categories (k2, jomsocial)
Hi Aslan,
I have to say I am struggling with the English Translation. Google translate is great for many things, but sometimes for technical content it's very hard to understand. I'll try my best.
1 - I'll trust you that this works!
2 - to include the photos and videos, and also discussions and announcements and other apps, when viewed by group, you could use the following recipe:
$categoryid = "";
if ( $option == "com_community" ) {
$categoryid = JRequest:: getInt ('categoryid', 0);
if ( $categoryid == 0
and ( $groupid = JRequest::getInt("groupid", 0)) != 0
) {
$query = "select categoryid from #__community_groups where id = ". $groupid;
$db->setQuery($query);
$categoryid = $db->loadResult();
}
}
if ($categoryid == 4) return 60;
if ($categoryid == 1) return 63;
3 & 4 - Video categories:
if ($option == "com_community" and $view == "videos" ) {
$catid = JRequest::getInt("catid",0);
$videoid = JRequest::getInt("videoid",0);
if ($catid == 0 and $videoid != 0) {
$query = "select category_id from #__community_videos where id = ". $videoid;
$db->setQuery($query);
$catid = $db->loadResult();
}
if ($catid == 2) return XXX; // customise here for video category id and module to return
}
Re: MetaMod in Categories (k2, jomsocial)
$categoryid = "";
if ( $option == "com_community" ) {
$categoryid = JRequest:: getInt ('categoryid', 0);
if ( $categoryid == 0
and ( $groupid = JRequest::getInt("groupid", 0)) != 0
) {
$query = "select categoryid from #__community_groups where id = ". $groupid;
$db->setQuery($query);
$categoryid = $db->loadResult();
}
}
if ($categoryid == 4) return 60;
if ($categoryid == 1) return 63;
This recipe is slightly wrong. it is displayed depending on the number of categories and groups and events simultaneously. if add
and $ view == "groups" that do not display modules in the video and photo albums Groups
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod in Categories (k2, jomsocial)
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 1
- User Info:
- Total Users:
- 7667
- Newest User:
- humble2601
- Members Online:
- 0
- Guests Online:
- 96
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked