Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to add blank taget to this

    Hi, I'm trying to modify a free joomla 2.5 rss news module because when the user clicks on a headline, it opens in the same window and takes the user off the page.

    I found this code block and I'm pretty sure this is where the target attribute needs to be added:
    Code:
    $rssUrl = $params->get('rss_link');
    
            //  get RSS parsed object
            $options = array();
            $options['rssUrl'] = $rssUrl;
            if ($params->get('enable_cache')) {
                $options['cache_time'] = $params->get('cache_time', '30');
                $options['cache_time'] *= 60;
            } else {
                $options['cache_time'] = null;
            }
    Can anyone here please tell me how to accomplish this?


    *****UPDATE*****
    On 2nd thought, maybe this is the block of code that needs to be edited:
    Code:
    $showLink = $params->get('link_title');
    $using_mode = $params->get('using_mode', 'categories_selected');
    $userRSS = (trim($using_mode) == 'rss' || trim($using_mode) == 'external') ? true : false;
    $target = $params->get('target');
    Last edited by TheIBFA; 03-09-2013 at 09:01 AM. Reason: Updated info

  • #2
    Regular Coder
    Join Date
    Nov 2012
    Posts
    109
    Thanks
    6
    Thanked 12 Times in 12 Posts
    This is probably not an easy one to find... But somewhere along the lines there should be an HTML URL being generated, possibly in the form <a href='{$target}'>{$showLink}</a>.

    In that line you can add your target='_blank', or include the JS function handeling the opening of the URL in a new window, as using target='_blank' is no longer according to the standards.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •