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

mattchewone

I have SMG gallery installed, i was wondering if there was a way for there to be an IMG code which you could use that users could copy and paste into the forum to display there image as well as other forums.

I understand there is a SMG code which will display in the smf forum only, you need to manual add where you would like the image to be and the size. Where is for example when you use photobucket and use the IMG code it adds a nice thumbnail to the left of the page.

Automatically the SMG code is centered, and when moved to the left any text you write seems to appear next to the image and not underneath.

Dragooon

Take the direct link and put it in IMG tags.

mattchewone

Quote from: Dragooon on January 27, 2009, 10:35:00 AM
Take the direct link and put it in IMG tags.

Thanks

Would i need to delete any part of the direct link or just add [IMG ][ /img] to the link.

Is there a way this could be intergrated into the gallery so the users wouldnt have to do this everytime they want to post up an image?

Dragooon

No, just add the img tags, no editing should be required. And make sure to use the direct link provided below HTML code not the link in your browser.

A simple template edit can do this I believe.

mattchewone

Quote from: Dragooon on January 27, 2009, 10:42:13 AM
No, just add the img tags, no editing should be required. And make sure to use the direct link provided below HTML code not the link in your browser.

A simple template edit can do this I believe.

How easy would this edit be? What would need to be done?
Sorry to be a pain, it would make it easier for the users if it automatically had the [IMG ] code so all they had to do is copy and paste.

SergeantAsh

#2045
I've just attempted an uninstall but I'm getting problems with my Subs.php file that I'm attempting to clean - I've checked it and it seems to be absolutely inline with the install1.1.xml package, but still says 'Test Failed', here's the segments that concern MGallery, can anyone spot anything glaringly wrong that I'm missing that would cause an uninstall to fail?

I've included a line above and below each SMG code insert so as to check position...

if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}

// SMF MGallery changes
global $sourcedir;
require_once($sourcedir . '/MGallery-Admin.php');
mgal_loadadminareas($context['admin_areas']);
// End SMF MGallery changes


// Make sure the administrator has a valid session...
validateSession();


And then this chunk lower down...

// Just in case it wasn't determined yet whether UTF-8 is enabled.
if (!isset($context['utf8']))
$context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';

if (stripos($message, '[smg') !== false)
{
if (!function_exists('smg_parse_bbc'))
{
global $sourcedir;
require_once($sourcedir . '/Subs-MGallery.php');
}
smg_parse_bbc($message);
}


// Sift out the bbc for a performance improvement.
if (empty($bbc_codes) || $message === false)


Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

Akyhne

Found a few errors in the gallery:

I a persons profile when clicking on one of the following texts in the gallery section of profiles:
Summary
View items
View comments


I get errors in the log like this:

http://xxx/index.php?action=profile;u=14;sa=mgallery 
8: Undefined index: member
Fil: /xxx/Sources/MGallery-Sub.php
Linie: 1471 

Akyhne

It's on line 1469-1471, 1568 and 1596 of the same file, depending on the link you click. Seems to affect both user with personal galleries created and people with no personal gallery.

ʟink

Quote from: SMF
Link     Today at 06:45:32 PM  Type of error: Undefined
http://whatninja.com/index.php?action=mgallery;sa=item;id=195

8: Undefined variable: scripturl

File: /home/*/domains/whatninja.com/public_html/Sources/PortaMx/Class/php.php(32) : eval()'d code
Apache has no errors, and I don't know how to access the PHP logs, if I even can. That PortaMX error is on all pages, but never bothers anything.
Obedire est vivere, Vivere est obedire


SergeantAsh

#2049
Quote from: @sh on January 27, 2009, 12:55:42 PM
I've just attempted an uninstall but I'm getting problems with my Subs.php file that I'm attempting to clean - I've checked it and it seems to be absolutely inline with the install1.1.xml package, but still says 'Test Failed', here's the segments that concern MGallery, can anyone spot anything glaringly wrong that I'm missing that would cause an uninstall to fail?

I've included a line above and below each SMG code insert so as to check position...

if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}

// SMF MGallery changes
global $sourcedir;
require_once($sourcedir . '/MGallery-Admin.php');
mgal_loadadminareas($context['admin_areas']);
// End SMF MGallery changes


// Make sure the administrator has a valid session...
validateSession();


And then this chunk lower down...

// Just in case it wasn't determined yet whether UTF-8 is enabled.
if (!isset($context['utf8']))
$context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';

if (stripos($message, '[smg') !== false)
{
if (!function_exists('smg_parse_bbc'))
{
global $sourcedir;
require_once($sourcedir . '/Subs-MGallery.php');
}
smg_parse_bbc($message);
}


// Sift out the bbc for a performance improvement.
if (empty($bbc_codes) || $message === false)




Sorted, this was due to me adding one single carriage return below the inserted blocks of code that prevented SMF from parsing it, surprised it looks at whitespace that accurately.

Regarding the Highslide error, using Firefox's Firebug, when viewing an image itself, it pops up the following Javascript error...

hs.getAnchors is not a function
http://www.**************.co.uk/Themes/default/Highslide/highslide.js
Line 28
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

Dragooon

@@ash - Do you have Highslide image viewer installed? If so does removing it improves anything?

@linkgamer - I seriously am out of ideas. Plus I can't open your site.

SergeantAsh

Quote from: Dragooon on January 28, 2009, 12:05:21 AM
@@ash - Do you have Highslide image viewer installed? If so does removing it improves anything?

Yes but I installed the Highslide SMF Viewer (Highslide_Viewer_1.0.zip) after my issues with SMG, the problem was still there beforehand.

I have noticed that the feature where a larger image will float out of the page on click DOES work, its just the transition of the small thumbnails to full size that isn't working? Does that help?

Would it help if I attached the flat/rendered HTML of one of the 'view image' pages?

Thanks for your help.
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

Dragooon

Uhm......from small thumbnails to full size? What area are you in?
And a link to page will help more.

SergeantAsh

Maybe I'm misunderstanding the feature but I thought that from within an album you can display the thumbnails contained within it - I interpreted the feature that upon clicking a thumbnail the image would blow up and appear full size, rather than having to go to the actual 'view image' page (with a page load/refresh).

Did I dream this feature? hehe
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

Dragooon


SergeantAsh

Quote from: Dragooon on January 28, 2009, 07:14:06 AM
Yes, you sure did.

Whooops, sorry mate. Not sure where I dreamed up that feature, I've had a long week!!!

Just finally, any ideas on this Javascript error I'm getting as it seems to be HS related? It only appears on the page that shows the fullsize image itself, see attached.
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."

Nao 尚

#2056
Quote from: @sh on January 28, 2009, 07:28:05 AM
Whooops, sorry mate. Not sure where I dreamed up that feature, I've had a long week!!!
I was thinking of doing it a few months ago, but then I had a dream that you would like it, so I gave up on it.
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


SergeantAsh

Quote from: magarto on January 28, 2009, 09:47:04 AM
Hi,
I have the same error than here: http://www.simplemachines.org/community/index.php?topic=260821.msg1867858#msg1867858 from lines 1477, 1478, 1479 and 1480

Any help?

Same as my error Margarto? I'm investigating now and playing around, if I discover anything, I'll let you know, likewise please :D
Quote"Moderation has been called a virtue to limit the ambition of great men, and to console undistinguished people for their want of fortune and their lack of merit."


 
Advertisement: