Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • robnob Friend
    #175525

    I apologize for asking a lot of questions in a short period of time. (this will be my last)

    1. I am curious if there is a way to add the Author’s name to this module? For example display the image, title of article and author of the article. .
    2. Also – is there a way to move the text field to overlap the image? (white text)
    Basically, i would like to make a sub-module from the current JA contentslider2 and install it under a different name (contentslider3)

    As seen here..


    1. te1
    2. te1
    khoand Friend
    #446247

    2. Also – is there a way to move the text field to overlap the image? (white text)

    You find the code from /templates/ja_methys/css/mod_jacontentslider.css

    div.ja_slidetitle a {
    font-weight: normal;
    font-size: 150%;
    color: #111; < change text to white
    }


    You replace the code from /templates/ja_methys/css/mod_jacontentslider.css

    div.ja_slidetitle {
    font-family: Georgia,Arial, Helvetica, sans-serif;
    }

    with

    div.ja_slidetitle {
    font-family: Georgia,Arial, Helvetica, sans-serif;
    position: absolute;
    top: 70px;
    }

    robnob Friend
    #446398

    Thanks very much Khoand – that was very helpful.

    Do you know #1? how to add the authors name?

    khoand Friend
    #446469

    You replace the code from /templates/ja_methys/html/mod_jacontentslider2/default.php

    <?php echo ($params->get( 'link_titles' ) ) ? '<a href="'.$link.'" title="">'.$contn->title.'</a>' : $contn->title;?>
    with


    <?php $user =& JFactory::getUser($contn->created_by); ?>
    <?php echo ($params->get( 'link_titles' ) ) ? '<a href="'.$link.'" title="">'.$contn->title.' - '.$user->name.'</a>' : $contn->title.' - '.$user->name;?>

    robnob Friend
    #450904

    Khoand – How do you add a break between the Title and Username? i tried adding a echo /n and it gave me a fatal error??
    Also can you link the username to the k2 userpage? or does that require too much coding? Thanks as always

    robnob Friend
    #450908

    also – i was hoping to apply different css to the title/username

    Sherlock Friend
    #451019

    <em>@robnob 317016 wrote:</em><blockquote>also – i was hoping to apply different css to the title/username</blockquote>

    hi robnob,

    what do you meant by “apply different css to the title/username” ? how do we know what css is right for a title/username

    robnob Friend
    #451031

    Hi Dat Hoang,

    In the image above – you will notice that the Title and User are from the same php script.
    I guess i am wondering how to separate them in two scripts so i can apply two separate CSS settings.
    1. for a larger texted title and 2. a second line with smaller font for the User (also linked to the users K2 profile)

    I hope that clarifies. Thank you.

    <em>@Dat Hoang 317150 wrote:</em><blockquote>hi robnob,

    what do you meant by “apply different css to the title/username” ? how do we know what css is right for a title/username</blockquote>


    1. showexample
    Sherlock Friend
    #451182

    Hi robnob,

    you can replace pervious code
    [PHP]
    <?php $user =& JFactory::getUser($contn->created_by); ?>
    <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” title=””>’.$contn->title.’ – ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>
    [/PHP]

    By the below that would link username to the user page
    [PHP]
    <?php $user =& JFactory::getUser($contn->created_by);
    require_once (JPATH_SITE.DS.’components’.DS.’com_k2′.DS.’helpers’.DS.’route.php’);
    require_once (JPATH_SITE.DS.’components’.DS.’com_k2′.DS.’helpers’.DS.’utilities.php’);
    $userLink = JRoute::_(K2HelperRoute::getUserRoute($user->id));

    ?>
    <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” class=”ctitle” title=””>’.$contn->title.'</a> – <a class=”cuser” href=’.$userLink.’> ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>

    [/PHP]

    Also now you have two separate css class for title and username those are ctitle and cuser you can define different css to the title/username via those class.

    robnob Friend
    #451301

    THANK YOU! By Adding the 2 new Classes (cuser/ctitle)
    Do i have to manually add them to the CSS file or should they auto generate?

    robnob Friend
    #451502

    Sherlock – I love the php script – but i am having a ton of trouble applying CSS settings to a A CLASS… should i break this up and put it into two DIV CLASS? Sorry for my lack of experience.

    <em>@Sherlock Holmes 317357 wrote:</em><blockquote>Hi robnob,

    you can replace pervious code
    [PHP]
    <?php $user =& JFactory::getUser($contn->created_by); ?>
    <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” title=””>’.$contn->title.’ – ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>
    [/PHP]

    By the below that would link username to the user page
    [PHP]
    <?php $user =& JFactory::getUser($contn->created_by);
    require_once (JPATH_SITE.DS.’components’.DS.’com_k2′.DS.’helpers’.DS.’route.php’);
    require_once (JPATH_SITE.DS.’components’.DS.’com_k2′.DS.’helpers’.DS.’utilities.php’);
    $userLink = JRoute::_(K2HelperRoute::getUserRoute($user->id));

    ?>
    <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” class=”ctitle” title=””>’.$contn->title.'</a> – <a class=”cuser” href=’.$userLink.’> ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>

    [/PHP]

    Also now you have two separate css class for title and username those are ctitle and cuser you can define different css to the title/username via those class.</blockquote>

    robnob Friend
    #451648

    Can anybody answer this question? I need to add two CSS styles, but i cannot figure out how to give CSS settings to a CLASS and not a DIV CLASS… if that makes sense :-[ Thank you

    Sherlock Friend
    #451748

    <em>@robnob 317942 wrote:</em><blockquote>Can anybody answer this question? I need to add two CSS styles, but i cannot figure out how to give CSS settings to a CLASS and not a DIV CLASS… if that makes sense :-[ Thank you</blockquote>

    hi robnob,

    I am sorry for this late reply, I am not sure which css settings you want to apply for those a tags, if you want you can wrap those a tags by a div tag, try with this code
    [PHP] <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<div class=”ctitle”><a href=”‘.$link.'” title=””>’.$contn->title.'</a></div> – <div class=”cuser”><a href=’.$userLink.’> ‘.$user->name.'</a></div>’ : $contn->title.’ – ‘.$user->name;?>[/PHP]

    Instead of this code as current
    [PHP] <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” class=”ctitle” title=””>’.$contn->title.'</a> – <a class=”cuser” href=’.$userLink.’> ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>[/PHP]

    robnob Friend
    #451926

    Worked like a charm Sherlock (except that i can’t get the – or text Written By) in front of the cuser div.

    Any chance i can ask one more php type question?
    How would i add the K2 Category?
    For example (in the image below) if i replaced the cusername “jason falb” with category name – like NBA

    Thanks so much!

    <em>@Sherlock Holmes 318062 wrote:</em><blockquote>hi robnob,

    I am sorry for this late reply, I am not sure which css settings you want to apply for those a tags, if you want you can wrap those a tags by a div tag, try with this code
    [PHP] <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<div class=”ctitle”><a href=”‘.$link.'” title=””>’.$contn->title.'</a></div> – <div class=”cuser”><a href=’.$userLink.’> ‘.$user->name.'</a></div>’ : $contn->title.’ – ‘.$user->name;?>[/PHP]

    Instead of this code as current
    [PHP] <?php echo ($params->get( ‘link_titles’ ) ) ? ‘<a href=”‘.$link.'” class=”ctitle” title=””>’.$contn->title.'</a> – <a class=”cuser” href=’.$userLink.’> ‘.$user->name.'</a>’ : $contn->title.’ – ‘.$user->name;?>[/PHP]</blockquote>


    1. Example-ORL
    Sherlock Friend
    #451931

    Hi robnob,

    you no longer want usernames there ? so which link the category name will refer to ?

    <blockquote>
    Any chance i can ask one more php type question?
    How would i add the K2 Category?
    For example (in the image below) if i replaced the cusername “jason falb” with category name – like NBA
    </blockquote>

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 17 replies, has 3 voices, and was last updated by  Sherlock 12 years, 6 months ago.

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