-
AuthorPosts
-
giusti2 Friend
giusti2
- Join date:
- August 2012
- Posts:
- 117
- Downloads:
- 8
- Uploads:
- 8
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
June 22, 2014 at 9:42 pm #199064Does 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();
1 user says Thank You to giusti2 for this useful post
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
June 23, 2014 at 10:21 am #539849Thanks for sharing the tweak 🙂
giusti2 Friendgiusti2
- Join date:
- August 2012
- Posts:
- 117
- Downloads:
- 8
- Uploads:
- 8
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
June 23, 2014 at 11:41 am #539858Do you have a solution for Joomla 3?
giusti2 Friendgiusti2
- Join date:
- August 2012
- Posts:
- 117
- Downloads:
- 8
- Uploads:
- 8
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
June 25, 2014 at 9:51 am #540141Dear 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 FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
June 25, 2014 at 10:43 am #540149Please 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.
-
AuthorPosts
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
Jump to forum