-
AuthorPosts
-
Anonymous Moderator
JA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 6, 2009 at 7:27 am #294655Hi,
For your idea, you can do two ways:
+ Delete alias of each catetegy or section.
+ Open modulesmod_janewshelper.php file, at about line 209, find following code:
[PHP]// query to determine article count
$query = ‘SELECT a.*,cc.description as catdesc, cc.title as cattitle,s.description as secdesc, s.title as sectitle,’ .
‘ CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(“:”, a.id, a.alias) ELSE a.id END as slug,’.
‘ CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(“:”, cc.id, cc.alias) ELSE cc.id END as catslug,’.
‘ CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(“:”, s.id, s.alias) ELSE s.id END as secslug’.
‘ FROM #__content AS a’ .
‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’;
$query .= ‘ WHERE a.state = 1 ‘ .
($noauth ? ‘ AND a.access <= ‘ .(int) $aid. ‘ AND cc.access <= ‘ .(int) $aid. ‘ AND s.access <= ‘ .(int) $aid : ”).
‘ AND (a.publish_up = ‘.$db->Quote($nullDate).’ OR a.publish_up <= ‘.$db->Quote($now).’ ) ‘ .
‘ AND (a.publish_down = ‘.$db->Quote($nullDate).’ OR a.publish_down >= ‘.$db->Quote($now).’ )’ .
(($catorsec)?”n AND cc.id=” . (int) $catid:’ AND s.id=’ . (int) $catid) .
‘ AND cc.section = s.id’ .
‘ AND cc.published = 1’ .
‘ AND s.published = 1’;[/PHP]and change to:
[PHP]// query to determine article count
$query = ‘SELECT a.*,cc.description as catdesc, cc.title as cattitle,s.description as secdesc, s.title as sectitle,a.id as slug, cc.id as catslug, s.id as secslug’ .
‘ FROM #__content AS a’ .
‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’;
$query .= ‘ WHERE a.state = 1 ‘ .
($noauth ? ‘ AND a.access <= ‘ .(int) $aid. ‘ AND cc.access <= ‘ .(int) $aid. ‘ AND s.access <= ‘ .(int) $aid : ”).
‘ AND (a.publish_up = ‘.$db->Quote($nullDate).’ OR a.publish_up <= ‘.$db->Quote($now).’ ) ‘ .
‘ AND (a.publish_down = ‘.$db->Quote($nullDate).’ OR a.publish_down >= ‘.$db->Quote($now).’ )’ .
(($catorsec)?”n AND cc.id=” . (int) $catid:’ AND s.id=’ . (int) $catid) .
‘ AND cc.section = s.id’ .
‘ AND cc.published = 1’ .
‘ AND s.published = 1’;[/PHP]Hope it helps.
March 6, 2009 at 3:30 pm #294691Thank you for the code update. It hasn’t fixed it yet, but I think it’s on the right track. I’ll try and see if I can tweak it a bit more. I’ll come back with any updates if I can fix it and share any code or suggestions for others.
EDIT: That did fix some errors. There was some messed up CSS that’s now perfect. The Read More still isn’t working but like I said I’ll be in touch.
March 8, 2009 at 5:57 pm #294850<em>@JA Developer 116110 wrote:</em><blockquote>Hi,
For your idea, you can do two ways:
+ Delete alias of each catetegy or section. </blockquote>
How do you delete and alias?
Also, more feedback from another source:
“You actually need to hack the module to output the result from $row->text. You should take a look at the ‘displaying’ part as Jom Comment is appending the correct readmore / comment links, just that the module is not outputting the proper property.”
So can you help identify the ‘displaying’ part of JA News, and perhaps we can figure out a way to output the result from $row->text? I’m not even exactly sure what that means.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 10, 2009 at 4:53 am #295119<blockquote>How do you delete and alias?</blockquote>
=> In the edit page of category or section, change the value os alias textbox to emply.
But i think you should use my second way.March 10, 2009 at 5:09 am #295122<em>@JA Developer 116692 wrote:</em><blockquote>=> In the edit page of category or section, change the value os alias textbox to emply.
But i think you should use my second way.</blockquote>I did change the code but the Read More link still doesn’t show up. The code update fixed a few CSS issues but not the actual Read More problem.
Thanks.
-
AuthorPosts
This topic contains 20 replies, has 3 voices, and was last updated by bunge 15 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum