News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

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

SMGTeam

I'll try to post the changelogs with the SMGTeam account from now on... If only to try and get past the post limit that makes SMF remove the links to the websites... Lol...
-- Nao

Version 2.0 beta 5                             September 12, 2009
-----------------------------------------------------------------

Regular, cool additions/fixes:

+ Added new album icon type (bigicon), which will be preview-sized and shown on album pages only (as opposed to regular thumbnail-sized icons)
+ Added ability to upload to any album (provided you're allowed to upload to them of course) within the single-upload form.
  Currently this is only used in the Foxy! add-on's SMG button feature (for uploading items within a message without going
  through the gallery), but I will add a generic upload button to the header bar later.
+ If a custom field is searchable, split it into multiple words because then commas are probably there as delimiters
+ Added a new "Check orphans" task, which will find all files that aren't used by the database at all. If the task gives you an error 500,
  that's too bad, you have too many files for your server CPU/memory to handle and the task will fail. It's not that big a deal though.
+ Added test for Safe Mode and mod_security in SMG's About page in the admin area. This should make it easier to tell people to disable them if they can.
+ Added ability NOT to log accessDenied/album not found/item not found errors
! Documents received an audio icon as their thumbnail instead of their equivalent document thumbnail
! Fixed a couple of cases where a deleted member would generate an error in the gallery if they had posted items in it, or were a moderator
! When using the smg tag for an item in a hidden album, and specifying the av, box or album type, it returned an error.
  Also make sure that any hidden album's item can only be embedded when the message's author is the album owner.
! When embedding an external video and leaving the title empty, use the title returned by Aeva.
  The previous behavior was only suitable for local embedded videos.

Small change, aka Pocket money:

! Removed all default values for TEXT fields in the database, to make it strictly compatible
* Converted all rand() calls to mt_rand(), which are more reliable
! Account for the cache system when resetting a member field for everyone
+ Added a new separator in admin area because it started getting confusing...
+ Added a new step to the admin area's "Check for Errors" section, where big icons
  are automatically attributed when available. You should run it at least once.
+ Added data_dir_url variable, so that you can specify the gallery folder's URL by yourself
(for clean filenames). SMG will still attempt to guess it by itself.
! Make sure to show clean filenames for album icons in user profiles, if enabled.
* Slightly modified Album page header layout
+ Added an Edit button next to the child album list on Album pages, and user albums on user profiles
! Fixed an undefined index when retrieving pages through cURL
* Simplified coexistence between SMG and its Foxy! add-on with a global variable
+ Modified albumsAllowedTo() to enable it to return a list of quotas for allowed albums. Enjoy the complexity of the new query, eheh.
+ Automatically update (via Javascript) quota numbers on album-free uploads when choosing a different album
! Replaced eregi with preg_match for PHP 6 compatibility, although the getid3 library still needs to be updated for full compatibility
* Moved thumbnail clear filename generation function to its own (hidden and resumable) task in the maintenance area
! Emptying a custom field wasn't allowed. Dragooon, if you read this -- was there any reason for doing this?
! "Recent albums" list didn't allow general albums
+ Added links to items where errors were found (find errors maintenance task)
! Fixed a lot of small issues in the Regenerate task
! A couple of issues with the getAlbums() function... I'm afraid I have to "hide" a child album if it's
  accessible to you but its parent album isn't. Maybe I'll find a better solution later.
! If clear_thumbnames was enabled, any time you would delete an item manually, its thumbnail wasn't deleted
+ Added page index at the bottom of the user album list.
+ Enlarged settings table data size to 16M instead of 65K, which should allow us to store something like
  500.000+ files in the orphans entry... Honestly, SMG is bound to crash much, much earlier than that...
! Use the default thumbnail instead of the first one when embedding YouTube videos
! Don't link to a profile if it's from a guest...
! Regular users editing their items would be refused access due to album profile info not being loaded when
  checking for permissions. I don't know if this bug was in beta 4 so I'm putting it into the changelog anyway.
! Fixed various typos and small bugs here and there, as always.

Minare


probinson77

Thanks for the updated version.

Unfortunately, there still seems to be some conflict with the SMG tags and the WYSIWYG Quick Reply mod.  As soon as I install the WYSIWYG Quick Reply mod,my SMG tags stop working, and as soon as I remove the mod, the tags work again.

I don't have enough knowledge to figure out what the interaction is that is causing this to happen.  Does anyone smarter than me have any idea what might cause this?

Nao 尚

Quote from: probinson77 on September 12, 2009, 10:47:07 AM
Thanks for the updated version.

Unfortunately, there still seems to be some conflict with the SMG tags and the WYSIWYG Quick Reply mod.  As soon as I install the WYSIWYG Quick Reply mod,my SMG tags stop working, and as soon as I remove the mod, the tags work again.
This was already reported, but I couldn't find any suspicious code inside that mod so I gave up on this inquiry.
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.

thatguy

With all due respect, we have a new version but the upload feature still doesn't work. I have hope though that it will soon.

Thank you.
The statements above have not been evaluated by the Food and Drug Administration.
These statements are not intended to diagnose, treat, cure or prevent any disease.

chrishicks

I scanned through this thread but didn't see it mentioned but can you do upgrades on this by just overwriting certain files the way you can in AEVA or no? I am running 2.0b4 on a test board and it fails on most of the files on uninstall even though I haven't made any changes to those files since the install. I don't mind doing the manual edits but if I can just overwrite a few files that would be the preferred method.

Akyhne

Using the "Check for orphan files" - pauses after 26 items in my gallery with 26 items, then take me to the frontpage of the Admin Center??!?!

Nao 尚

@thatguy> Your message isn't going to help, you know... I don't know where your site is, what doesn't work exactly, and what your server setup is...

@chrishicks> It's more complicated. SMG is a very bloated application. Many files are changed in the hierarchy every time. Many times, the installer changes things as well. For instance, beta 5 definitely requires you to uninstall & reinstall, because it makes changes to the database and to SMF files. You can still analyze the xml install files by yourself and do the changes manually if the automatic install says there's an issue...

@akyhne> Frontpage? Didn't happen to me... What was the URL showing up when you were on the frontpage?

@everyone (actually, the 26 people who downloaded beta 5 so far) > I've made a silent update to beta 5. Please install it. You don't have to go through the package manager, just redownload, and update the Sources/Subs-MGallery.php file with the new version. This will fix a minor bug with the smg tag.
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.

probinson77

I hate to be a pain about this WYSIWYG Quick Reply thing, but I have some users upset that I had to remove it since it breaks the SMG tags.

So...

I installed the WYSIWYG Quick Reply package, and then began commenting one line out at a time to see if I could figure out which line broke the SMG tag. 

The WYSIWYG Quick Reply mod makes the following additions to Sources/Display.php.  I've highlighted the line that breaks the SMG tags;


 
// Start of WYSIWYG Quick Reply
// Load the editor file
require_once($sourcedir.'/Subs-Editor.php');
// Prevent Errors
$context['submit_label'] = isset($_REQUEST['msg']) ? $txt['save'] : $txt['post'];
$context['attached'] = '';
$context['allowed_extensions'] = '';
$context['make_poll'] = 0;
 
// Now create the editor.
$editorOptions = array(
 
'id' => 'message',
 
'value' => !empty($context['message']) ? $context['message'] : '',
 
'labels' => array(
 
'post_button' => $context['submit_label'],
 ),
 
// We do XML preview here.
 
'preview_type' => 1,
);
 
 
/**** THIS IS THE LINE THAT BREAKS THE SMG TAG ****/
 
create_control_richedit($editorOptions);
 
/**************************************************/
// Store the ID.
$context['post_box_name'] = $editorOptions['id'];

// Set if unset (and avoid php undefined variable errors - default is FULL WYSIWYG with bbc buttons and smilies (unless set via profile OR admin)
$options['wysiwyg_quick_reply'] = isset($options['wysiwyg_quick_reply']) ? (int) $options['wysiwyg_quick_reply'] : 0 ;

// To avoid intefering with the wysiwyg for post - we temporarily override the setting, THEN, restore it after we've written the wysiwyg
$context['controls']['richedit']['message']['rich_active_original'] = !empty($context['controls']['richedit']['message']['rich_active']) ? 1 : 0 ;
// Active
$context['controls']['richedit']['message']['rich_active'] = in_array($options['wysiwyg_quick_reply'], array(0, 1, 2, 3)) ? 1 : 0 ;
// End of WYSIWYG Quick Reply


If I comment out the create_control_richedit($editorOptions); line, then the SMG tags work as expected.  Of course, the WYSIWYG Quick Reply doesn't work properly without that line...

So... any idea why that line would break the SMG tag?

Thanks.  Sorry for being a pain.   :D

Akyhne

Quote from: Nao 尚 on September 12, 2009, 04:06:01 PM
@akyhne> Frontpage? Didn't happen to me... What was the URL showing up when you were on the frontpage?
index.php?action=admin

Shades.

I just upgraded to the latest beta version and am getting that little error message at the bottom left of my browser when viewing an image...didn't have this error before upgrading and I even tried to reinstall the previous beta 4 version and the error is still there, but it wasn't before!

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; Alexa Toolbar; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Sun, 13 Sep 2009 00:03:31 UTC


Message: Invalid argument.
Line: 1
Char: 1
Code: 0
URI: http://www.therallyboard.com/index.php?action=mgallery;sa=item;id=189


Message: Object doesn't support this property or method
Line: 1
Char: 1
Code: 0
URI: http://www.therallyboard.com/index.php?action=mgallery;sa=item;id=189

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Nao 尚

Quote from: BoZilla on September 12, 2009, 08:09:42 PM
I just upgraded to the latest beta version and am getting that little error message at the bottom left of my browser when viewing an image...didn't have this error before upgrading and I even tried to reinstall the previous beta 4 version and the error is still there, but it wasn't before!
Where do these errors show up? SMF error log? Javascript error log? Something else...? What is that "Code" for in the error log? It doesn't show up anywhere...

The only change that doesn't disappear when reinstalling beta 4 is the size of the smf_mgallery_settings table's value field which went from 65KB to 16MB. Shouldn't have any effect...
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

I'm getting this error when I try to edit a file (in this case all I'm trying to change is the title of the pic):

Your session timed out while posting. Please go back and try again.

From memory this happened in 2b4 as well but I think I forgot about it and it's happened again today.


Nao 尚

Did you take half an hour before submitting the change? Did you open multiple tabs?

This is an issue that happens from time to time... I don't know exactly how SMF handles sessions. What I know is, it's either buggy or too strict. Even on simplemachines.org I regularly get this error message when I take a couple of minutes to answer a post. Over at noisen.com I have a couple of users who have this problem as well, but I don't. So... Mystery.

The only thing I can say is, reload the original page and re-submit.
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

#4354
Hi Nao, thanks for your reply.

It doesn't seem to matter what I do. I can log in, fresh session, go straight to the gallery and open any random pic I like, click on edit, try to change the title, click submit and.....bang, same error.

It means I can't edit ANYTHING at all. No changes whatsoever can be made to any alum or item at all it would seem. I just tested some random changes like titles, thumbnails etc and I get the error every time.

I also noticed that the bbcode buttons and smileys don't work in the editor either. It will accept characters directly typed from the keyboard but nothing with js at all. Very strange.

I'm gonna go through all the files SMG edits and check for dupe code and the like. I'll get back to you mate.

