Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • dageraad Friend
    #845491

    Hi,

    for the homepage, the featured articles:

    Is it possible for the big leading article on the top left to show more text?

    thx

    Pankaj Sharma Moderator
    #845746

    Hello @dageraad
    could u share your site url and a screenshot how u needed the intro text in on featured page .
    so i can check it and suggest you some changes .

    dageraad Friend
    #846471

    tuinhuizenfabrikant2.mascom.be


    1. wholetext
    Pankaj Sharma Moderator
    #846765

    Hi
    Go to templates/ja_magz_ii/html/com_content/featured/default_item.php
    Find this code `

        $this->item->introtext = substr(($this->item->introtext), 0, 200);
    
    
    Increase the value from 200 to 400 . save and check.
    dageraad Friend
    #847597

    Thanks!
    But there’s still something strange: even when I increase the value to 1000, it keeps cutting off the last word and puts dots in its place ( now I’ve manually typed "…" at the end of the article so it doesn’t remove the last word).

    Also another question regarding the same section: In the article some words are , and there are also different paragraphes, but it seems to automatically remove those elements. Can I do something about this?

    thx

    Pankaj Sharma Moderator
    #847632

    Hi
    go to the same file
    find this code

      $this->item->introtext = substr(($this->item->introtext), 0, 200);
            $this->item->introtext = substr($this->item->introtext, 0, strrpos($this->item->introtext, ' ')) . " ...";
            echo $this->item->introtext;
    

    replace it with

      $this->item->introtext = substr(($this->item->introtext));
            echo $this->item->introtext;
    

    Let me know if it helps

    dageraad Friend
    #848440

    Hi,

    No, I get this: Warning: substr() expects at least 2 parameters, 1 given in /home/joomla10/public_html/tuinhuizenfabrikant2/templates/ja_magz_ii/html/com_content/featured/default_item.php on line 77

    my original code looks like this btw:

    $this->item->introtext = substr(strip_tags($this->item->introtext), 0, 200); $this->item->introtext = substr($this->item->introtext, 0, strrpos($this->item->introtext, ‘ ‘)) . " …"; echo $this->item->introtext;

    Pankaj Sharma Moderator
    #848742

    Hi
    i replaced this code

            <?php 
            $this->item->introtext = substr(($this->item->introtext), 0, 400);
            $this->item->introtext = substr($this->item->introtext, 0, strrpos($this->item->introtext, ' ')) . " ...";
            echo $this->item->introtext;
          ?>

    into this

            <?php 
            $this->item->introtext = ($this->item->introtext);
            echo $this->item->introtext;
          ?>

    And its working fine at my local system .
    If it not solve issue , you post your site details via private reply . I will fix it directly on your site .

    dageraad Friend
    #852592

    Yes it works! Thanks Pankaj.

    A last question concerning these adjusted php-files:
    Will these modifications be kept when updating the template? Is there something like php overrides, like the custom.css we have for the stylesheets?

    Pankaj Sharma Moderator
    #852637

    Hi
    You need to save the custom changes , it can be override on template update .
    Try to make override in /local folder if its not work you need save changes and apply them again when they override ..
    Path : /ja_magz_ii/local/html/com_content/featured/default_item.php

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 9 replies, has 2 voices, and was last updated by  Pankaj Sharma 8 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum