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

Akyhne

FireFreezer: Why do you use entities in a utf-8 file? You really don't have to use entities at all.

Nao 尚

It would seem that this originally came from a developer's lack of thorough knowledge about encoding several years ago (which can be understandable -- even PHP 5 isn't too good at handling UTF8), and no one cared to question the established routine after that.

So, until a few months ago, this was SMF's recommended way of doing this, even for non-UTF8 files, as long as anything wasn't in the basic 128 first characters of the ASCII code. I think it helped that I practically forced my French update (including accented characters) onto them eheh.

I would however recommend being careful with some characters. For instance, my website uses ISO-8859-15 which has support for the € character. But the default French language files are in ISO-8859-1. In a case such as this one, € should be encoded as € to make sure everything works. (This is from memory, so I can't assure you it's completely true.)
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.

Akyhne

Well, all language packs (western at least) are using the same method. So it should work.

I made several translation packages for several mods as you know, and complete SMF 1.1.4-> as well as 2.0 without the use of entities, except where SMF (Compuart) specifies we should do it. No errors at all.

FireFreezer

Quote from: akyhne on March 01, 2009, 10:32:58 AMFireFreezer: Why do you use entities in a utf-8 file? You really don't have to use entities at all.

well... i had problems in past without using entities and seen that others using them too... since then i'm using them to be SURE to get the right result.

Nao 尚

Quote from: akyhne on March 01, 2009, 11:33:38 AM
I made several translation packages for several mods as you know, and complete SMF 1.1.4-> as well as 2.0 without the use of entities, except where SMF (Compuart) specifies we should do it. No errors at all.
Actually, and IIRC, accented characters can be used even in these places ;)
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.

Stef001

Hello,

Thanks for this great gallery.
I have one question.
I have two forums and chaired the members tables.
I have at forum1 the gallery.
Is it possible to have the same gallery at forum two.
So that when i post any picture in forum2, that its also posted in forum1.
And the same when i post any picture in forum1 that its also posted in forum2.

Thanks.

Stef.
SMF 2.0.2 | SimplePortal 2.3.5

Nao 尚

How do you share the members table in the first place?
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.

mark7144

Nao, did you see the request list I posted a few days ago or did you choose to ignore it?

Stef001

Quote from: Nao 尚 on March 01, 2009, 04:28:50 PM
How do you share the members table in the first place?

I have changed in forum2 in Sources the {db_prefix}members in smf_members

I did that for more tables.

Stef.
SMF 2.0.2 | SimplePortal 2.3.5

Nao 尚

Lol mark, I'm not sure I like that tone of yours..... Especially when I *did* reply O:)

@Normally> and it actually works?! 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.

Stef001

#2730
Quote from: Nao 尚 on March 01, 2009, 04:59:19 PM
@Normally> and it actually works?! lol²...

Yes it works, the users can switch between the forums, no problem.
Is it possible to doe the same for the gallery?

Stef.

Update:
I have chaired the database tables the same way.
Installed the gallery on the second forum.
changed in admin the Data directory path to the first forum and it work like a charmed.

Perfect.
SMF 2.0.2 | SimplePortal 2.3.5

mark7144

Quote from: Nao 尚 on March 01, 2009, 04:59:19 PM
Lol mark, I'm not sure I like that tone of yours..... Especially when I *did* reply O:)
No tone intended, just an innocent question. I still can't see where you acknowledged the list I posted, sorry if I'm going blind.

Harvester

ok LOVE this mod BUT I just checked my forum error log and i have 11,000+ PAGES of errors and 99.99% of those pages are from this mod.

The errors all look like this:

Quote
8: Undefined index: mgal_total_comments
File: /home1/thebassh/public_html/bassin-forums/Sources/Load.php
Line: 1114

and this:

Quote
8: Undefined index: mgal_total_items
File: /home1/thebassh/public_html/bassin-forums/Sources/Load.php
Line: 1113


Please help right away.

thank you

Dragooon

You seem to missing an edit in Load.php. Modify it to make sure it has all the edits.

Nao 尚

Quote from: mark7144 on March 01, 2009, 06:28:33 PM
Quote from: Nao 尚 on March 01, 2009, 04:59:19 PM
Lol mark, I'm not sure I like that tone of yours..... Especially when I *did* reply O:)
No tone intended, just an innocent question. I still can't see where you acknowledged the list I posted, sorry if I'm going blind.

Found it.

No time to deal with SMG now.

And let's be clear: how can you expect me to read a list that you *edited in* one hour after you posted a short message? It's not like some warning message is going to appear to me saying, "Hey Nao! You should read back that message from last page! Mark added some stuff in it, and he wants you to read 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.

Harvester

Quote from: Dragooon on March 02, 2009, 03:50:14 AM
You seem to missing an edit in Load.php. Modify it to make sure it has all the edits.

Originally I used the parser on the mods page on the mod site to edit the file so I was pretty sure that all the edits were in the file Load.php that should be in it. However, I know I have made stupid mistakes in the past so I double checked the file to see if it had all the edits in should. It does. Every edit that should be in it is.

The only difference I saw was the spacing of code in the area that mem.lastLogin, mem.karmaGood, mem.mgal_total_items, mem.mgal_total_comments,   gets placed. There is a whole paragraph of mem. items. does spacing matter there?


also it looks like my code is doubled in one area...

if ($set == 'normal')
{
$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType, mem.referrals_no, mem.referrals_hits, mem.referred_by, mem.referred_on,
mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl,
mem.birthdate, mem.memberIP, mem.memberIP2, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,
mem.karmaGood, mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
mem.buddy_list, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated, mem.money,
IF(mem.ID_GROUP = 0 OR mg.stars = '', pg.stars, mg.stars) AS stars" . (!empty($modSettings['titlesEnable']) ? ',
mem.usertitle' : '');
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)";
}
elseif ($set == 'profile')
{
$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType, mem.referrals_no, mem.referrals_hits, mem.referred_on, mem.referred_by,
mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl,
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, mem.mgal_total_items, mem.mgal_total_comments,
mem.karmaBad, mem.memberIP, mem.memberIP2, mem.lngfile, mem.ID_GROUP, mem.ID_THEME, mem.buddy_list, mem.pm_ignore_list,
mem.pm_email_notify, mem.timeOffset" . (!empty($modSettings['titlesEnable']) ? ', mem.usertitle' : '') . ",
mem.timeFormat, mem.secretQuestion, mem.is_activated, mem.additionalGroups, mem.smileySet, mem.showOnline,
mem.totalTimeLoggedIn, mem.ID_POST_GROUP, mem.notifyAnnouncements, mem.notifyOnce, mem.notifySendBody,
mem.notifyTypes, lo.url, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,
IF(mem.ID_GROUP = 0 OR mg.stars = '', pg.stars, mg.stars) AS stars, mem.money, mem.passwordSalt";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)";
}



should my code have two of the

Harvester

#2736
didnt finish my reply above because the site just wouldnt cooperate and let me preview or post for a long time... kepttiming out..

anyway....


should there be two identical paragraphs as shown above in my code? or did I somehow get dupe code in there?


I think I found my error... I didnt replace a.filename, a.attachmentType,
with a.filename, a.attachmentType, mem.mgal_total_items, mem.mgal_total_comments, in the load.php file.

Harvester

also, when I link to images from the gallery using either the BBC Embed Code or using the Direct Link inside IMG tags I get some members who cant view the images. They just get red X's

Also, I posted a wmv file to the gallery and then used the BBC Embed Code to place that video into a post. Some could see it, but some had to allow active X and it also seems that firefox users were crashing when they tried to view it.   Any thoughts?

mark7144

#2738
Quote from: Nao 尚 on March 02, 2009, 04:20:49 AM
And let's be clear: how can you expect me to read a list that you *edited in* one hour after you posted a short message?
Sorry if that is the case but from what I remember, the original contents of that post was my big list, the edit made an hour after was simply a spelling mistake. I don't recall posting anything other than a list, what was the "short message" you are referring to? Maybe that will jog my memory if your recollection is correct.

We are both talking about this post, right?

Nao 尚

Yes we're talking about that post. And no I never saw it in the first place.
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.

Advertisement: