We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to load only 20% content on blog overview page ? | Forum

Kelvin Jan 25 '15
How to load only 20% content on blog overview page ? Because it load very long, when I have a lot of blogs. I want it to load 20% content and load 100% when I click the link on specific blog.
Ron Scott
Ron Scott Jan 31 '15
Is this what you're looking for?

In /ow_plugins/blogs/controllers/blog.php look for this code, line 135 in my file.

$text = explode("<!--more-->", $dto->getPost());

Change it to:

$text = explode("<!--more-->", UTIL_String::truncate( strip_tags($dto->getpost()), 200, "<!--more-->" )  );

Change the 200 to however long or short you want the description.
No idea if this is right or wrong way to do it but it works.
Havent tried this on 1.7.2 though
  2348-User blogs.png (244Kb)
hasan Feb 10 '16
Thanks Ron Scott
Ron Scott
Ron Scott Feb 11 '16
Glad it works for you,
I'm using this on the latest release as well, 1.8.1 and it works fine.