Hello there!
Thanks for a really great component, I make a album on my site that I named
Mobileuploads and there I have make connection to my Picasa webalbum.
In my Picasaweb album I have enabled Upload photos using email.
I tried it and it worked, my photos comes to my picasa webalbum.
Now to my question, as I understand I must click Load (in my phoca gallery) everytime
to display my new photos from my picasa webalbum..
Is it possible to have Autoload, like load every 10 min, so
I don´t need to login every time.
Because on this category I want all photos uploading everytime from my
mobile phone.
Hope you understand what I mean..
Kind regards
David
Hi is it possible to auto load from Picasa webbalbum??
-
dkdyk
- Phoca Newbie

- Posts: 7
- Joined: 17 Aug 2010, 14:06
- Jan
- Phoca Hero

- Posts: 49150
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Hi is it possible to auto load from Picasa webbalbum??
Hi, this is more server settings issue than Phoca Gallery, autoloading needs to be solved on server. For now there is no support for autoloading in Phoca Gallery as this needs server features like cron etc. to be set.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
zach
- Phoca Newbie

- Posts: 5
- Joined: 25 Jan 2012, 16:26
Re: Hi is it possible to auto load from Picasa webbalbum??
[BUMP]
I am also trying to figure out how to do some kind of 'Auto Load' script. The Phoca album is directly connected to a specific album on my Picasa account so I can send a photo to the secret picasa email address with linked album name as subject.
The purpose of this phoca gallery is to display user submitted content after a quick admin review. Ideally the chain of events would be: users will email the admin their content, it is reviewed by admin, admin forwards email to secret picasa address, images automatically show up on phoca gallery.
Any advice is greatly appreciated!
I am also trying to figure out how to do some kind of 'Auto Load' script. The Phoca album is directly connected to a specific album on my Picasa account so I can send a photo to the secret picasa email address with linked album name as subject.
The purpose of this phoca gallery is to display user submitted content after a quick admin review. Ideally the chain of events would be: users will email the admin their content, it is reviewed by admin, admin forwards email to secret picasa address, images automatically show up on phoca gallery.
Any advice is greatly appreciated!
-
zach
- Phoca Newbie

- Posts: 5
- Joined: 25 Jan 2012, 16:26
Re: Hi is it possible to auto load from Picasa webbalbum??
After a little searching I found an extension called JCron Scheduler, which seems like it might solve this problem. However, in order for it to work it asks for one of the following: SSH Command, Web Address fopen(), Web Address fsockopen(), or Plugin.
Does anyone know what I could enter in order for the Load button to tie into JCron?
Thanks!
Does anyone know what I could enter in order for the Load button to tie into JCron?
Thanks!
-
zach
- Phoca Newbie

- Posts: 5
- Joined: 25 Jan 2012, 16:26
Re: Hi is it possible to auto load from Picasa webbalbum??
Jan or anyone who can help,
Could you please help me write a script which would "Load" the images? I will have jcron load the script once every hour. I am not very familiar with php and am having a lot of problems figuring out how to write a script which logs into my Joomla, runs the "Load" command, and logs out.
Thanks!
Zach
Could you please help me write a script which would "Load" the images? I will have jcron load the script once every hour. I am not very familiar with php and am having a lot of problems figuring out how to write a script which logs into my Joomla, runs the "Load" command, and logs out.
Thanks!
Zach
- Jan
- Phoca Hero

- Posts: 49150
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Hi is it possible to auto load from Picasa webbalbum??
Hi, for now I don't have any experiences with cron, so cannot give any clue advices there

If you find Phoca extensions useful, please support the project
-
zach
- Phoca Newbie

- Posts: 5
- Joined: 25 Jan 2012, 16:26
Re: Hi is it possible to auto load from Picasa webbalbum??
Thanks for the reply, Jan!
Setting up the cron part isnt too difficult, I have already figured that out for some other tasks. However, I do need help writing a simple script which logs into Joomla, Loads the images, and Logs out. If you could please help me find the command behind the Load button it would help me a ton.
Thanks!
Setting up the cron part isnt too difficult, I have already figured that out for some other tasks. However, I do need help writing a simple script which logs into Joomla, Loads the images, and Logs out. If you could please help me find the command behind the Load button it would help me a ton.
Thanks!
-
zach
- Phoca Newbie

- Posts: 5
- Joined: 25 Jan 2012, 16:26
Re: Hi is it possible to auto load from Picasa webbalbum??
Here is the code from another PHP file running on this Joomla account:
I have cron open this file every hour to import posts from a dedicated email address. Could we modify this script to do the load function? I think I have narrowed down the load script to:
But how do I get the script to automatically "click" Load?
Code: Select all
define( '_JEXEC', 1 );
define('DS', DIRECTORY_SEPARATOR);
define('JPATH_BASE', substr(__FILE__,0,strrpos(__FILE__, DS."components")));
define('JPATH_COMPONENT', JPATH_BASE .DS.'components'.DS.'com_post_by_email');
require_once( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once( JPATH_BASE .DS.'includes'.DS.'framework.php' );
require_once( JPATH_BASE .DS.'includes'.DS.'helper.php' );
require_once( JPATH_BASE .DS.'includes'.DS.'toolbar.php' );
require_once( JPATH_COMPONENT .DS.'controller.php' );
jimport('joomla.application.component.controller');
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$controller = new PostByEmailController( );
echo $controller->importAll();Code: Select all
// First get Album ID from PICASA
// Second save this ID to Category
// Third save images with ID of category
$errorMsgA = $errorMsgI = $msg = '';
//FIRST
if (isset($_GET['picstart'])) {
// Category is saved - use this id and don't save it again
$post['exta'] = JRequest::getVar( 'picalbum', '', 'get' );
$post['extu'] = JRequest::getVar( 'picuser', '', 'get' );
$post['extauth']= JRequest::getVar( 'picauth', '', 'get' );
}
$album = $model->picasaalbum($post['extu'], $post['extauth'], $post['exta'], $errorMsgA);
if (!$album) {
if($errorMsgA != '') {
if ($msg != '') {$msg .= '<br />';}
$msg .= $errorMsgA;
}
} else {
$post['extid'] = $album['id'];
}
// SECOND
if (isset($_GET['picstart'])) {
// Category is saved - use this id and don't save it again
$cid = JRequest::getVar( 'cid', array(0), 'get', 'array' );
$id = (int) $cid[0];
} else {
$id = $model->store($post);//you get id and you store the table data
}
if ($id && $id > 0) {
if ($msg != '') {$msg .= '<br />';}
$msg .= JText::_( 'Changes to Phoca Gallery Categories Saved' );
// THIRD
if ($album && (int)$album['id'] > 0) {
// PAGINATION
$start = JRequest::getVar( 'picstart', 1, 'get', 'int' );
$max = $picasa_load_pagination;
$pagination = '&start-index='.(int)$start.'&max-results='.(int)$max;
$picImg = $model->picasaimages($post['extu'],$post['extauth'], $album['id'], $id, $pagination, $errorMsgI);
if (!$picImg) {
if($errorMsgI != '') {
if ($msg != '') {$msg .= '<br />';}
$msg .= $errorMsgI;
}
} else {
if (isset($album['num']) && (int)$album['num'] > 0) {
$newStart = (int)$start + (int)$max;
$newStartIf = (int)$newStart - 1;
// Sec - - - -
$loop = (int)$album['num'] / (int)$max;
$maxCount = (int)$max;
// - - - - - -
if ((int)$loop > 50 || $maxCount < 20) {
if ($msg != '') {$msg .= '<br />';}
$msg .= JText::_( 'PHOCAGALLERY_PICASA_IMAGE_NOT_ALL_LOADED' );
} else {
if ((int)$album['num'] > (int)$newStartIf) {
$refreshUrl = 'index.php?option=com_phocagallery&controller=phocagalleryc&cid[]='.$id.'&task=loadextimg&picalbum='.$post['exta'].'&picuser='.$post['extu'].'&picauth='.$post['extauth'].'&picstart='.(int)$newStart;
$countImg = $newStartIf + $max;
if ($countImg > $album['num']) {
$countImg = $album['num'];
}
$countInfo = '<div><b>'.$newStart. '</b> - <b>'. $countImg . '</b> ' .JText::_('PHOCAGALLERY_FROM'). ' <b>' . $album['num'].'</b></div>';
PhocaGalleryPicasa::renderProcessPage($id, $refreshUrl, $countInfo);
exit;
}
}
}
if ($msg != '') {$msg .= '<br />';}
$msg .= JText::_( 'PHOCAGALLERY_PICASA_IMAGE_LOADED' );
}
}
} else {
$msg = JText::_( 'Error Saving Phoca Gallery Categories' );
$id = $post['id'];
}
$this->setRedirect( 'index.php?option=com_phocagallery&controller=phocagalleryc&task=edit&cid[]='. $id, $msg . $errorMsgOwner );
break;
break;
case 'apply':
$id = $model->store($post);//you get id and you store the table data
if ($id && $id > 0) {