COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] IntroText words limit not working while selecting
[SOLVED] IntroText words limit not working while selecting
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
I have a Articles directory freearticles.mohul.com built on Joomla 1.5 and K2 2.5.0 that I am redesigning on Joomla 2.5.4 and K2 2.5.7, but facing following problem:
I have lots of categories at level1 and level2. All these categories inherit the parameters from 1 category at level1. These categories have their respective menus. Category view of individual categories is working fine. It is showing their respective items/articles list with Introtext as par my specified words limit.
Check here: mohul.com/articles/index.php/advertising
Or mohul.com/articles/index.php/arts-and-entertainment
It is showing items/articles as I want.
But for Home page I have selected multiple categories to display all items/articles under these selected categories with Introtext and my specified word limit in categories parameter. But it is not showing the result as expected.
It is displaying all articles with whole text(full articles). It is not limiting the Introtext as set in parameters.
Check Here: mohul.com/articles/
But my older site on Joomla 1.5 with same setting is working fine (it should look like this one)
Check Here: freearticles.mohul.com
Same is the problem with Author pages
Check Here: mohul.com/articles/index.php/component/k2/itemlist/user/42-superuser
But working fine on my older site
Check Here: freearticles.mohul.com/author/dave-sprint
I don’t understand why Introtext words limit is not working while selecting multiple categories or on Author pages, may be some PHP code error in latest version.
Is there anybody else who is also facing the same problem?
Other Info:
Server PHP: 5.3.8
Using Single Editor Window as Introtext and FullText.
Any Help will be highly appreciated.
Thanks in Advance
Manoj Goel
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
Is there anybody who can help me???????
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
Thanks to all those who tried to solve this problem.
BK Manoj Goel
Please Log in or Create an account to join the conversation.
- david craig
-
- Offline
- New Member
- Posts: 1
Glad you found a soulution. Can you share what you found as I am experiencing the same issue?
Thnaks
Please Log in or Create an account to join the conversation.
- Mandy
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
Please Log in or Create an account to join the conversation.
- ghog
-
- Offline
- New Member
- Posts: 5
If anyone with the spirit of sharing knows how to do this please share as I have the same issue.
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
At least developers must have a support forum, at least paid one if not free.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
1. You have correctly setup the settings for the desired category.
2. You have not messed up the settings inheritance.
In any case you can always apply the word limit in your template overrides by calling the following code:
K2HelperUtilities::wordLimit($item->introtetx, 100);
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Trister
-
- Offline
- New Member
- Posts: 5
I haven't touched any settings, just installed, create a category, and 2 items. I've set the home page to point to this one and only category. The only setting I changed was to add 100 to the intro text but, it shows the whole thing still.
I've read the forums and it says to change the template with the below code.
FROM:
<?php if($params->get('itemIntroText')): ?>
<?php echo $item->introtext; ?>
<?php endif; ?>
<?php if($params->get('itemIntroText')): ?>
<?php echo K2HelperUtilities::wordLimit($item->introtext,30); ?>
<?php endif; ?>
I've looked around and the only place I found this code was in modules/mod_k2_content/tmpl/default/default.php
But when I changed this, it still showed the whole article. Is there something I'm missing or maybe it's a different file I should be editing?
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Trister
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
Ensure that the paramaters are OK. Also make sure that you have not set your category to inherit it's settings from another one which doesn't have the relative setting enabled.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Dmitriy
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- lamvt
-
- Offline
- New Member
- Posts: 1
joomquery.com/en/joomla/25-the-project/7912-k2-components-word-limit-introtext-modk2content-not-working-joomla-25.html
1. hack core to add code to your module k2_content
2. Overwrite to your template: add code to your template (Recommended)
Goodluck
Please Log in or Create an account to join the conversation.
- Dmitriy
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Manoj Goel
-
Topic Author
- Offline
- Junior Member
Step 1. Open file item.php at location \components\com_k2\models\
Step 2. Find following line :
Please Log in or Create an account to join the conversation.
- Dmitriy
-
- Offline
- New Member
- Posts: 5
PS Joomla 1.5.2 + K2 2.5.1
Please Log in or Create an account to join the conversation.
- Kostas
-
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Matt Bryan
-
- Offline
- New Member
- Posts: 8
Thank you Manoj Goel for a fix dearly needed in the K2 source! It is working great in Joomla! 2.5.8 with latest version of K2.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] IntroText words limit not working while selecting