Hello there! Welcome to Youjoomla Support Forums

We are Web Development Company specializing in Joomla Templates , Joomla Extensions and WordPress Themes development . You are not able to see some forum threads due to your memberhip level. To unlock all forums and special customer support please take few moments to signup . If you are just searching for free joomla templates , or free joomla extension support simply head to our Free Joomla Support forums and open a new thread. Our moderators will help you as soon as possible. To spead up the response time please take few seconds and go over forum rules

Have fun!

[SOLVED] Multi Categories

11-06-2010, 02:15 PM
# 1 (permalink)
saladdin19
Hello team,

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

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
11-06-2010, 02:37 PM
# 2 (permalink)
maggoo
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.
11-06-2010, 05:31 PM
# 3 (permalink)
saladdin19
Quote:
Originally Posted by maggoo01
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

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).

Conceptually, selecting multiple categories is an easy extension, just not needed for me at this moment, just need all the articles from one section
11-06-2010, 05:38 PM
# 4 (permalink)
maggoo
Awesome, soz for the wrong line:/
11-06-2010, 05:40 PM
# 5 (permalink)
saladdin19
no worries. it was the right place (+/- 2 lines is close enough for me )

cheers!
~saladdin19
11-06-2010, 05:42 PM
# 6 (permalink)
maggoo
Ok ok, but all credits go to you, and thanks for sharing!
Thread Tools
Display Modes

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

Members Login

Username
Password