SMF Media Gallery (SMG) - 2.0.5 is out! (December 2)

Started by SMGTeam, September 09, 2008, 03:14:05 PM

Previous topic - Next topic

nodent

VERY nice mod.
Thank you for your hard work.

The mod is installed and appears to be working great.

One glitch.....

MY pictures are self deleting!!!!!!  >:(

I look at the moderator log and I get
QuoteBy :
Time : Today at 04:46:27 pm
On : Brooke & Tom
Action type : Deleted item
   By :
Time : Today at 04:33:03 pm
On : Tasha & Matt & Buddy
Action type : Deleted item
   By :
Time : October 13, 2008, 05:59:47 pm
On : Old School
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:58 pm
On : Brook & Tom
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:42 pm
On : Tasha, Matt and Buddy
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:21 pm
On : Shane
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:10 pm
On : Independance Day at Fox4
Action type : Deleted item
   By :
Time : October 03, 2008, 03:41:59 pm
On : Brendan
Action type : Deleted item

any ideas?

Krysia

Quote from: Dragooon on October 14, 2008, 08:27:28 AM
Try the solution here
Okay, that enabled me to upload it, but for some bizarre reason, it uploaded it twice or something ---- when it plays, no video appears, only sound, and the sound itself overlaps.

In addition, text no longer recognizes apostrophes (example's) -- it inserts a \ instead (example\'s).

ETA: Okay, it shows the video only if you definitely include the pixels of said video. However, the overlap still exists --- it loaded it twice.



Krysia




select_id

I think there is another bug. If i wrong, i'm sorry.
Please check it.
If you edit your picture and reupload it, and if you get "The database value you're trying to insert does not exist: width" error then you should patch these codes.

In MGallery.php, in MGal_edit_item function;

Find
// Initialize the class
$file = new mgal_media_handler;

Add after
$file->force_mime = $file->getMimeFromExt($_FILES['file']['name']);


find
// Process this thumb
$file = new mgal_media_handler;

add after
$file->force_mime = $file->getMimeFromExt($filename);


after few lines, find

$thumb = $file->createThumbnail($mgalSettings['data_dir_path'].'/tmp/tmp_thumb_'.$item_data['id_media'].'_extjpeg', $mgalSettings['max_thumb_width'], $mgalSettings['max_thumb_height']);


replace with

$thumb = $file->createThumbnail($mgalSettings['data_dir_path'].'/tmp/tmp_thumb_'.$item_data['id_thumb'].'_extjpeg', $mgalSettings['max_thumb_width'], $mgalSettings['max_thumb_height']);


and find
array('thumb' => $item_data['id_thumb'], 'size' => $thumb->getSize(), 'f-name' => 'thumb_'.$filename.'.jpg',
'width' => $thumb_width, 'height' => $thumb_height, 'directory' => $_dir2),
__FILE__,__LINE__);


replace with
array('thumb' => $item_data['id_thumb'], 'size' => $thumb->getFileSize(), 'f-name' => 'thumb_'.$filename.'.jpg',
'width' => $thumb_width, 'height' => $thumb_height, 'directory' => $_dir2),
__FILE__,__LINE__);



select_id

Quote from: nodent on October 14, 2008, 07:36:52 PM
VERY nice mod.
Thank you for your hard work.

The mod is installed and appears to be working great.

One glitch.....

MY pictures are self deleting!!!!!!  >:(

I look at the moderator log and I get
QuoteBy :
Time : Today at 04:46:27 pm
On : Brooke & Tom
Action type : Deleted item
   By :
Time : Today at 04:33:03 pm
On : Tasha & Matt & Buddy
Action type : Deleted item
   By :
Time : October 13, 2008, 05:59:47 pm
On : Old School
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:58 pm
On : Brook & Tom
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:42 pm
On : Tasha, Matt and Buddy
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:21 pm
On : Shane
Action type : Deleted item
   By :
Time : October 03, 2008, 03:42:10 pm
On : Independance Day at Fox4
Action type : Deleted item
   By :
Time : October 03, 2008, 03:41:59 pm
On : Brendan
Action type : Deleted item

any ideas?

You should look that

Quote from: select_id on October 13, 2008, 07:30:39 AM
If any user type this link its own browser, it can delete any item on gallery.
www.mywebsite.com/index.php?action=mgallery;sa=delete;type=item;id=xxx
xxx=item number.

to prevent this attack find this code in MGallery.php

// Delete it
deleteItems($item_data['id_media']);


add before


if($user_info['id'] == 0)
   fatal_lang_error('mgallery_delete_denied');
if ($item_data['id_member'] != $user_info['id'])
   fatal_lang_error('mgallery_delete_denied');


and find this

if($_GET['type'] == 'item') {
// Load the item
$request = $mgalFunc['db_query']("
SELECT m.id_media

add after
, m.id_member
But i haven't tested enough the code.

genieuk

I must say i really am tempted to convert from SMF gallery lite but i am concerned about the bandwidth with videos etc.

I am in a no win situation.

Mathew

nodent


crustybum

Like a previous post, i am also trying to install this mod on a default theme but get the following errors (i cant see the answer in package manager)

Installing this package will perform the following actions:  Type Action Description
1. Execute Code db_mgallery.php 
2. Execute Modification ./index.php Test successful
3. Execute Modification ./Sources/Subs.php Test successful
4. Execute Modification ./Sources/Load.php Test successful
5. Execute Modification ./Sources/ManagePermissions.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test failed
7. Execute Modification ./Sources/Who.php Test successful
8. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
9. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
10. Extract Tree ./Sources 
11. Extract Tree ./Themes 
12. Extract Tree ./mgal_data 

Chris

Kindred

and like the previous responses...   you have a mod which has changes the index.template.php beyond what this mod is looking for.   Any failure files will have to have the mod manually applied in those files.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Krysia

Quote from: Krysia on October 14, 2008, 11:07:05 PM
Quote from: Dragooon on October 14, 2008, 08:27:28 AM
Try the solution here
Okay, that enabled me to upload it, but for some bizarre reason, it uploaded it twice or something ---- when it plays, no video appears, only sound, and the sound itself overlaps.

In addition, text no longer recognizes apostrophes (example's) -- it inserts a \ instead (example\'s).

ETA: Okay, it shows the video only if you definitely include the pixels of said video. However, the overlap still exists --- it loaded it twice.

Quote from: Krysia on October 14, 2008, 11:26:06 PM
I took a screencap in the hopes it helps clarify...

Anyone have any ideas that could help me?
Thank you...



Nao 尚

Quote from: Krysia on October 16, 2008, 11:11:38 PM
Anyone have any ideas that could help me?
Thank you...
I could help you but I'm not sure what you want :P
Plus, I made so many changes to the templates and stuff like that -- maybe your problems are fixed in the upcoming v1.1. (Which has so many changes that I really think it should be called 1.5 or even 2.0 :P)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

select_id

Quote from: Krysia on October 16, 2008, 11:11:38 PM
Anyone have any ideas that could help me?
Thank you...
Try this.

find in MGallery.php
$title = $mgalFunc['htmlspecialchars']($_POST['title'], ENT_QUOTES);

replace with
$title = $mgalFunc['htmlspecialchars'](stripslashes($_POST['title']), ENT_QUOTES);


find
$desc = $mgalFunc['htmlspecialchars']($_POST['desc'], ENT_QUOTES);

replace with
$desc = $mgalFunc['htmlspecialchars'](stripslashes($_POST['desc']), ENT_QUOTES);


find
$kw = $mgalFunc['htmlspecialchars']($_POST['keywords'], ENT_QUOTES);

replace with
$kw = $mgalFunc['htmlspecialchars'](stripslashes($_POST['keywords']), ENT_QUOTES);


you can find those codes in two functions, replace both them.
after that patch, you should edit your item again.

crustybum

Quote from: Kindred on October 16, 2008, 07:01:00 PM
and like the previous responses...   you have a mod which has changes the index.template.php beyond what this mod is looking for.   Any failure files will have to have the mod manually applied in those files.

ok so i have tried to istall it via the package parser, but still get the same errors..

select_id

Quote from: Dragooon on October 14, 2008, 08:27:28 AM
Try the solution hxxp:smf-media.com/community/index.php?topic=101.0 [nonactive]
Hi dragooon,
i think i found another solution.
In Subs-MGallery.php, in getEncryptedFilename function, find this
$enc_name = $id . '_' . strtr($clean_name, '.', '_') . md5($clean_name).'_ext'.$ext;
add before
$clean_name = str_replace("'","",$clean_name);

What do you think about this code?
-----------------------------
This patch is not necessary. Please ignore it :)

NO CARRIER

Hi, I have a problem.
The install passed fine. I created some galleries. Now, when I'm try to access the admin panel of the gallery, I get an error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/aquar1um/public_html/forum/Sources/Subs.php on line 2522

Subs.php contains

   // Replace away!
   // !!! There must be a way to speed this up.
   $message = preg_replace($smileyfromcache, $smileytocache, $message);


and no error was logged into the forum error log.

How to debug the problem?

Thanks in advance.

Kindred

Quote from: crustybum on October 17, 2008, 06:25:50 AM
Quote from: Kindred on October 16, 2008, 07:01:00 PM
and like the previous responses...   you have a mod which has changes the index.template.php beyond what this mod is looking for.   Any failure files will have to have the mod manually applied in those files.

ok so i have tried to istall it via the package parser, but still get the same errors..

Any failure files will have to have the mod *MANUALLY* applied in those files.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

crustybum


NO CARRIER

Quote from: NO CARRIER on October 17, 2008, 08:24:19 AM
Hi, I have a problem.
The install passed fine. I created some galleries. Now, when I'm try to access the admin panel of the gallery, I get an error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/aquar1um/public_html/forum/Sources/Subs.php on line 2522

Subs.php contains

   // Replace away!
   // !!! There must be a way to speed this up.
   $message = preg_replace($smileyfromcache, $smileytocache, $message);


and no error was logged into the forum error log.

How to debug the problem?

Thanks in advance.

Hm. I was enabled permission for ungrouped members to manage the album. I removed it and now again can access the admin page.


P.S. Yes, if I enable again the permission, the gallery admin dissapears.

qubbah

how can i make a general tabs like  Home Admin Unseen Search Stats User albums   align to left?

Sudhakar Arjunan

I have tried using mgallery mconverter.php.

On the third step, it told me this error.

otice: Undefined index: sp-forum in /home/itacumen/public_html/discuss/Sources/Subs.php on line 3876

Warning: filesize() [function.filesize]: stat failed for /home/itacumen/public_html/discuss/gallery//thumb_1164_17_01_08_6_17_34.png in /home/itacumen/public_html/discuss/Sources/Subs-MGallery.php on line 1768
An Error Has Occurred!
The database value you're trying to insert does not exist: width
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Advertisement: