Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • art3 Friend
    #201112

    How can I add icon Linked-in Extra Fields?

    We have Facebook, Twitter, Flickr and Google, Linked-in need to have

    I also need the link of each open in a new window (_blank) how can I do it?
    It is very complicated, it is important because we do not want visitors were fenced from the main website.

    No matter is I must eliminate Flickr, because we will not use.

    Thank you very much for your help.

    Ninja Lead Moderator
    #548709

    I’m not sure what you are implying. Just for better clarification, please include screenshot for further investigationand which area are you referring to on your site?

    art3 Friend
    #548850

    Sorry, do not speak English, sorry my bad Inglés.

    1 – Add Extra Fields on Linkedin button.
    2 – I need to click to open in new window (_blank).

    Thank you very much for your help.


    1. 1
    2. 2
    Ninja Lead Moderator
    #548952

    Many changes to do so. But if you are a developer, you can follow my solution below

    #1: Add Linkedin button

    + Open templates/ja_medicare/etc/extrafields/doctors.xml file

    Change

    <field name="google_plus_link"
    type="text"
    default=""
    label="TPL_EX_GOOGLE_PLUS_LINK"
    description="TPL_EX_GOOGLE_PLUS_LINK_DESC" />

    To

    <field name="google_plus_link"
    type="text"
    default=""
    label="TPL_EX_GOOGLE_PLUS_LINK"
    description="TPL_EX_GOOGLE_PLUS_LINK_DESC" />
    <field name="linkedin_link"
    type="text"
    default=""
    label="TPL_EX_LINKEDIN_LINK"
    description="TPL_EX_LINKEDIN_LINK_DESC" />

    + Open templates/ja_medicare/html/com_content/article/default-aboutus.php file

    Change

    <?php
    //Check extrafields
    if($extrafields['google_plus_link']): ?>
    <a href="<?php echo $extrafields['google_plus_link'];?>" class="btn btn-google-plus"><i class="fa fa-google-plus"></i></a>
    <?php
    endif;
    ?>

    To

    <?php
    //Check extrafields
    if($extrafields['google_plus_link']): ?>
    <a href="<?php echo $extrafields['google_plus_link'];?>" class="btn btn-google-plus"><i class="fa fa-google-plus"></i></a>
    <?php
    endif;
    ?>
    <?php
    //Check extrafields
    if($extrafields['linkedin_link']): ?>
    <a href="<?php echo $extrafields['linkedin_link'];?>" class="btn btn-linkedin"><i class="fa fa-linkedin"></i></a>
    <?php
    endif;
    ?>

    + Open templates/ja_medicare/templateHelper.php file

    change

    if($data instanceof JRegistry){
    return array(
    'jdepartment_name' => $data->get('jdepartment_name', ''),
    'facebook_link'=>$data->get('facebook_link', ''),
    'flickr_link'=>$data->get('flickr_link', ''),
    'google_plus_link'=>$data->get('google_plus_link', ''),
    'twitter_link'=>$data->get('twitter_link', '')
    );
    }

    return array(
    'jdepartment_name' => '',
    'facebook_link'=> '',
    'flickr_link'=>'',
    'google_plus_link'=>'',
    'twitter_link'=>''
    );

    To

    if($data instanceof JRegistry){
    return array(
    'jdepartment_name' => $data->get('jdepartment_name', ''),
    'facebook_link'=>$data->get('facebook_link', ''),
    'flickr_link'=>$data->get('flickr_link', ''),
    'google_plus_link'=>$data->get('google_plus_link', ''),
    'twitter_link'=>$data->get('twitter_link', ''),
    'linkedin_link'=>$data->get('linkedin_link', '')
    );
    }

    return array(
    'jdepartment_name' => '',
    'facebook_link'=> '',
    'flickr_link'=>'',
    'google_plus_link'=>'',
    'twitter_link'=>'',
    'linkedin_link'=>''
    );

    + Open templates/ja_medicare/html/mod_jacontentslider/default.php file

    Change

    <?php
    //Check extrafields
    if($extrafields['google_plus_link']): ?>
    <a href="<?php echo $extrafields['google_plus_link'];?>" class="ja-slidesocial-google-plus"><i class="fa fa-google-plus"></i></a>
    <?php
    endif;
    ?>

    To

    <?php
    //Check extrafields
    if($extrafields['google_plus_link']): ?>
    <a href="<?php echo $extrafields['google_plus_link'];?>" class="ja-slidesocial-google-plus"><i class="fa fa-google-plus"></i></a>
    <?php
    endif;
    ?>
    <?php
    //Check extrafields
    if($extrafields['linkedin_link']): ?>
    <a href="<?php echo $extrafields['linkedin_link'];?>" class="ja-slidesocial-linkedin"><i class="fa fa-linkedin"></i></a>
    <?php
    endif;
    ?>

    + Create templates/ja_medicare/css/custom.css file and add new rule


    .social-info .btn.btn-linkedin {
    background: #211F20 ;
    }

    .ja-contentslider-center .jsslide .ja_slide_footer .ja-slidesocial .ja-slidesocial-linkedin {
    background: #211f20 ;
    }

    #2: Add target “_blank” in extra field

    You can make changes in

    Open templates/ja_medicare/html/mod_jacontentslider/default.php and templates/ja_medicare/html/com_content/article/default-aboutus.php files and change it as:

    <?php
    //Check extrafields
    if($extrafields['linkedin_link']): ?>
    <a href="<?php echo $extrafields['linkedin_link'];?>" target="_blank" class="btn btn-linkedin"><i class="fa fa-linkedin"></i></a>
    <?php
    endif;
    ?>

    art3 Friend
    #549090

    Thank you very much Ninja Lead !!!
    You helped me a lot, is perfect !!!

    To complete: (Language)

    #1:
    /language/en-GB/en-GB.tpl_ja_medicare.sys.ini
    ADD:


    ;Extrafields component content
    TPL_EX_LINKEDIN_LINK="Linkedin Link"
    TPL_EX_LINKEDIN_LINK_DESC="Linkedin Link"

    #2:
    /templates/ja_medicare/language/en-GB/en-GB.tpl_ja_medicare.sys.ini
    ADD:


    ;Extrafields component content
    TPL_EX_LINKEDIN_LINK="Linkedin Link"
    TPL_EX_LINKEDIN_LINK_DESC="Linkedin Link"

    Thank you very much !!!

    cambo Friend
    #828520

    I tried with the code above. It results with some major problems and blank pages.

    Are they no easier solution, where only I replace one of the existing icons with LinkedIn. I tried using CSS but did not succeed.
    I need help to replace one of the existing icons with a LinkedIn

    Ninja Lead Moderator
    #828524

    I tried with the code above. It results with some major problems and blank pages.

    Are they no easier solution, where only I replace one of the existing icons with LinkedIn. I tried using CSS but did not succeed.
    I need help to replace one of the existing icons with a LinkedIn

    I am not sure the problem on your site, but you can give me the URL of your site and screenshot the problem on your site

    Besides that, you can let me know steps of what did you change on your site?

    cambo Friend
    #833983

    I restored my files and looking for an easier solution, is it possible to change the icon used for Flickr ("ja-slidesocial-flickr") and replace it with LinkedIN? Se attached file.

    I tried to add som code in custom.css without success and need help with some code that replace it


    1. linkedin
    Ninja Lead Moderator
    #835642

    @cambo: This way will help you to change flickr icon to linkedIN icon

    • Open templates/ja_medicare/html/mod_jacontentslider/default.php file

    find and change

    //Check extrafields
    if($extrafields['flickr_link']):  ?>
        <a href="<?php echo $extrafields['flickr_link'];?>" class="ja-slidesocial-flickr"><i class="fa fa-flickr"></i></a>
        <?php
    endif;
    ?>

    to

    //Check extrafields
    if($extrafields['flickr_link']):  ?>
        <a href="<?php echo $extrafields['flickr_link'];?>" class="ja-slidesocial-flickr"><i class="fa fa-linkedin"></i></a>
        <?php
    endif;
    ?>

    Hope it helps

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

This topic contains 8 replies, has 3 voices, and was last updated by  Ninja Lead 8 years, 10 months ago.

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