- Posts: 49
COMMUNITY FORUM
K2 Auto Categories and Auto Articles
- Manny Santos
- Offline
- Senior Member
Less
More
14 years 7 months ago #78406
by Manny Santos
Replied by Manny Santos on topic K2 Auto Categories and Auto Articles
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
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
Less
More
- Posts: 30
14 years 7 months ago #78407
by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
Hi Greendome,
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
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
Less
More
- Posts: 30
14 years 7 months ago #78408
by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
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
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
Less
More
- Posts: 49
14 years 7 months ago #78409
by Manny Santos
Replied by Manny Santos on topic K2 Auto Categories and Auto Articles
Thanks, I patched it and it works. Maybe for an update to the module, can you add the ability to go to deeper levels where there is content? right now it shows articles only 3 levels but I have articles in a 4th subcategory which doesn't show in the content module. I have the module set to fetch sub-categories.
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
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
Less
More
- Posts: 93
14 years 7 months ago #78410
by GreenDome
Replied by GreenDome on topic K2 Auto Categories and Auto Articles
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
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
Less
More
- Posts: 30
14 years 7 months ago #78411
by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
Not really sure greendome, things only began being changed in that file on line 272 so I would have no idea why line 127 is giving you problems. It seems like it would be more related to some file (possibly my directory one?) calling JHTML::stylesheet or something and trying to add a CSS file to the page.
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
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
Less
More
- Posts: 30
14 years 7 months ago #78412
by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
For those interested in a "last name" alphabetical directory I'm attaching another zip file that will do just that.
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
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
Less
More
- Posts: 93
14 years 7 months ago #78413
by GreenDome
Replied by GreenDome on topic K2 Auto Categories and Auto Articles
How easy would it be to change to display items (articles) instead of categories? Basically the alpha jump links point to articles inside each category rather them sub-categories. I think this could be a useful feature as it would help find articles a lot quicker when there are loads articles per category.
Many Thanks for all your hard work.
GD
Many Thanks for all your hard work.
GD
Please Log in or Create an account to join the conversation.
- Markus Thiel
- Offline
- Premium Member
Less
More
- Posts: 149
14 years 2 months ago #78414
by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
I really must say that your work is GREAT! and I would be surprised if this does not become a core module for K2!
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)! :)
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
Less
More
- Posts: 149
14 years 2 months ago #78415
by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
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.