Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • pavit Moderator
    #959923

    Hi there

    You can use the language override feature for this , go to languages -> Override -> New -> and find your text then add new text for it

    Example :

    If you want to translate word "Trailer" then search for it and add the new text to the TPL_TRAILER string.

    Hope it helps


    1. Screenshot-at-ago-14-19-18-12
    zoohayr Friend
    #959928

    Hi,
    I do not know if I explain things or not, but the terms I seeks to modify are surrounded in the photo


    1. Sans-titre
    pavit Moderator
    #959938

    You should change these 3 strings as i explained above

    TPL_DIRECTOR TPL_STARRING TPL_YEAR

    Go to your backend , click on Extensions -> Languages -> Override – then click on new

    add your translations as showed in the previous post for the 3 strings mentioned above

    Or alternatively open this file /language/en-GB/en-GB.tpl_ja_moviemax.ini and change these values

    ; Custom
    TPL_VIEW_MORE_INFO = "More News"
    TPL_READMORE       = "Read More"
    TPL_MOVIES_COM_CONTENT_ARTICLE_HITS = "%s"
    TPL_DIRECTOR = "Director"
    TPL_STARRING = "Stars"
    TPL_TRAILER = "Trailer"
    TPL_YEAR = "Year"
    TPL_VIEW_SLIDE_SHOW ="View Slide Show"
    TPL_NUMBER_PHOTOS_OF_SLIDESHOW  ="%d Photos"
    TPL_INFINITY_MORE_ARTICLE           ="More Article"
    TPL_INFINITY_NO_MORE_ARTICLE        ="No Article"

    Both methods are valid


    1. Screenshot-at-ago-14-19-50-06
    2. Screenshot-at-ago-14-19-51-50
    zoohayr Friend
    #959946

    concerning the function "TPL_YEAR" ! there a way to add the month and the day before the year?

    exemple : 18.05.1980

    pavit Moderator
    #959950

    here a way to add the month and the day before the year?

    รน

    Unfortunately this is not possible to obtain with the actual settings, you will need to apply a custom work to modify whole page layout.

    zoohayr Friend
    #959952

    Thank’ a lot ! and if I want to add another additional field ?

    pavit Moderator
    #959953

    and if I want to add another additional field ?

    Take a look at THIS blog post it explains where edit files.

    zoohayr Friend
    #959956

    Hi,

    I could find the file or do I add additional fields. but it still have something that does not work !


    1. champ
    2. field
    pavit Moderator
    #960300

    Hi

    You can use the language override as showed in my previous post to add translation for your labels and description-
    TPL_EX_CONTENT_TEST_LABEL
    TPL_EX_CONTENT_TEST_DESCRIPTION

    zoohayr Friend
    #960505

    Hi,
    I managed to change the name of the field but I still have the display problem.


    1. picture
    pavit Moderator
    #960544

    Hi

    You should also to modify another files /html/com_content/article/movie.php

    adding new extrafield at line 39

    $extrafields = new JRegistry ($this->item->attribs);
    $jcontent_director = $extrafields->get('jcontent_director', '');
    $jcontent_starring = $extrafields->get('jcontent_starring', '');
    $jcontent_trailer = $extrafields->get('jcontent_trailer', '');
    $jcontent_test = $extrafields->get('jcontent_test', '');
    $jcontent_year = $extrafields->get('jcontent_year', '');
    $extrafieldsexist = ($jcontent_director!= '' || $jcontent_starring != '' || $jcontent_trailer != '' || $jcontent_year != '' || $jcontent_test != '');

    and at line 103

     <div class="extrafileds-list">
        <dl>
        <?php 
          if($jcontent_director) echo '<dd itemtype="http://schema.org/Person" itemscope itemprop="director" ><span>'.JText::_('TPL_DIRECTOR').': </span><span itemprop="name">'.$jcontent_director.'</span></dd>';
          if($jcontent_starring) echo '<dd itemtype="http://schema.org/Person" itemscope itemprop="actor"><span>'.JText::_('TPL_STARRING').': </span><span itemprop="name">'.$jcontent_starring.'</span></dd>';
      if($jcontent_test) echo '<dd itemtype="http://schema.org/Person" itemscope itemprop="actor"><span>'.JText::_('TPL_TEST').': </span><span itemprop="name">'.$jcontent_test.'</span></dd>';
          if($jcontent_year) echo '<dd><span>'.JText::_('TPL_YEAR').': </span>'.$jcontent_year.'</dd>';
          if($jcontent_trailer) echo '<dd><a href="'.$jcontent_trailer.'" class="btn btn-block btn-primary" target="_blank">'.JText::_('TPL_TRAILER').'</a></dd>';
        ?>
        </dl>
      </div>

    Now it is showing correctly


    1. Screenshot-at-ago-16-19-14-58
    2. Screenshot-at-ago-16-19-15-15
    zoohayr Friend
    #960587

    Hi,
    Thank you so much "Pavit" .

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

This topic contains 12 replies, has 2 voices, and was last updated by  zoohayr 8 years, 2 months ago.

The topic ‘change names of the extra fields’ is closed to new replies.