-
AuthorPosts
-
Paul Wallen Friend
Paul Wallen
- Join date:
- September 2014
- Posts:
- 140
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 35
- Thanked:
- 5 times in 1 posts
November 1, 2009 at 10:43 pm #145674Am I dumb or is there not a way to display only certain categories in janews 2?
Is this limited by only sections…and categories within that section???
If so, I am going to be forced to use some other setup for displaying news because this will simply not work.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
November 4, 2009 at 8:28 am #322506Hi paulwallen
I would like to answer your questions as follows:
1. Am I dumb or is there not a way to display only certain categories in janews 2?
=> It is possible. Please open modules/ja_janews/helper.php file, find following code:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;
and change to:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;
$query .= ” order by s.ordering ”
At that time, you can control to display three categories as the ordering field.
2. Is this limited by only sections…and categories within that section???
Current, this module only supports you to use sections.tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 23, 2009 at 12:11 am #324623Sorry I’m replacing the code as you said and I get a:
Parse error: syntax error, unexpected T_VARIABLE in /home/above/public_html/telegramm/modules/mod_janews2/helper.php on line 837Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 25, 2009 at 3:25 pm #324978Thank you again JOOMLART!! I think using that ordering tip JA-News2 got a lot more flexible making it a super perfect tool for the pros!! I think you should add tha feature in your next updtate!!
padunic Friendpadunic
- Join date:
- September 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
November 26, 2009 at 6:22 pm #325076<em>@tranaee 154635 wrote:</em><blockquote>Thank you again JOOMLART!! I think using that ordering tip JA-News2 got a lot more flexible making it a super perfect tool for the pros!! I think you should add tha feature in your next updtate!!</blockquote>
I have tried this….crash all my site. Not work. 😮tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 26, 2009 at 6:48 pm #325077<em>@padunic 154766 wrote:</em><blockquote>I have tried this….crash all my site. Not work. :o</blockquote>
No, no, no.. It used to crash my site as well but there was an error in the first post from joomlart!
YOU MUST ADD A “;” AFTER $query .= ” order by s.ordering “So summing it all together:
Open modules/ja_janews/helper.php file, find following code:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;
and replace with
:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;$query .= ” order by s.ordering “;
Please try it!
Now you have a front page displaying all the categories that you wish by just adjusting the category order!! GREAT!!padunic Friendpadunic
- Join date:
- September 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
November 28, 2009 at 3:30 am #325172<em>@tranaee 154768 wrote:</em><blockquote>No, no, no.. It used to crash my site as well but there was an error in the first post from joomlart!
YOU MUST ADD A “;” AFTER $query .= ” order by s.ordering “So summing it all together:
Open modules/ja_janews/helper.php file, find following code:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;
and replace with
:
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=” . ( int ) $sid . $where;$query .= ” order by s.ordering “;
Please try it!
Now you have a front page displaying all the categories that you wish by just adjusting the category order!! GREAT!!</blockquote>
Hi, i made like you suggest and not crash in this time, but nothing change in backend. Its correct?Regards
Padunic
cre8 Friendcre8
- Join date:
- November 2009
- Posts:
- 16
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 3 times in 1 posts
November 28, 2009 at 7:31 am #325179Is it possible to only show certain sections and not every section available?
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 28, 2009 at 7:55 am #325180<em>@padunic 154901 wrote:</em><blockquote>Hi, i made like you suggest and not crash in this time, but nothing change in backend. Its correct?
Regards
Padunic</blockquote>
Yes it is! But, you can order from now on, the category order in the back end and that affects the order in the front page as well!! 😉
C’mon give it a try and be happy my friend!!:)tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 28, 2009 at 7:57 am #325181<em>@cre8 154909 wrote:</em><blockquote>Is it possible to only show certain sections and not every section available?</blockquote>
Ofcourse!
In the backend go in the janews2 module and in the big square mid-right you can list only the section ids you’d like.
To find the section id go to section manager highlight the sction you want and check the id number far-right! 😉 -
AuthorPosts
This topic contains 11 replies, has 5 voices, and was last updated by tranaee 14 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum