Attachments In Message

Started by slinouille, June 03, 2008, 04:02:21 AM

Previous topic - Next topic

engr_dood

Uninstall is fixed.  Thanks!  :D

I'll set up an RC3 test board now and let you know how it works out.

Massl

Thanks for this mod Spuds  ;)
All ok on SMF 2.0 RC 3.

engr_dood

Quote from: Max_74 on March 10, 2010, 04:31:40 PM
Thanks for this mod Spuds  ;)
All ok on SMF 2.0 RC 3.

Same here.  Working fine on 2.0 RC3.  I'm going to upgrade our forum tomorrow :)

engr_dood

Hi Spuds,

I've spotted a minor bug with this version.  It appears that guests can view attachments that are within quoted posts.  An example can be seen here.

What's odd is that I could swear the first time I saw that post, the graphics didn't appear at all - but I can't repeat this, even looking at it from another computer.

engr_dood

#144
Quote from: Spuds on March 11, 2010, 08:37:18 PMI do a question on the guest issue, could you modify that message and look (not WYSIWYG) and let me know if that quote has an [attach style tag or as I suspect an [Img style tag.

It is indeed an [img tag.  I should have checked that!  Sorry!  :-[

Thanks for the updated version :).

engr_dood

#145
Quote from: Spuds on March 12, 2010, 11:58:09 AMNow with that I just need to see how that sequence of events occurred ... that img tag was one that ILA rendered for an earlier post that someone else then quoted at which point the attach tag had been replaced with the img tag.

Yes, it seems that the respondent quoted the original poster and discovered the original graphic was not quoted.  But then the respondent somehow knew that the very same graphic was on the original poster's web site, and "fixed" the quote so it contained an [img tag referencing this graphic.  I only looked at the original post, which had an [attachment=] tag.  I didn't stop to think that the respondent would be so familiar with the original poster's web site!

Quote from: Spuds on March 12, 2010, 11:58:09 AMThis is the main reason why I did not render the attach tags in quotes and only show links in quotes as the original attach tag can get lost.

I think the "link in quote" approach is a good one.  I don't know about you, but I often find quoting of images to be quite annoying, especially if it's some large JPG photo.  In this particular case, the quoted graphic was small in dimensions and byte count, so it was not a problem at all.  But I see that as the exception rather than the rule.

Edit:  It looks like images placed with an "img" tag are visible to guests in RC3, so I guess this is a non-problem.

engr_dood

Thanks for the update!

Quote from: Spuds on March 14, 2010, 11:33:22 PM
Fixed an error with the way highslide links (if enabled) are built that was accidentally introduced in that last alpha version

Well, I'm going to show my newbie status here.  What's a highslide link?  I'd like to test this, but I'm not sure what it's about.

Quote from: Spuds on March 14, 2010, 11:33:22 PMMajor updates to the way quotes and especially nested quotes are handled.

I tried quoting a post that contained an [attachment=n] tag, which I also tried with [attach=n].  When previewing the reply containing this quote, the attachment tags [attachment=n] or [attach=n] are shown just like that, not as a link.  After posting, a link is shown.  Is this the intended behavior?  If so, that's okay, I'll just let the users know this is how it works.

engr_dood

#147
I'm just now noticing a bug I hadn't seen before.  I did a post containing one JPG file and one PNG file, using [attach=].  When I clicked on the JPG thumbnail, it got smaller!  Then I clicked on it a few more times and still wasn't able to get the picture to show full size.  Finally I did something, I'm not sure what it was - maybe a right-click - and the picture was then able to be seen at full size again.

With that post, if I refresh the page to show the thumbnail again, I notice the first time I click on the thumbnail it gets smaller than its normal thumbnail size for a moment, then enlarges to its full size.  But earlier when I tried this, it just got smaller and didn't show full size.  So I'm not sure what's going on here.  Edit:  I'm beginning to wonder now if it may have been just a case where the server was slow?

Edit:  I just found another bug.  I modified the post I was referring to above, and added another quote from the person to whom I was responding.  But I made an error, forgetting the "slash" inside the closing quote tag.  After previewing and fixing the problem, the attachments showed up as end-of-post attachments, and in the places where the [attach=] tags were located, what was shown was a link, as if they were within quotes - even after the quote tags had been fixed to have the correct matching.  I've uninstalled 1.05 beta and am using 1.04 beta for now.

engr_dood

#148
Quote from: Spuds on March 23, 2010, 08:28:55 PM
Likely a slow server or a large file attachment, once clicked it can take a little time for java script to load and expand it ... I've seen the getting slightly smaller effect before, lots of factors involved such as did SMF create a thumb, did the user specify a smaller width, is min thumbnail size set in the AP,  did we have to create the thumb, how does javascipt handle img widths, what is the img format, bla bla bla ..... Don't know if I'll figure out all the various combos that can cause this, I've seen and fixed several in the past but its low on the list.

No problem there.  It was just the situation that the graphic shrunk and stayed that way that threw me off.  I noticed that once it enlarges, subsequent mouse clicks cause it to shrink or enlarge much faster.  Could very well just be a slow server and impatience on my part.

Quote from: Spuds on March 23, 2010, 08:28:55 PMOn the other error, I've tried a bunch of ways to duplicate this and can't.  Could you give me a blow by blow of what you did exactly (including how you put in the quotes, ie insert quote or via the editor quote and cut/paste).

Okay, I've been able to repeat this on my test forum.  Here's the post I start out with:

[quote author=megajocke link=topic=46.msg649#msg649 date=1268091212]
Glad you liked it! ;D Then, I guess you could place the gate tracks just outside the power supplies and widen the output trace if you need low inductance. An alternative could be pasting a board with the gate drive tracks on top of the output fill :) [/quote]

Some text.  JPEG graphic below.
[attach=1]
Some more text.  PNG graphic below.
[attach=2]
Some text after the graphic.


This is just a normal well-formed post and both post and preview work fine.  The graphics show up exactly as they should in both post and preview.  Now after posting I modify the post, and with copy and paste, I copy the first quote above and paste it at the end of the post.  But I delete the "slash" from the closing quote.  This is shown below.  Notice the malformed "close quote" tag at the very end (scrolling all the way to the right at the bottom).

[quote author=megajocke link=topic=46.msg649#msg649 date=1268091212]
Glad you liked it! ;D Then, I guess you could place the gate tracks just outside the power supplies and widen the output trace if you need low inductance. An alternative could be pasting a board with the gate drive tracks on top of the output fill :) [/quote]

Some text.  JPEG graphic below.
[attach=1]
Some more text.  PNG graphic below.
[attach=2]
Some text after the graphic.

[quote author=megajocke link=topic=46.msg649#msg649 date=1268091212]
Glad you liked it! ;D Then, I guess you could place the gate tracks just outside the power supplies and widen the output trace if you need low inductance. An alternative could be pasting a board with the gate drive tracks on top of the output fill :) [quote]


This is where I get into trouble.  I've attached a screen shot of what the preview looks like here, in the file "malformed_quote.png".  You can see the graphics don't show up, but instead there are links.  As expected, the quotes are messed up because of the malformed tag.

So then I fix up the malformed "close quote" tag and preview again.  I've attached a capture of the preview in the file "malformed_quote_fixed.png".  You can see the quoting looks correct now, but the graphics are still shown as links.  The text of the post is below.  It's exactly the same as the one above, but with the "slash" added back in to the "close quote" tag at the very end of the post.

[quote author=megajocke link=topic=46.msg649#msg649 date=1268091212]
Glad you liked it! ;D Then, I guess you could place the gate tracks just outside the power supplies and widen the output trace if you need low inductance. An alternative could be pasting a board with the gate drive tracks on top of the output fill :) [/quote]

Some text.  JPEG graphic below.
[attach=1]
Some more text.  PNG graphic below.
[attach=2]
Some text after the graphic.

[quote author=megajocke link=topic=46.msg649#msg649 date=1268091212]
Glad you liked it! ;D Then, I guess you could place the gate tracks just outside the power supplies and widen the output trace if you need low inductance. An alternative could be pasting a board with the gate drive tracks on top of the output fill :) [/quote]


Now I post the result to see what it looks like.  The final post is captured in "final_post.jpg" below.  You can see there are links where the inline graphics should be, and the graphics are at the end of the post.

Hopefully you'll be able to reproduce this.

engr_dood

#149
Thanks!  That effort seems to have really paid off.  I have tried all kinds of crazy things in my test forum - mismatching quotes, pasting attach tags inside nested and/or mismatched nested quotes where they don't belong, and other nonsensical stuff.  So far I just can't make it misbehave.  It seems quite robust.

I'm going to install it in the main forum.  Thanks again  ;D.

Edit:  Note to other readers - Spuds has posted a new thread on this mod here.

Nickhead

it appears my highslide module is keeping this mod from installing correctly.  the text for this mod to change does not match what is in the manual edit box, so i dont know how to edit the code. 

*     5.     Execute Modification     ./Sources/Display.php     Test successful
      1.    Add Before    ./Sources/Display.php    Test successful
*    6.    Execute Modification    ./Themes/default/Display.template.php    Test failed
      1.    Replace    ./Themes/default/Display.template.php    Test failed
*    7.    Execute Modification    ./Themes/default/Post.template.php    Test failed
      1.    Replace    ./Themes/default/Post.template.php    Test failed
      2.    Replace    ./Themes/default/Post.template.php    Test failed
      3.    Replace    ./Themes/default/Post.template.php    Test failed

.Org, .Net, .Com

C4G-TK

Quote from: Nickhead on June 28, 2010, 03:58:43 PM
it appears my highslide module is keeping this mod from installing correctly.  the text for this mod to change does not match what is in the manual edit box, so i dont know how to edit the code. 

*     5.     Execute Modification     ./Sources/Display.php     Test successful
      1.    Add Before    ./Sources/Display.php    Test successful
*    6.    Execute Modification    ./Themes/default/Display.template.php    Test failed
      1.    Replace    ./Themes/default/Display.template.php    Test failed
*    7.    Execute Modification    ./Themes/default/Post.template.php    Test failed
      1.    Replace    ./Themes/default/Post.template.php    Test failed
      2.    Replace    ./Themes/default/Post.template.php    Test failed
      3.    Replace    ./Themes/default/Post.template.php    Test failed


Well, are you using the package that was attached a few posts above?  If so, go to the following site and parse the mod there for help on what edits need done.  Just follow the instructions on the page and upload the package for your edits.  Very simple to do. 

Hope that helps!


http://resourcez.biz/PackageParser/index.php

-img removed-

Nickhead

i attach the mod and get this via the parser:

Modifications to SMF files

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 82: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE7 0x75 0x27 0x3B in /home/gmtaws/public_html/resourcez/PackageParser/index.php on line 450

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: $txt['mod_aim_option1'] = 'Insérer comme aper�u'; in /home/gmtaws/public_html/resourcez/PackageParser/index.php on line 450

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/gmtaws/public_html/resourcez/PackageParser/index.php on line 450

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/gmtaws/public_html/resourcez/PackageParser/index.php:450 Stack trace: #0 /home/gmtaws/public_html/resourcez/PackageParser/index.php(450): SimpleXMLElement->__construct('<?xml version="...') #1 /home/gmtaws/public_html/resourcez/PackageParser/index.php(419): parseModificationXML('/tmp/install.xm...', Object(SimpleXMLElement), 'all') #2 /home/gmtaws/public_html/resourcez/PackageParser/index.php(94): parsePackageInfoXML('/tmp/package-in...', 'install', 'all') #3 /home/gmtaws/public_html/resourcez/PackageParser/index.php(780): parseArchive() #4 {main} thrown in /home/gmtaws/public_html/resourcez/PackageParser/index.php on line 450

.Org, .Net, .Com

C4G-TK

#153
Which version of SMF are you using?

Which mod package are you using?
(If you got it from the thread and not the mod site, tell me which reply#, please.


BTW, I was telling you the easy way to do it, but the other way would be to unzip the package that you are using and look for the install file and open it in something like Notepad +++ in order to read what edits need to be done.

-img removed-

Nickhead

#154
2.0 RC 3
1.3

on a previous install it worked, but this time its not.  when i try a manual edit, the code suggested to 'find', does not match that of what is in my file due to the highslide code being 'near' or in the 'middle' of the code i am supposed to replace.

this is an assumption on my part, but dont know the proper code with this 'extra' code in the way. 

hence why i uploaded the files that 'failed' upon pre-install test.

my apologies for rushing my earlier posts.

.Org, .Net, .Com

C4G-TK

THAT's the problem.

The version on the mod site is compatible with RC1 and not RC3.  Too many changes between RC1 and RC3.  You could probably get away with it if it was just between RC2 and RC3, but not between RC1 and RC3.

Use the package that is attached by Spuds in reply #176 if you are using RC3.  (It's about 8 or 9 posts before this.)  It installed cleanly on my RC3 forum and if you have any problems with a failed test, do what I said previously by going to the other website to parse that package.

If you have problems, let me know.  I will be in and out today before heading to the movies for a midnight showing of Twilight.  Otherwise, if I don't see anything today, I'll check back tomorrow to help you.

-img removed-

madman71

Running RC3

I was forced to install this manually because for some reason,  the  package installer does not see my theme to install it.

Anyway, it works, but the language is missing from the drop down dialog box.(see attachment)  Obviously i missed something.

What file do i need to edit? I dont need to know what to edit, just which file. I can figure it out from there.


chef4o

#157
OK, I'm on RC3, but have problem with the code...

I can't attach more that 1 image a time, when I click on "More attached files" it brings me in the beginning of the page...

So what should I do to make it work?


Spuds

Quote from: Blade_Runner on December 11, 2010, 11:18:03 AM
Why isn't the latest 1.4 version available on the download page?
If you are referring to the one that I updated, it was released as its own mod, its for SMF 2.0 only .... get it here:

http://custom.simplemachines.org/mods/index.php?mod=2481

Advertisement: