-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
2,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
OC_Util::checkAdminUser(); | ||
$shareSecret=OCP\Config::getSystemValue('secretword'); | ||
if($shareSecret=='') $shareSecret='mySecretWord'; | ||
|
||
$siteEmail=OCP\Config::getSystemValue('siteemail'); | ||
if($siteEmail=='') $siteEmail=''; | ||
|
||
$tmpl = new OCP\Template( 'files_sharing_widget', 'admin'); | ||
$tmpl->assign('secretword', $shareSecret); | ||
$tmpl->assign('siteemail', $siteEmail); | ||
|
||
return $tmpl->fetchPage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
|
||
OCP\JSON::checkLoggedIn(); | ||
OCP\JSON::checkAppEnabled('files_sharing_widget'); | ||
OCP\JSON::callCheck(); | ||
|
||
$delId = isset($_POST["delid"])?$_POST["delid"]:''; | ||
OC_Widget_Helper::delShare($delId); | ||
OCP\JSON::success(array("data" => array( "msg" =>$delId))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
|
||
OCP\JSON::checkLoggedIn(); | ||
OCP\JSON::checkAppEnabled('files_sharing_widget'); | ||
OCP\JSON::callCheck(); | ||
|
||
$ObjSaveParamter['maxpicsperpage']=intval($_POST['sppics']); | ||
$ObjSaveParamter['imgheight']=intval($_POST['spthumb']); | ||
$ObjSaveParamter['width']=intval($_POST['spwidth']); | ||
$ObjSaveParamter['height']=intval($_POST['spheight']); | ||
|
||
$ObjSaveJson=json_encode($ObjSaveParamter); | ||
OC_Preferences::setValue( OC_User::getUser(), 'files_sharing_widget', 'parameter', $ObjSaveJson); | ||
|
||
OCP\JSON::success(array("data" => array( "msg" =>'success'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
OCP\JSON::checkLoggedIn(); | ||
OCP\JSON::checkAppEnabled('files_sharing_widget'); | ||
OCP\JSON::callCheck(); | ||
|
||
if( isset( $_POST['email'] ) && filter_var( $_POST['email'], FILTER_VALIDATE_EMAIL) ) { | ||
$toMail=trim($_POST['email']); | ||
$mailTxt = isset($_POST['mailtxt']) ? strip_tags(nl2br($_POST['mailtxt'])) : false; | ||
$sharelink=$_POST['sharelink']; | ||
//$from = '[email protected]'; | ||
$from=OCP\Config::getSystemValue('siteemail'); | ||
if($from=='') $from=''; | ||
//OC_MAIL::setFooter("\n--\n LibasysCloud - More than a Cloud!"); | ||
OC_MAIL::send($toMail, $toMail, 'Share Link by ' . OCP\USER::getUser(), $mailTxt."\n\nShared Link:\n".$sharelink, $from, 'ownCloud'); | ||
|
||
OCP\JSON::success(array("data" => array( "msg" =>'success'))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
OCP\JSON::checkLoggedIn(); | ||
OCP\JSON::checkAppEnabled('files_sharing_widget'); | ||
OCP\JSON::callCheck(); | ||
|
||
// Get data | ||
if(isset( $_POST['mySecretWord'] ) && $_POST['mySecretWord'] != '') { | ||
$secretWord=trim($_POST['mySecretWord']); | ||
OCP\Config::setSystemValue('secretword', $secretWord); | ||
|
||
OC_JSON::success(array("data" => array( "message" => 'Saved'))); | ||
}elseif(isset( $_POST['siteemail'] ) && filter_var( $_POST['siteemail'], FILTER_VALIDATE_EMAIL)) { | ||
$siteEmail=trim($_POST['siteemail']); | ||
OCP\Config::setSystemValue('siteemail', $siteEmail); | ||
OC_JSON::success(array("data" => array( "message" => 'Saved'))); | ||
} | ||
else{ | ||
OC_JSON::error(array("data" => array( "message" => 'Error' ))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* ownCloud - Picture Widget | ||
* | ||
* @author Sebastian Doell | ||
* @copyright 2012 Sebastian Doell <sebastian.doell ad libasys dot de> | ||
* | ||
* | ||
*/ | ||
|
||
OCP\App::registerPersonal('files_sharing_widget', 'settings'); | ||
OCP\App::registerAdmin('files_sharing_widget', 'admin'); | ||
OCP\Util::addscript( 'files_sharing_widget', 'settings'); | ||
OCP\Util::addscript( 'files_sharing_widget', 'admin'); | ||
OC::$CLASSPATH['OC_Widget_Helper'] = 'apps/files_sharing_widget/lib/widgethelper.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<info> | ||
<id>files_sharing_widget</id> | ||
<name>Share Gallery Widget</name> | ||
<description>Picture Sharing Gallery Widget for use of implementing on a website or share by a Link</description> | ||
<licence>AGPL</licence> | ||
<author>S. Doell</author> | ||
<require>4.9</require> | ||
<shipped>true</shipped> | ||
<default_enable/> | ||
<types> | ||
<filesystem/> | ||
</types> | ||
</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0 beta |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.