-
AuthorPosts
-
December 11, 2009 at 6:44 pm #326357
if there are more than the default number of categories/section, how do you control which categories appear by default and in what order? similarly how do you control which section appears where by default (top, 2nd, bottom)?
ThanksSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 14, 2009 at 9:40 am #326509At the moment, the categories did not arrange with any condition.
I think that the simplest solution is arranged them by theirs ordering number.
Please looking for the function : “[PHP]function loadCategories($sid)[/PHP] ” in the heper.php file and see the sql query in this function:[PHP]$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;[/PHP]
and change :
[PHP]
$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. ” ORDER BY s.ordering “;
[/PHP]1 user says Thank You to Saguaros for this useful post
December 14, 2009 at 2:46 pm #326544Thanks, that worked perfectly for the categories. Is there any way to do the same thing with the sections? I still can’t control which section appears first.
December 14, 2009 at 7:39 pm #326559Also, is there any way to have one of the sections display 3 intro news items from just 1 category while the other sections display 3 categories with just 1 intro news item each? I don’t know much php but I’d imagine since I have the category id for the section that i just want to have 1 category with three news items, i could just add an if…else… statement somewhere in the helper.php file? maybe in the _load() or the loadCategories($sid)?
ThanksDecember 16, 2009 at 3:08 pm #326736So I was able to get one of the sections to display just one category and have it span all three columns. For some reason i’m not able to control the number of links individually for those though. I thought it would have been controlled by $linkitems or $s_linkitems but neither seem to do the trick for me. Any thoughts? As for now I really would just like to be able to control which section displays first so I can have this “headlines” section at the top of the JaNews2 module. Any ideas how to do this?
Thanks!Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 17, 2009 at 8:54 am #326810I think that you’ll install the ja news module on the same postion of the ja news2 and try to configuration as expected, and make css for this module.
December 17, 2009 at 3:17 pm #326835There’s no way to simply change the end of the function loadSections(); like we did with the function loadCategories($sid);?
micrantha Friendmicrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
December 18, 2009 at 7:37 am #326904Hello rower,
As to Section Order, maybe in this post you can find what you are looking for
Succes,
Micranthacre8 Friendcre8
- Join date:
- November 2009
- Posts:
- 16
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 3 times in 1 posts
December 19, 2009 at 1:09 pm #327008Hi!
Is there a way that when you use the max char option of the Ja News2 module to cut the text without messing with the sentense? For example I have a text:
That day at the park was the best we ev…
should be:
That day at the park was the best we ever…
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 23, 2009 at 6:48 am #327228HEllo guy
Here is the solution to resolve your problem:
Please open the file /modules/mod_janews2/helper.php and find a code at line: 479 and 480
[PHP]
$arr [$i] = mb_substr ( $t, 0, $length );
$length -= mb_strlen ( $arr [$i] );
[/PHP]
you replace :[PHP]
$org = mb_substr ( $t, 0, $length );
$arr[$i] = (preg_match(‘/^(.*)W.*$/’,mb_substr($t, 0, $length+1), $matches) ? $matches[1] : $org);
$length -= mb_strlen ( $org );
[/PHP]Good luck
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 23, 2009 at 6:53 am #327229Hello all
If you have any problem or any question, please create a new thread post in this forum
http://www.joomlart.com/forums/forum/ja-news-pro-module/Thanks for all.
cre8 Friendcre8
- Join date:
- November 2009
- Posts:
- 16
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 3 times in 1 posts
December 28, 2009 at 10:13 am #327596Thanks for the quick reply!
Although this new piece of code works in English in any other UTF8 language it doesn’t… I have Greek at my site and not only it doesn’t work, it shows some artifacts (�) aswell.
Is there a way to make it multilingual compatible?
PS: I can’t see the Ja_News2 forum posts because maybe I have the JATC Standard Membership. So I can’t post there…
mainstay Friendmainstay
- Join date:
- March 2009
- Posts:
- 15
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 1 times in 1 posts
December 28, 2009 at 3:04 pm #327605is anyone having trouble not being able to see all their categories on the frontpage? I only have one category on the frontpage http://centerresourcecommunity.info and want all of my categories to show. Can anyone please help me!
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 30, 2009 at 2:22 am #327731Dear cre8!
That’s the special problem, please give the FTP account and the administrator account via PM or submit a ticket. i would like to have a closer look on the issue
Thanks
regme111 Friendregme111
- Join date:
- December 2009
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
January 1, 2010 at 7:58 pm #327925I have a question – how can I put different sections in the ja news 2 modul. I`ll give you an example because its hard to explain. So lets see the demo template http://template15.joomlart.com/ja_teline_iii/
I want to put for example sections “World”, “Technology” and “Sport” at the place of “Europe”, “US Politics” and “Middle east” and rename the text in the modul from “World” to “News”. Then to post another News2 Module called “News 2” at the place of “Technology” (in the demo template) and put “Travel”, “Entertainment” and “Health” sections in the place of “Personal Tech”, “Business Tech” and “Space”.
In other words I want the JA News2 module to be like Teline II but with 3 columns (like Teline III) not with 2 columns like the original Teline II.
And how to remove the edit menu on top of the “JA news2” module so no edit to be possible from the users?
Thanx 🙂
-
AuthorPosts
This topic contains 151 replies, has 74 voices, and was last updated by ceeyee 13 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum