Skip to content

Commit

Permalink
Update to version 1.1 now supported watermark and other apps install …
Browse files Browse the repository at this point in the history
…path, some bugfixes
  • Loading branch information
libasys committed Dec 19, 2012
1 parent c151c35 commit a8e4452
Show file tree
Hide file tree
Showing 22 changed files with 524 additions and 341 deletions.
9 changes: 8 additions & 1 deletion oc454/README
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
Tested for OC4.5.4 Install instructions
Tested for OC4.5.4 Install instructions And Now also for OC4.5
------------------------------------------------
1. Load the files to the structure of your OC installation (No Files would be overwritten!!)
2. Activate the App [Share Gallery Widget]
3. Go To the admin settings [Share Pics Widget Secret Key and Site-E-Mail] add a secret word like "iamsecret" and enter a site email for the sharing link send email
4. Go To the personal settings [Overview Shared Files and Folders] and enter here your Configurationparameters Picture Widget and save

That's all and now when you sharing a folder of images with subfolders you have a nice webwidget gallery.
[UPDATE]
Please delete the widgetloader.php in the root of OC => moved to apps path

[NEW Features]
Now you can use The Gallery Widget in an other apps folder (e.g. apps2) if this is in config.php iconfigurated
Now you can create your own Watermark text to the pictures (Copyright Hint)
New Js Engine in the widget.js
2 changes: 1 addition & 1 deletion oc454/apps/files_sharing_widget/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
$tmpl->assign('secretword', $shareSecret);
$tmpl->assign('siteemail', $siteEmail);

return $tmpl->fetchPage();
return $tmpl->fetchPage();
6 changes: 6 additions & 0 deletions oc454/apps/files_sharing_widget/ajax/saveparam.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
$ObjSaveParamter['width']=intval($_POST['spwidth']);
$ObjSaveParamter['height']=intval($_POST['spheight']);

$ObjSaveParamter['watermarktxt']=addslashes($_POST['spWMTxt']);
if($_POST['spWMTxt']!='') $ObjSaveParamter['watermark']=1;
else $ObjSaveParamter['watermark']=0;

$ObjSaveParamter['title']=addslashes($_POST['spTitle']);

$ObjSaveJson=json_encode($ObjSaveParamter);
OC_Preferences::setValue( OC_User::getUser(), 'files_sharing_widget', 'parameter', $ObjSaveJson);

Expand Down
25 changes: 12 additions & 13 deletions oc454/apps/files_sharing_widget/ajax/sharesecret.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@
*
*
*/

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' )));
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')));
}
2 changes: 1 addition & 1 deletion oc454/apps/files_sharing_widget/appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
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';
OC::$CLASSPATH['OC_Widget_Helper'] = 'files_sharing_widget/lib/widgethelper.php';
2 changes: 1 addition & 1 deletion oc454/apps/files_sharing_widget/appinfo/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0 beta
0.1
2 changes: 1 addition & 1 deletion oc454/apps/files_sharing_widget/css/widget.css

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions oc454/apps/files_sharing_widget/css/widget.full.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

body.widgetbg {
background: #fff url('../img/purty_wood.jpg') repeat
background: #fff url('../img/purty_wood.jpg') repeat;
}
#ownWidget-container {
position: absolute;
Expand Down Expand Up @@ -1083,13 +1083,22 @@ img {
position: fixed;
right: 10px;
top: 10px;
z-index:202;
width: 24px;
height: 24px;
line-height: 24px;
border: 2px solid #fff;
background: #000;
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 15px;
color: #fff;
text-align: center
font-family: arial;
font-weight: bold;
font-size: 14px;
text-align: center;
box-shadow: 0 1px 8px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 1px 8px rgba(0,0,0,0.6);
border-radius: 13px;
cursor: pointer;
-webkit-border-radius: 13px;
}
#slideshow-content #thumb-tray {
position: fixed;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manfred’s fonts are free for private and charity use. They are even free for commercial use – but if there’s any profit, pls make a donation to organizations like Doctors Without Borders.

These fonts can NOT be included in any compilation CDs, disks or products, either commercial or shareware unless prior permission granted.

All typefaces were created by Manfred Klein 2001-2008.
Binary file not shown.
114 changes: 54 additions & 60 deletions oc454/apps/files_sharing_widget/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,73 +7,67 @@
*
*/

$(document).ready(function(){
$(document).ready(function() {

if ($('#ShareEntreeForm').length > 0) {

if($('#ShareEntreeForm').length >0){

$("#savebutton").click( function(){
if ($('#mySecretW').val() != '') {
// Serialize the data
//var post = $( "#ShareEntreeForm" ).serialize();
var post ={mySecretWord:$("#mySecretW").val()};
OC.msg.startSaving('#ShareEntreeForm .msg');
$.post( OC.filePath('files_sharing_widget', 'ajax', 'sharesecret.php'), post, function(data){
if( data.status == "success" ){
OC.msg.finishedSaving('#ShareEntreeForm .msg', data);

}

});
return false;
} else {

return false;
}
$("#savebutton").click(function() {
if ($('#mySecretW').val() != '') {
// Serialize the data
//var post = $( "#ShareEntreeForm" ).serialize();
var post = {
mySecretWord : $("#mySecretW").val()
};
OC.msg.startSaving('#ShareEntreeForm .msg');
$.post(OC.filePath('files_sharing_widget', 'ajax', 'sharesecret.php'), post, function(data) {
if (data.status == "success") {
OC.msg.finishedSaving('#ShareEntreeForm .msg', data);

});
$("#saveemailbutton").click( function(){
if ($('#mySiteEmail').val() != '') {
// Serialize the data
var post ={siteemail:$("#mySiteEmail").val()};

OC.msg.startSaving('#ShareEntreeForm .msg');
$.post( OC.filePath('files_sharing_widget', 'ajax', 'sharesecret.php'), post, function(data){
if( data.status == "success" ){
OC.msg.finishedSaving('#ShareEntreeForm .msg', data);

}

});
return false;
} else {

return false;
}
}

});
return false;
} else {

return false;
}

});
$("#saveemailbutton").click(function() {
if ($('#mySiteEmail').val() != '') {
// Serialize the data
var post = {
siteemail : $("#mySiteEmail").val()
};

});
}
OC.msg.startSaving('#ShareEntreeForm .msg');
$.post(OC.filePath('files_sharing_widget', 'ajax', 'sharesecret.php'), post, function(data) {
if (data.status == "success") {
OC.msg.finishedSaving('#ShareEntreeForm .msg', data);

}

});
return false;
} else {

return false;
}

});
}

});

OC.msg={
startSaving:function(selector){
$(selector)
.html( t('settings', 'Saving...') )
.removeClass('success')
.removeClass('error')
.stop(true, true)
.show();
OC.msg = {
startSaving : function(selector) {
$(selector).html(t('settings', 'Saving...')).removeClass('success').removeClass('error').stop(true, true).show();
},
finishedSaving:function(selector, data){
if( data.status == "success" ){
$(selector).html( data.data.message )
.addClass('success')
.stop(true, true)
.delay(3000)
.fadeOut(600);
}else{
$(selector).html( data.data.message ).addClass('error');
finishedSaving : function(selector, data) {
if (data.status == "success") {
$(selector).html(data.data.message).addClass('success').stop(true, true).delay(3000).fadeOut(600);
} else {
$(selector).html(data.data.message).addClass('error');
}
}
};
};
Loading

0 comments on commit a8e4452

Please sign in to comment.