aleezabhat
New member
- Jun 6, 2022
- 0
- 1
- 0
There is some guy selling sngine plugins on gumroad, @Tomz do i have permission to post those links?guys, have anyone, some widgets, or recommendations for widgets....?
yesThere is some guy selling sngine plugins on gumroad, @Tomz do i have permission to post those links?
Here you go, as far as i've searched for sngine plugins, this is the only guy that has them.guys, have anyone, some widgets, or recommendations for widgets....?
It seems that the crop indicator is sitting in the same pixel (no secondary dot to crop)Im Sorry, to double Post, but I have this issue,.. which breaks my head,.. I search and search...
Does anybody know,... an alternative Solution for the Issue,.. that the "Save Button" does not redirect,..
Or how to solve,.. it...
Its enough for me,.. if the button changes,.. after uploading, to,.. "Already Uploaded" or redirect the site after success,. to profil site,..
does anybody know,.. in which file the profil picture upload is written?
Does anybody have the same issue,. or is it maybe something, with permission or server??
Cropping doesn't work, that's sad enough
Please help me,.. Thank you very much
hey first of all, thank you soo much for your answerIt seems that the crop indicator is sitting in the same pixel (no secondary dot to crop)
<?php
/**
* ajax -> users -> image crop
*
* @package Sngine
* @author Zamblek
*/
// fetch bootstrap
require('../../../bootstrap.php');
// check AJAX Request
is_ajax();
// user access
user_access(true);
// check demo account
if($user->_data['user_demo']) {
modal("ERROR", __("Demo Restriction"), __("You can't do this with demo account"));
}
// validate inputs
if(!isset($_POST['id']) || !is_numeric($_POST['id'])) {
_error(403);
}
if(!isset($_POST['x']) || !is_numeric($_POST['x'])) {
_error(403);
}
if(!isset($_POST['y']) || !is_numeric($_POST['y'])) {
_error(403);
}
if(!isset($_POST['height']) || !is_numeric($_POST['height'])) {
_error(403);
}
if(!isset($_POST['width']) || !is_numeric($_POST['width'])) {
_error(403);
}
try {
switch ($_POST['handle']) {
case 'user':
// crop user profile picture
/* get full picture */
$get_picture = $db->query(sprintf("SELECT posts_photos.source FROM users INNER JOIN posts_photos ON users.user_picture_id = posts_photos.photo_id WHERE users.user_id = %s", secure($user->_data['user_id'], 'int') )) or _error("SQL_ERROR_THROWEN");
if($get_picture->num_rows == 0) {
_error(403);
}
$picture = $get_picture->fetch_assoc();
$full_picture = $picture['source'];
/* prepare update query */
$_POST['id'] = $user->_data['user_id'];
$table_name = "users";
$table_picture_field = "user_picture";
$table_id_field = "user_id";
break;
case 'page':
// crop page profile picture
/* check the page & get full picture */
$get_page = $db->query(sprintf("SELECT posts_photos.source FROM pages INNER JOIN posts_photos ON pages.page_picture_id = posts_photos.photo_id WHERE pages.page_id = %s", secure($_POST['id'], 'int') )) or _error("SQL_ERROR_THROWEN");
if($get_page->num_rows == 0) {
_error(403);
}
$page = $get_page->fetch_assoc();
/* check if the user is the page admin */
if(!$user->check_page_adminship($user->_data['user_id'], $_POST['id'])) {
_error(403);
}
$full_picture = $page['source'];
/* prepare update query */
$table_name = "pages";
$table_picture_field = "page_picture";
$table_id_field = "page_id";
break;
case 'group':
// crop group profile picture
/* check the group & get full picture */
$get_group = $db->query(sprintf("SELECT posts_photos.source FROM `groups` INNER JOIN posts_photos ON `groups`.group_picture_id = posts_photos.photo_id WHERE `groups`.group_id = %s", secure($_POST['id'], 'int') )) or _error("SQL_ERROR_THROWEN");
if($get_group->num_rows == 0) {
_error(403);
}
$group = $get_group->fetch_assoc();
/* check if the user is the group admin */
if(!$user->check_group_adminship($user->_data['user_id'], $_POST['id'])) {
_error(403);
}
$full_picture = $group['source'];
/* prepare update query */
$table_name = "groups";
$table_picture_field = "group_picture";
$table_id_field = "group_id";
break;
default:
_error(400);
break;
}
// save profile picture
if($system['s3_enabled'] || $system['digitalocean_enabled'] || $system['ftp_enabled']) {
$image_url = $system['system_uploads'].'/'.$full_picture;
} else {
$image_url = ABSPATH.$system['uploads_directory'].'/'.$full_picture;
}
$image_name = save_picture_from_url($image_url, true);
// update profile picture
$db->query(sprintf("UPDATE %s SET %s = %s WHERE %s = %s", $table_name, $table_picture_field, secure($image_name), $table_id_field, secure($_POST['id'], 'int') )) or _error("SQL_ERROR_THROWEN");
// return & exit
return_json();
} catch (Exception $e) {
modal("ERROR", __("Error"), $e->getMessage());
}
?>
Sngine does this : Uploads a pic, and when you crop it then it uploads the cropped pic, so it registers as a brand new file Aws has nothing to do woth cropping, it serves as CDN for the pics, cropping is on your endso for now I suppose, that the amazon s3 don't support, cropping pictures,.. is that possible,.. tha, this is because of amazon s3?
I hope, anyone can help me out,..work the whole day on a solution
Proxybunker Tomz White Devil NullMasterSave guys, all right with you?
There is bug in script when using digital ocean storage, the problem occurs when uploading videos, the other types of files seem to work fine.
The problems that occur are as follows:
The video is uploaded to Space at Digital Ocean, but instead of it being stored in something like /uploads/videos/2021/10, it is stored in /uploads;
Also there is a problem with renaming the file, when checking/copying the direct link of the video that can be copied through the player, the name and path to the video look correct, something like https://namespace.sfo3.digitaloceanspaces.com/uploads /videos/2021/10/upload_695f8e0faa882be9996094b991d02827.mp4, but the file does not exist in this path, only in /uploads/originalname.mp4
NOTE: if we move the file to the correct location, and rename it with the name that is in the player's link, it works normal in the player.
Could someone good at PHP try to help find a solution for this?
I can even provide a Space on Digital Ocean for testing.
Hug brothers!
It was AWS, I solve this problem, I forgot to fill out the CORS Settings, in AWSSngine does this : Uploads a pic, and when you crop it then it uploads the cropped pic, so it registers as a brand new file Aws has nothing to do woth cropping, it serves as CDN for the pics, cropping is on your end
Sure, pm meCan anyone help me, to share with telegram or to signal,... I would make the buttons...or explain me how to do?
Hey, my friend,.. how are you,..are you able swell to put signal linkSure, pm me
Im pretty sure i can manage to do itHey, my friend,.. how are you,..are you able swell to put signal link