Keyword

K2 Auto Categories and Auto Articles

More
15 years 4 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

Please Log in or Create an account to join the conversation.

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 4 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
Attachments:

Please Log in or Create an account to join the conversation.

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 4 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

Please Log in or Create an account to join the conversation.

More
15 years 4 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

Please Log in or Create an account to join the conversation.

More
15 years 4 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

Please Log in or Create an account to join the conversation.

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 4 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

Please Log in or Create an account to join the conversation.

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
15 years 4 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
Attachments:

Please Log in or Create an account to join the conversation.

More
15 years 4 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

Please Log in or Create an account to join the conversation.

More
14 years 11 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)! :)

Please Log in or Create an account to join the conversation.

More
14 years 11 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.

More
14 years 11 months ago #78416 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
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.

More
14 years 11 months ago #78417 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
I have the file in "/templates/mytemplate/html/mod_k2_content/Default/default.php"

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.

More
14 years 11 months ago #78418 by Ron Farber
Replied by Ron Farber on topic K2 Auto Categories and Auto Articles
Im having a different issue with this. I love the idea, however, if I manually create a side menu with the sub categories which is a pain, I can assign a template to the results and also use the K2 leading , primary, secondary settings.

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.

More
14 years 11 months ago #78419 by Ron Farber
Replied by Ron Farber on topic K2 Auto Categories and Auto Articles
oops my bad, I had hard menu items for the subcategories set up previously, so maybe thats why it didnt display on them automatically. Checking into that now..

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #78420 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
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.

More
14 years 9 months ago #78421 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
Feel free to test it on www.charterbarometern.se
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.

More
14 years 9 months ago #78422 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
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.

More
14 years 9 months ago #78423 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
Is this something that will be fixed in upcoming versions of K2? if not I think i will have to search for an alternativ :/

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.

More
14 years 8 months ago #78424 by Guy Borghouts
Replied by Guy Borghouts on topic K2 Auto Categories and Auto Articles
Hey Omar,
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.

More
14 years 8 months ago #78425 by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
is there some way to also show the parent category? Would make it alot better if you could navigate back :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum