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

Sapo84

Nao, two days ago I sent you a pm about the video problem on my smf2 installation with gallery 1.5+, did you receive it?
If not, I can send it again.

Regards.

Michael24

Thanks for trying, but I got the same exact error message as before.  I really like DilberMC aesthetically speaking, but it's proven to be very problematic with just about every mod I've installed, and this one is no exception.

Quote from: vulcan59 on December 22, 2008, 02:29:41 PM
Hi Michael24,

Try the attached. And if you go over to the Theme Site and look under DilberMC you'll get a lot more info.

vulcan59

Hi Michael24,

Try posting your problem or looking for it. I found a whole lot of similar issues that you are having and numerous suggestions as to how to solve the problem. I'm sure one of the solutions will work for you.

Apologies I can't be of more help.

Regards.

afe

I made a new album and when I went to it, I got "  The website is unable to display the webpage
HTTP 501/HTTP 505 
   What you can try:
     Go back to the previous page.

     More information "

Nao 尚

Sapo> I received 3 other PMs at the same time, I simply missed yours (which was the first). That's 9 PMs in two days... lol...

afe> HTTP 50x = server error. Usually, this means your server is not "strong" enough to deal with something. Not enough memory, etc, or an infinite loop (but I'm confident we fixed all of these last month.)
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.

magarto

Ahhh, ok. Codec is mp4 the same codification as the iphone use.

vulcan59

Hi Nao,

Finally got to try mass upload and again, it doesn't work. I have a new installation of SMF1.1.7 with TP 1.0.5 beta 2. I downloaded and installed SMF Media Gallery without a hitch.

I then created an album and tried mass upload. The progress bar just hangs at about 20%. If I click upload again, it eventually reaches 100% or more but the files below only show the first file being uploaded. When I then go check the album, nothing is uploaded!! I had to do single uploads and that works without a hitch. The total file size that I tried to upload was something like 500kb with the max upload size set to 10MB. Yes I have crossdomain.xml in the root. There are no errors in the Forum error log.

The only problem I can think of is that I am using a free host (co.cc) and perhaps that could be the problem but I am not sure. I just wanted to try out and see what problems I would face before going live on the main site.  :(

Any ideas?




afe

Quote from: Nao 尚 on December 22, 2008, 06:30:16 PM
Sapo> I received 3 other PMs at the same time, I simply missed yours (which was the first). That's 9 PMs in two days... lol...

afe> HTTP 50x = server error. Usually, this means your server is not "strong" enough to deal with something. Not enough memory, etc, or an infinite loop (but I'm confident we fixed all of these last month.)

So there's nothing I can do to get my gallery working? :(

yrral

Hi Dragoon and Nao,

Firstly, thanks for the VERY nice mod... this is the one that i'm waiting for. I've installed it last night and seems to be working correctly aside from (I guess a quick solution) some buttons not showing up in the admin pages.

Can you guys tell me which file I need to look at? thanks!

Please see the attached screenshot:

Smoky "Rider" Blue

ok i give.. been trying to figure out what this is:

An error happened during the upload process, please try again or contact the administrator.

thats too funny.. i am a admin :P

anyways.. all the folders are chmodded to 777..

it wont make new folders useable..

ran the maintance, and been trying to think bout it, but im lost..

any help with this one??  O:)
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Nao 尚

@magarto> so, it means JW Player (or Flash itself) is not compatible with MP4s targetted to iPhones. Convert them to FLV. You won't lose much quality, if any...
@vulcan> what are the values for upload_max_filesize and max_post_size? And yeah, it's probably because of your host...
@yrral> right-click on the buttons that don't appear, and click Properties... You'll get the URL. Make sure the file is correctly uploaded there.
@SmokyBlue> same as for Mr. Spock... I guess you're trying to upload a file that's larger than your max PHP-allowed size. Fix this through php.ini settings (or php_value through htaccess, etc... Google for more details.)
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.

Blinker

#1491
Hey guys, great mod, loving it!

After I upgraded to 1.5.1 there was a glitch where even though auto-approve was OFF, uploads still appeared. I fixed that with Dragoon's fix a page or so back.

Unfortunately I noticed another security glitch today which concerns me:

When a user posts an image it sits in the gallery waiting for approval but if they post the HTML embed code for that image into a post the image shows up in their post. That kinda defeats the purpose of admin/mod approving images.

All the user did was paste the code like so - <img src="http://myforum.org/forum/MGalleryItem.php?id=15" alt="" /> and it appeared in their post.

That got me thinking so I tested something else by logging out of the forum and then pasting the direct link into the browser like so - http://myforum.org/forum/MGalleryItem.php?id=15 and sure enough the image loads straight into a blank webpage.

Maybe I'm missing something here but I thought SMF Gallery integrates into the forum to the extent that it follows the permissions of the forum. Maybe not.

I do not allow guest access, my board is very private, so I would really like to lock this baby down so that direct links to images would take you to the login screen and embed codes would not work until the image has been approved. It makes sense that that would be the case.

Any ideas guys?

P.S. I've thoroughly checked the gallery setting in adminCP and can't find any relevant settings. Am I missing something obvious here?

Dragooon

#1492
This is indeed a bug. Will be fixed in 1.5.2
To fix this open Subs-MGallery.php
find
global $mgalFunc, $mgalSettings, $settings;

// Get the item's filename
$galdir = $mgalSettings['data_dir_path'];
$result = $mgalFunc['db_query']('
SELECT f.id_file, f.filename, f.directory
FROM {db_prefix}mgallery_'.($type == 'icon' ? 'albums AS a' : 'media AS m').'
INNER JOIN {db_prefix}mgallery_files AS f ON (' . ($type == 'icon' ? 'a.icon' : ($type == 'preview' ? 'IF(m.id_preview = 0, m.id_file, m.id_preview)' : ($type == 'thumb' ? 'm.id_thumb' : 'm.id_file'))) . ' = f.id_file)
' . (!$security_override && $type != 'icon' ? 'LEFT JOIN {db_prefix}mgallery_albums AS a ON (a.id_album = f.id_album)' : '') . '
WHERE '.($type == 'icon' ? 'a.id_album' : 'm.id_media').' = {int:media_id}' . (!$security_override ? '
AND (f.id_file < 5 OR {query_see_album})' : '') . '
LIMIT 1', array('media_id' => $mid), __FILE__,__LINE__);

Replace it with
global $mgalFunc, $mgalSettings, $settings, $user_info;

// Get the item's filename
$galdir = $mgalSettings['data_dir_path'];
$result = $mgalFunc['db_query']('
SELECT f.id_file, f.filename, f.directory
FROM {db_prefix}mgallery_'.($type == 'icon' ? 'albums AS a' : 'media AS m').'
INNER JOIN {db_prefix}mgallery_files AS f ON (' . ($type == 'icon' ? 'a.icon' : ($type == 'preview' ? 'IF(m.id_preview = 0, m.id_file, m.id_preview)' : ($type == 'thumb' ? 'm.id_thumb' : 'm.id_file'))) . ' = f.id_file)
' . (!$security_override && $type != 'icon' ? 'LEFT JOIN {db_prefix}mgallery_albums AS a ON (a.id_album = f.id_album)' : '') . '
WHERE '.($type == 'icon' ? 'a.id_album' : 'm.id_media').' = {int:media_id}' . (!$security_override ? '
AND (f.id_file < 5 OR {query_see_album})' . (!mGalAllowedTo('moderate') ? ' AND (' . ($type == 'icon' ? 'a' : 'm') . '.approved = 1 OR ' . ($type == 'icon' ? 'a.album_of' : 'm.id_member') . ' = {int:user_id})' : '') : '') . '
LIMIT 1', array('media_id' => $mid, 'user_id' => $user_info['id']), __FILE__,__LINE__);

Untested but I am pretty sure it would work.

Dragooon

OK Updated the fix, this time it really works.

Blinker

Hi Dragoon thanks for the speedy reply.

I'm both glad and not glad I found a bug. :-X

I edited the Subs-MGallery.php file as per your post (both of them!) and tested both aspects of the loophole.

Unfortunately, still not working on both counts I'm afraid... :(

I submitted an image as a regular user (didn't approve it as admin) then posted html embed code into a thread and the image displayed.

I also logged out and pasted direct link into browser and the image displayed.

Sorry Dragoon...I think this bug needs attention BUT enjoy your xmas and bring on 1.5.2 when you and Nao get a chance....we can wait dude. :D Thanks for all your hard work to date, it's a great mod.

Smoky "Rider" Blue

@SmokyBlue> same as for Mr. Spock... I guess you're trying to upload a file that's larger than your max PHP-allowed size. Fix this through php.ini settings (or php_value through htaccess, etc... Google for more details.)

not too sure Nao..  :'(

its on a client site: http://www.dangerousmindz.com/forum 

if you head to that gallery and take a peep. its a image of a comic strip.. the one gallery album that was created 3 times last night by me, never accepted it and gave me that error

"An error happened during the upload process, please try again or contact the administrator"

attaching image here.. i dont know, no coffee yet..  :P
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

Burke ♞ Knight

For security purposes, I really would not allow HTML in posts.
Can they also post the unapproved images using the BBC way?

Blinker

Quote from: BurkeKnight on December 23, 2008, 10:06:13 AM
For security purposes, I really would not allow HTML in posts.
Can they also post the unapproved images using the BBC way?

Hey BK

Yes, BBC embed code works too. :(

The image shows as a thumbnail in the post and expands when you click on it.

My bad, I should have mentioned BBC as well.

BTW out of interest why is HTML in posts more of a security risk and also how could I disable it in posts? Particularly in light of some users thinking that it was a better way to embed their pics if they didn't understand that BBC was actually safer and more convenient?

Burke ♞ Knight

I'm not 100% sure why, just that I have heard that so many times, and the fact that a lot of forum scripts even recommend not enabling it, shows me that there is something to it.

I've just been too danged lazy to find out why. :P

Go to Admin > Posts and Topics > Bulletin Board Code > Uncheck Enable basic HTML in posts to disable.

Blinker

Quote from: BurkeKnight on December 23, 2008, 10:19:32 AM
I'm not 100% sure why, just that I have heard that so many times, and the fact that a lot of forum scripts even recommend not enabling it, shows me that there is something to it.

I've just been too danged lazy to find out why. :P

Go to Admin > Posts and Topics > Bulletin Board Code > Uncheck Enable basic HTML in posts to disable.

OK cool, thanks for the heads up. I can dig the whole lazy thing but I'll have to go read up on that now. Gotta learn y'know?

I've compared the edits Dragooon made to the original and it LOOKS like it should work but I guess the rabbit hole goes much deeper.

Back to the drawing board as they say.


Advertisement: