- Posts: 49
COMMUNITY FORUM
K2 Auto Categories and Auto Articles
- Manny Santos
-
- Offline
- Senior Member
A couple things I noticed: If I chose a different template from the default, it stopped working.
Also, I went to see about the patch you mentioned because the module shows up in pages where I have nothing but don't understand how to apply the patch.
Any help would be greatly appreciated. Thanks
Please Log in or Create an account to join the conversation.
- Omar Ramos
-
Topic Author
- Offline
- Junior Member
- Posts: 30
Yeah I put that one together (I'm not particularly happy with the coding of it...it was a little messy but it gets the job done).
The attached zip has a folder named "directory" within it...this would be dropped into your k2 templates directory (after copying from the main com_k2 directory into my template directory the location for me is /templates/ja_kyanite_ii/html/com_k2/templates/directory).
An instructor already requested if it could be organized by last name, but since the category names contain the instructor names, that could be a little tricky, or at least would require some extra processing.
GreenDome said:Hello Omar,
How have you designed the 'List of Instructors' page? i.e. faculty.imperial.edu/index.php
I'm really interested in the Alpha Jump Links part?
Thanks
GD
Please Log in or Create an account to join the conversation.
- Omar Ramos
-
Topic Author
- Offline
- Junior Member
- Posts: 30
For the other fix I mentioned, just go to libaries/joomla/document/html/html.php and go to line 272 (it's the commented line below) and add in the following:
//$words[$i] = ((isset($this->_buffer[$name])) && ($this->_buffer[$name] === false)) ? 0 : count(JModuleHelper::getModules($name));
$words[$i] = 0;
if(!isset($this->_buffer[$name]))
{
$modules = JModuleHelper::getModules($name);
$result = $this->getBuffer('modules', $name);
$words[$i] += !empty($result);
}
Manukat said:Thanks for the module. Now I can remove the 12 modules I created for each category.
A couple things I noticed: If I chose a different template from the default, it stopped working.
Also, I went to see about the patch you mentioned because the module shows up in pages where I have nothing but don't understand how to apply the patch.
Any help would be greatly appreciated. Thanks
Please Log in or Create an account to join the conversation.
- Manny Santos
-
- Offline
- Senior Member
- Posts: 49
Thanks again for this great addition.
Omar Ramos said:I think the template issue is due to my depending on the Default/menu.php folder location...you'll have to edit things to make that work.
For the other fix I mentioned, just go to libaries/joomla/document/html/html.php and go to line 272 (it's the commented line below) and add in the following:
//$words[$i] = ((isset($this->_buffer[$name])) && ($this->_buffer[$name] === false)) ? 0 : count(JModuleHelper::getModules($name));
$words[$i] = 0;
if(!isset($this->_buffer[$name]))
{
$modules = JModuleHelper::getModules($name);
$result = $this->getBuffer('modules', $name);
$words[$i] += !empty($result);
}
Manukat said:Thanks for the module. Now I can remove the 12 modules I created for each category. A couple things I noticed: If I chose a different template from the default, it stopped working.
Also, I went to see about the patch you mentioned because the module shows up in pages where I have nothing but don't understand how to apply the patch.
Any help would be greatly appreciated. Thanks
Please Log in or Create an account to join the conversation.
- GreenDome
-
- Offline
- Premium Member
- Posts: 93
Thank you for the directory file. Will test it later.
I seem to be getting the following error with this:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/joomla/testsite/libraries/joomla/document/html/html.php on line 127
Any ideas?
Thank you
GD
Please Log in or Create an account to join the conversation.
- Omar Ramos
-
Topic Author
- Offline
- Junior Member
- Posts: 30
GreenDome said:Hi Omar,
Thank you for the directory file. Will test it later.
I seem to be getting the following error with this:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/joomla/testsite/libraries/joomla/document/html/html.php on line 127
Any ideas?
Thank you
GD
Please Log in or Create an account to join the conversation.
- Omar Ramos
-
Topic Author
- Offline
- Junior Member
- Posts: 30
It seems like instructors didn't exactly think that having themselves organized by first name would be that useful so this version takes a category title (in this case, the name of an instructor like, "Omar Ramos") and reorganizes it by last name = "Ramos, Omar" and the organizes them that way. So I can still name my categories normally "Omar Ramos", but in the directory list it will be organized by the last name.
GreenDome said:Hi Omar,
Thank you for the directory file. Will test it later.
I seem to be getting the following error with this:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/joomla/testsite/libraries/joomla/document/html/html.php on line 127
Any ideas?
Thank you
GD
Please Log in or Create an account to join the conversation.
- GreenDome
-
- Offline
- Premium Member
- Posts: 93
Many Thanks for all your hard work.
GD
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
I do have a question about a wanted feature ;)
Would it be possible to sort the articles according to the hierarchy? So that perhaps it shows only items from sub categories and they are sorted by hierarchy and date?
A nice little checkbox for "Sort by hierarchy" would really make my day(s)! :)
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Markus Thiel said:hmm also I noticed that my earlier template override on the mod_k2_content no longer work...? Or am I doing something wrong?
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Markus Thiel said:Any idea what could the problem could be?
Markus Thiel said:hmm also I noticed that my earlier template override on the mod_k2_content no longer work...? Or am I doing something wrong?
Please Log in or Create an account to join the conversation.
- Ron Farber
-
- Offline
- New Member
- Posts: 15
With this, I get a generic category listing layout (which I would love to know how to make 1 column, and play with the leading , primary, secondary image sizes, etc...
is this possible. Is there a place where I can adjust the default K2 category leading items, primary items, etc... to say "if I dont specify anything, do this for my default layout options". Also, interestingly enough, if I place this menu on the main category, and the results come up displaying my sub-category results when someone clicks one of these links generated automatically, the menu is not displayed on those subcategory results to go to another person (subcategory). I am not given the option to place this menu on those auto generated menu items beforehand, since there is no hard menu item for it. It only shows on the one page I place it on originally. Not everything "under" that.
Additionally, when an automenu reaches a user configurable length (i.e. 20 items or 30 items or even 100) it could automatically be set to display the select box option instead so the categories can fit in a reasonable amount of space (since you are using people in your categories, what if you have 500 people?)
Please Log in or Create an account to join the conversation.
- Ron Farber
-
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Seem as there is an ItemID problem.. :/
Markus Thiel said:There seems to be some bugs with the category select box... it dosen´t allways show the correct category when viewing an article.. ? any ideas on my?
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Markus Thiel said:There seems to be some bugs with the category select box... it dosen´t allways show the correct category when viewing an article.. ? any ideas on my?
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Markus Thiel said:I think this is the same "bug" as the content module has... It wont get the correct itemid... :(
Markus Thiel said:There seems to be some bugs with the category select box... it dosen´t allways show the correct category when viewing an article.. ? any ideas on my?
Please Log in or Create an account to join the conversation.
- Guy Borghouts
-
- Offline
- New Member
- Posts: 7
Thanks a lot for a great contribution! I'm looking for this kinda stuff quite some time... The automatic menu is a big time saver for editors and they don't have to hassle with menu's.
Cheers,
Guy
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
Please Log in or Create an account to join the conversation.