Community Forum

If you have questions about my software, chances are this forum has the answers.

You'll need to register before you can post on the forum to ask your question or to answer another one. A reply will be posted to each and every question that is asked so there is no need to double post or bump your post. I do my best to answer promptly but in some cases it may take a day or two. If you bump your post, it may be removed. Bear with me and I`ll get your question answered quickly.

Here are a few tips to help you to get your questions answered more rapidly.

IMPORTANT: Posts in English only. I don't have a translator and I'll be unable to understand your message properly and will probably delete it.
SEARCH: Use the search option to see if your question has been answered on the forum before now or if there is an answer in the documentation of your software.
PRIORITY SUPPORT: If you have purchased a commercial version of any software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
LINKS: Any links posted are not clickable and must be copied / pasted into your browser address bar.

You are not logged in.

#1 musashi79uk 21-03-2018 18:38:48

Hi,
Is there a way to reduce the text from journals that are displayed?
I'm trying to get them to display with about 80 words with a "Read More..." link at the end that they can click or they can click on the title to view the full article. I've managed to add the Read More... link at the end of the blog\content\_theme_default\journal.htm file by changing

<div class="panel-body">
            {information}
</div>

to

<div class="panel-body">
            {information}
            <br>
            <a href="{url}" title="{url_text}">Read More...</a>
</div>

Some of our articles are 1600-2500 words so to have them displayed in full while people are flicking through the website is going to be a pain for them.
It would be great to truncate them on the main page and on the categories pages but to only have them in full if a reader wants to.

Thanks

Carl

#2 msworld 22-03-2018 16:34:42

It`s not an option at the moment, but you may be able to accomplish it with javascript and/or CSS

https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

#3 musashi79uk 22-03-2018 19:51:22

I've spent a good 2 hours looking into but I've given up. It would help if I could find the panel-body command it references so I could duplicate it to include the truncate CSS but I can't. I don't even know how to mess about with javascript. All javascripts demonstrate how to truncate text as it appears but the html file pulls the text with the {information}  command and I don't know where to start with it.
Is it possible to include a new field to upload to the SQL database that you can enter shorter text when adding or managing a journal?

#4 musashi79uk 23-03-2018 14:59:29

I've done it. Anyone wanting to incorporate the change, open content/theme_default/html/journal.htm

Replace lines 5-7 which are
          <div class="panel-body">
            {information}
          </div>
with
           <div class="panel-body">
            <div  style="    overflow: hidden !important;
    max-height: 554px;">{information}</div>
            <br>
        <p class="text-right">
            <a href="{url}" title="{url_text}">Read More...</a></p>
          </div>

The max-height can be changed to whatever you wish.

#5 msworld 24-03-2018 06:52:01

Superb, glad you got it sorted. smile

Board footer

Maian Script World - Free PHP Software for Personal or Business Use.
© 2003-2018 Maian Script World & David Ian Bennett.

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World

Free PHP Software / Responsive PHP Scripts / Lightweight PHP Software / White Label PHP Software