Word limit CB Activity stream

3 years 1 week ago - 3 years 1 week ago #323735 by Sekulla
Word limit CB Activity stream was created by Sekulla
I'm using CB Activity, CB GroupJive and CB AutoAction plugins.

I currently have an activity stream for the case when a Group wall post is created to output an Activity Stream. All is working well so far.

However, I am having difficulty in trying to limit the output stream for the post to limit number of words with a read more link. I have experimented with the AutoAction Output tab options but can't seem to get the effect I am seeking. I would like to restrict the activity stream to limit the post text to 50 words with a read more link.

I have added screen capture to show the current output activity stream for a group wall post that I seeking to modify.

Any tips would be welcome.
Thanks
Attachments:

Please Log in to join the conversation.

3 years 1 week ago #323744 by krileon
Replied by krileon on topic Word limit CB Activity stream
The "Message Limit" parameter will not apply to activity that is generated. That is only applied to posts made directly on the stream by the user. As for if content is too large a "show more" behavior is triggered if the post is greater than 800px it will then be reduced to 400px with a toggle link. It looks like the following.




There is no configuration for that behavior and is controlled entirely through its JS and CSS. See the below on how to override the CSS to set a new limit.

www.joomlapolis.com/forum/153-professional-member-support/241498-cb-activity-how-to-change-chars-limit-of-activity-message-to-display#314003


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in to join the conversation.

3 years 1 week ago #323754 by Sekulla
Replied by Sekulla on topic Word limit CB Activity stream
Thanks Kyle,

I tried following the CSS override and added the following to the cb_template override

.cb_template .cbActivity .cbMoreLess.cbMoreLessClosed .cbMoreLessContent {
max-height: 300px !important;
}

However, it had no effect. I tried adding the above to the Joomla template and even the CB Activity module HTML before field as a style. However, it had no effect on the size of the activity stream activity.


The relevant lines in the template.css are;


.cb_template .cbMoreLess .cbMoreLessContent {
vertical-align: top;
word-wrap: break-word;
text-overflow: ellipsis;
overflow: hidden;
}

.cb_template .cbMoreLess.cbMoreLessOpened .cbMoreLessContent {
max-height: none;
}

.cb_template .cbMoreLess.cbMoreLessClosed .cbMoreLessContent {
max-height: 100px;
}


I was able to override the .cbMoreLessOpended to 300px proving the overrides are working but there was no "read more" button to expand juts a cropped content stream.

I couldn't see where the 400px and 800px max height limits that you mentioned are set so could not work out what is going on.

Any further ideas.

Please Log in to join the conversation.

3 years 1 week ago #323767 by krileon
Replied by krileon on topic Word limit CB Activity stream
Below is confirmed working in CBs CSS override functionality.

.cb_template .cbActivity .cbMoreLess:not(.cbMoreLessOpened) .cbMoreLessContent {
	max-height: 200px !important;
}

The initial values are set within the JS. There is a height tolerance of 400px you won't be able to override. This means you need to keep in mind 400px will be added to whatever value you set. So if you set the limit to 200px that means the maximum allowed is 600px. The default height limit is 400px this means at 800px it activates the Read More and shortens it to 400px.

Please keep in mind while CB Activity does provide a module it is not designed to be crammed in to left/right module positions as it's just too much content to be put there like you're currently doing.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.240 seconds

Facebook Twitter LinkedIn