Edit: OK, I've been through every file with a fine tooth comb and I found a lot of duplicate and sometimes triplicate code. It would appear the last 2 or 3 uninstalls have not worked properly. I always do them through the package manager and tidy up any files that show errors manually. I'm meticulous about that.

I have now cleaned up all the code in all the files and tried again. STILL GETTING ERRORS! The editor still won't work with any BBC buttons or smileys, only typed text. I have not really tried anything else function-wise in SMG for this testing so other stuff may be broken too. Btw this editor issue happens when I try to create a new album, upload a new item or edit and item.

I'm stumped Nao. As you know I run a private site so I can't give you a login. I'm happy to persist myself and would of course love any input you or others may have. Thanks.

Blinker

Well, I managed to fix the javascript stuff in the editor. Turns out it was site-wide...I hadn't tried to post today so I didn't know it was happening.

The cause was my tiredness. I'd had to rebuild my entire custom theme's index.template from a 2 month old backup (it's a long story) and I'd replaced a line of code instead of adding a line after it. Phew! Glad I found it and fixed it.

The session timeout error is still there though, and like I said, I'm 99.9% sure it was there when I had 2b4 installed so it's nothing to do with today's debacle.

LHW

Nao: I've not run into it before, but now that I've upgraded to v2b5, I can't individually upload files to a gallery, or edit them.  I get the same "An Error Has Occurred!  Your session timed out while posting. Please go back and try again." as mentioned above.

I can post / edit regular posts, but can't do a thing within a gallery.

Oh...I can FTP files into galleries via the Admin functions, but once in, I can't edit them.

I've logged out, let it sit for over an hour, cleared all temp / cache files...nothing seems to work.  Any ideas?


Shades.

Quote from: Nao 尚 on September 13, 2009, 02:49:36 AM
Quote from: BoZilla on September 12, 2009, 08:09:42 PM
I just upgraded to the latest beta version and am getting that little error message at the bottom left of my browser when viewing an image...didn't have this error before upgrading and I even tried to reinstall the previous beta 4 version and the error is still there, but it wasn't before!
Where do these errors show up? SMF error log? Javascript error log? Something else...? What is that "Code" for in the error log? It doesn't show up anywhere...

The only change that doesn't disappear when reinstalling beta 4 is the size of the smf_mgallery_settings table's value field which went from 65KB to 16MB. Shouldn't have any effect...

It shows up when viewing an images that was uploaded to the gallery in IE8 at the bottom left corner of the browser. See attachment!
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Nao 尚

@Bozilla, I don't have this error on my site using IE8... You really should give me access to your gallery item so that I could check it out with IE8. There's an integrated debugger in that software, so I could easily find out where the problem is.
But since it's not happening on noisen.com, I'm guessing the bug is due to another script that is not related to SMG...

@Lord> Did you make sure you have the latest SMG b5? I made a silent update yesterday, about 6 hours after I released the first version. It fixed an error when trying to edit a file. But it shouldn't be related to any session errors. If it were up to me, I'd remove the session checks, because really, security in SMF is already top notch without even having to rely on session identification. Still, I guess I have to account for cookie stealers...

@Blinker & Lord> Also, can you try to uninstall b5, reinstall b4 (it's still on the mod page) and see if the error goes away? If yes, I'll try to fix it...

PS: ironically, I got the dreaded "session timed out" error when posting this message here. Lol.
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.

Shades.

Quote from: Nao 尚 on September 13, 2009, 03:44:28 PM
@Bozilla, I don't have this error on my site using IE8... You really should give me access to your gallery item so that I could check it out with IE8. There's an integrated debugger in that software, so I could easily find out where the problem is.
But since it's not happening on noisen.com, I'm guessing the bug is due to another script that is not related to SMG...

The link to the item was in the code I posted...sorry I shoulda posted it seperately. Here it is: http://www.therallyboard.com/index.php?action=mgallery;sa=item;id=189. But it don't matter which image you go to, they all have the same error.

I'll PM you the username and password!
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: