Youjoomla Support Forums (http://www.youjoomla.com/joomla_support/index.php)
-   YJ Title Ticker (http://www.youjoomla.com/joomla_support/forumdisplay.php?f=88)
-   -   [SOLVED] Multi Categories (http://www.youjoomla.com/joomla_support/showthread.php?t=7154)

saladdin19 11-06-2010 03:15 PM

[SOLVED] Multi Categories
 
Hello team,

Great module, works perfectly right out of box. simple. intuitive. love it. :D

Up to this point, I have just been aggregating articles into a "Latest" category, so displaying all my news in ticker was no problem.

Now, i have reorganized the site for easier navigation and finding articles, so i want to display all my news from either multi categories, or, simply, from my "News" Section.

Can you point me in the right direction of where I should be looking? I really appreciate your help! ;)

Keep up the great work!
~saladdin19

maggoo 11-06-2010 03:37 PM

Best start with looking at the code in mod_yj_nt2.php (line 96 onwards), but it would require quite some coding. The module does what it says on the box, and if you want to display from multi categories i can only advise to use the option to show only specific news items.

saladdin19 11-06-2010 06:31 PM

SOLVED: Select Entire Section
 
Quote:

Originally Posted by maggoo01 (Post 32626)
Best start with looking at the code in mod_yj_nt2.php (line 96 onwards), but it would require quite some coding. The module does what it says on the box, and if you want to display from multi categories i can only advise to use the option to show only specific news items.

Hey maggoo01, thanks for the suggestion.

I got it to work, however, the answer lied in two changes:

one change was for the module front end in the admin panel: in the xml file, changing the "get_items" parameter from type "mos_category" to "mos_section" (this let's you pick the section you want from module manager ;))

the second change was in the sql query build in the php file, but at line 94 only. In fact, all you have to do is change "AND cc.id = '.$get_items.'" to "AND s.id = '.$get_items.'"

It took me 2 hours of ****ing around before i finally understood what lines 96 and above actually do, and realizing that i'm looking in the wrong place lol :o

For those who are interested in knowing what lines 96 and on do, all they do is build a generic SQL database query that checks if the section ids & category ids that you specified (in the module) match with the ids listed in the articles that are stored in the database. [Since #jos_content database has every single article stored] That's it. That basic functionality does not need to be modified.

SO to recap: following my changes above let you select a section in the module to be able to have all the articles be used in the ticker (from that section).:cool:

Conceptually, selecting multiple categories is an easy extension, just not needed for me at this moment, just need all the articles from one section :D

maggoo 11-06-2010 06:38 PM

Awesome, soz for the wrong line:/

saladdin19 11-06-2010 06:40 PM

no worries. it was the right place (+/- 2 lines is close enough for me :D)

cheers!
~saladdin19

maggoo 11-06-2010 06:42 PM

Ok ok, but all credits go to you, and thanks for sharing!


All times are GMT -4. The time now is 05:58 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.