Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • giusti2 Friend
    #199064

    Does not work for Joomla 3 … has maybe somebody an idea?

    Joomla 2.5 : Set imported feeds autom. to featured articles

    STEP 1

    pluginssystemjasocial_feedtablesjoomla.php

    and set $item[‘featured’] = ‘1’; on line 66

    If you use K2 you can set the same $item[‘featured’] = ‘1’; on line 78 in file pluginssystemjasocial_feedtablesk2.php

    STEP 2

    Find in joomla.php : return @$this->table->store();

    Replace to :

    if(@$this->table->store()){
    $db = $this->getDbo();
    $query = $db->getQuery(true);
    $query->insert($db->quoteName(‘#__content_frontpage’));
    $query->values($this->table->get(‘id’) . ‘, 0’);
    $db->setQuery($query);
    $db->execute();

    return true;
    }
    return false;

    STEP 3

    If there are problems, then change : $db = $this->getDbo(); to $db = JFactory::getDbo();

    Nazario A Friend
    #539849

    Thanks for sharing the tweak 🙂

    giusti2 Friend
    #539858

    Do you have a solution for Joomla 3?

    giusti2 Friend
    #540141

    Dear Nazario. Can you maybe help me or can you give me a tip how to solve the featured problem? It’s very important for me. At the moment I have to set featured the articles 4 times a day manually and this really annoying. http://www.3spitz.ch

    Nazario A Friend
    #540149

    @giusti,

    Please give it a try for Joomla 3 tweak.

    Open the file: pluginssystemjasocial_feedjasocial_feed.php.

    – Find and replace this code:

    $item = @$x->item($i);
    if(!is_object($item)) {
    break;
    }
    $it = new stdClass();
    $it->image = @$item->getElementsByTagName('image')->item(0)->getElementsByTagName('url')->item(0)->childNodes->item(0)->nodeValue;
    if(!$it->image) {
    continue;
    }

    With:

    $item = @$x->item($i);
    if(!is_object($item)) {
    continue;
    }

    $it = new stdClass();
    if($item->getElementsByTagName('image')->item(0)) {
    $it->image = @$item->getElementsByTagName('image')->item(0)->getElementsByTagName('url')->item(0)->childNodes->item(0)->nodeValue;
    } else {
    $images = $this->parseImageFromContent($item->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue);
    $it->image = isset($images[1]) ? $images[1] : @$images[0];
    }
    if(!$it->image) {
    continue;
    }

    – Then add this line as in the screenshot:

    $content = html_entity_decode( $content, ENT_QUOTES, "utf-8" );

    Let me know how it goes.


    1. Screenshot_9
    2. Screenshot_10
Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Nazario A 10 years, 5 months ago.

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