-
AuthorPosts
-
November 24, 2012 at 12:33 pm #182546
1.
jasocial_feed save_imageHow to create folder by date?
Create a folder every day。
Replace Fixed path ‘/images/jasocial_feed[/’For example:
images/2012/11/24/ Replace ‘/images/jasocial_feed[/’
images/2012/11/25/ Replace ‘/images/jasocial_feed[/’
images/2012/11/26/ Replace ‘/images/jasocial_feed[/’
And so on…..<Because godaddy single directory limit 1024 the number of files. >
-
Luna Garden Moderator
Luna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
November 27, 2012 at 2:42 am #474312Hello mzamao,
In order to create folder by date, please go to this file:
pluginsplg_system_jasocial_feedjasocial_feed.php
change function saveImage by these follow:
private function saveImage($url, $src, $caption = '', $alt = '') {
if($this->save_image) {
$dt = sprintf('/%d/%d/%d/', date('Y'), date('m'), date('d'));
$folder = JPATH_ROOT.$dt;
$result = JFolder::create($folder);
if($result) {
$filename = basename($url);
$filename = preg_replace('/?.*?$/', '', $filename);
$ext = JFile::getExt($filename);
$ext = strtolower($ext);
if($ext == 'php') $ext = 'jpg';
$filename = md5($url).'.'.$ext;$file = $folder.$filename;
if(!JFile::exists($file)) {
if($src == 'facebook') {
$validImg = $this->checkImgSize($url);
if(!$validImg) {
return false;
}
}$content = @file_get_contents($url);
if($content) {
$result = JFile::write($file, $content);
if($result) {
//update with local link
$url = 'images'.$dt.$filename;
}
}
return $this->getArticleImageObj($url, $caption, $alt, $src);
} else {
$url = 'images'.$dt.$filename;
return $this->getArticleImageObj($url, $caption, $alt, $src);
}
}
}if($src == 'facebook') {
$validImg = $this->checkImgSize($url);
} else {
//image that get from twitter is checked before
$validImg = true;
}
if($validImg) {
return $this->getArticleImageObj($url, $caption, $alt, $src);
} else {
return false;
}}
Please try and let me know the results.
November 28, 2012 at 8:48 am #474502Hello
Solve the problem, very, very Thank you!!!!!
Following the code you need to add the “/ images /” normal use,
otherwise the wrong path, the picture can not be displayed!
For example:
*$ dt = sprintf (‘/ images /% d /% d /% d /’, date (‘Y’), date (‘m’), date (‘d’));
=====================
Another questionjasocial_feed
Run NowAfter ‘Run Now’ a few minutes
Prompt:
500 Internal Server ErrorWhy?
Server problems?
Code issues?
*keywords too much?-
Luna Garden Moderator
Luna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
November 28, 2012 at 9:26 am #474506Hi,
<em>@mzamao 348277 wrote:</em><blockquote>
Following the code you need to add the “/ images /” normal use,
otherwise the wrong path, the picture can not be displayed!
For example:
*$ dt = sprintf (‘/ images /% d /% d /% d /’, date (‘Y’), date (‘m’), date (‘d’));
</blockquote>Yes, I have missed this line.
<blockquote>Run Now
After ‘Run Now’ a few minutes
Prompt:
500 Internal Server Error
Why?
Server problems?
Code issues?
*keywords too much?</blockquote>Maybe cause of the data fetching is so large, can you try to increase your memory_limit in php.ini file.
And I want to know before changing the function saveImage, when you press ‘Run now’, it still works or not. If not please send me your admin account and FTP account for further check.
November 28, 2012 at 10:57 am #474526Thank you very much!!!
============
before changing the function save image,
*when press ‘Run now’
Can feed content!
But the uncertainty is not all feed completed? ?‘Run now’ , After a few minutes later , Error occurs
*”500 Internal Server Error” …….=====
Another question!!How to make the content is loaded in advance!
Advance Loading, not rolled to the bottom of the load ,
Do not scroll to the bottom of the page is loaded,。
Been loaded, so users do not need to wait for the load, and will be able to directly browse!Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
December 3, 2012 at 11:01 am #475028<blockquote>before changing the function save image,
*when press ‘Run now’
Can feed content!
But the uncertainty is not all feed completed? ?‘Run now’ , After a few minutes later , Error occurs
*”500 Internal Server Error” …….
</blockquote>
Maybe cause of the data fetching is so large, can you try to increase your memory_limit in php.ini file.<blockquote>How to make the content is loaded in advance!
Advance Loading, not rolled to the bottom of the load ,
Do not scroll to the bottom of the page is loaded,。
Been loaded, so users do not need to wait for the load, and will be able to directly browse! </blockquote>It was how JA Wall works, and we can’t change the Loading content.
Here the link for reference to increase number article load: http://www.joomlart.com/forums/topic/lazyload-problem-only-5-items-slow-nothing-without-mouse-movement/
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)This topic contains 6 replies, has 2 voices, and was last updated by Luna Garden 12 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum
-