English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: API Plugin onDeploy_OK
#11423
API Plugin onDeploy_OK 11 Years, 6 Months ago Karma: 1
I am writing a plugin that I am triggering for onDeploy_OK. I am trying to use either JFile::copy() or just copy() to transfer the users profile image to a folder of the new site they created but the file doesn't exist yet.

Code:

$fileLives = JFile::exists($profile_dest);
if(!$fileLives){
return JError::raiseWarning( 500, JText::_('File does not exist '. $enteredvalues['id']) );
}else{
JError::raiseWarning( 500, JText::_('IT DID EXIST '. $enteredvalues['id']) );
}



The result is always false so I'm wondering if this function fires AFTER the files are all copied over? Or is there another way? I even tried renaming the function to someting else like doFileCopy(&$enteredvalues) and then calling it under

Code:

$this->_onDeploy_OK( $enteredvalues);
near the bottom of saveSlave() inside

Code:

components/com_multisites/views/slaves/view.php
hoping it would trigger AFTER files are moved but still get the same result. How can I run this code AFTER I know the files have been transferred?
buddyq
Expert Boarder
Posts: 106
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#11429
Re: API Plugin onDeploy_OK 11 Years, 6 Months ago Karma: 54
What is the $profile_dest ?

When a slave site is deployed, you can retreive all its informations with the
MultisitesUtils::getSiteInfo( <SITE ID> )

So if you know the site ID, you can retreive the detailed info on the site and therefore its deploy_dir (the deployed directory).
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla