Attachments In Message

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

Previous topic - Next topic

russ skinner

Would just like to add a big thanks Spuds for running with this one and getting it back into operation - great job!

Why this feature is not part of the core I'll never know - it's without doubt the most utilized mod on the forum I look after.

Russ

recived

mod not work 2.0rc2. who knows how to install this version of the forum? Please update mod to 2.0rc2.

Northtech


engr_dood

Quote from: Spuds on March 03, 2010, 11:36:15 PM
Here we go with what I'm going to call Beta 1.0 ... Beta meaning I'm done adding any new functions to this version and will just focus on bugs with what we currently have.

This is looking really good here.  The pseudo-preview looks great.  I have an online beta version of my update that I will ask my users to test now.  The only thing I have a question about is whether the "#" sign is synonymous with "number" in all cultures.  IOW, will people from the EU and elsewhere see "Attachment #1" as "Attachment number 1".  This is very, very minor, and I just love how well this is working out.

Thanks once again Spuds for your efforts  ;D.

engr_dood

Quote from: recived on March 04, 2010, 03:50:35 AM
mod not work 2.0rc2. who knows how to install this version of the forum? Please update mod to 2.0rc2.

recived, please download the version by Spuds, which can be found in this post in this very thread.  Please do not use the version on the mods page.  The Spuds version is working fine for me in 2.0 RC2, and I've done considerable testing.  In fact, Spuds has implemented many improvements over the version on the mods page.  It is the attachment ILA-1.0Beta.zip of the post I linked above.

engr_dood

I've found a minor glitch with this version (ila-1.0Beta).  If I log on with my admin account and click on "View the most recent posts on the forum" at the lower left, I can view attachments of the most recent posts in that mode just fine.  But when I log in with a normal account and choose to view the most recent posts, I see the message, "[ You are not authorized to view attachments ]" where the graphic should be.  This normal account has no primary membergroup, but when I log in as admin and look at "additional membergroups" for that user, I see "Invited Participant", which does have permission to view attachments.

So it appears to be permissions-related, but this only shows up when choosing "View the most recent posts on the forum".  When reading posts in the normal way, I can see attached graphics just fine with the non-admin account.

111111

Spuds, report you a small bugfix:

// ILA in line attachment changes
if (empty($parse_tags) && empty($context['uninstalling']))
{
global $sourcedir;

if (stripos($message, '[attach') !== false)
{
if (!function_exists('ila_save_bbc'))
require_once($sourcedir . '/ILA-Subs.php');
ila_hide_bbc($message);
}
}
// End ILA in line attachment changes


function_exists('ila_save_bbc') - as i understood, such fuction this mod don't use. replace it by ila_hide_bbc

Spuds

Quote from: 111111 on March 05, 2010, 11:30:53 PM
Spuds, report you a small bugfix:

function_exists('ila_save_bbc') - as i understood, such function this mod don't use. replace it by ila_hide_bbc

111111 ... thanks for seeing that ... it does not affect functionality but it is causing an unnecessary file validation each pass.  I'll get that fixed in the next update.

Quote from: engr_dood on March 05, 2010, 05:43:09 PM
So it appears to be permissions-related, but this only shows up when choosing "View the most recent posts on the forum".  When reading posts in the normal way, I can see attached graphics just fine with the non-admin account.

Hummm ... Thats probably an RC2 problem (famous last words) but I'll trace that access and see if I've missed a permission flag somewhere.  Thanks for the detailed report.


engr_dood

Quote from: engr_dood on March 05, 2010, 05:43:09 PMSo it appears to be permissions-related, but this only shows up when choosing "View the most recent posts on the forum".  When reading posts in the normal way, I can see attached graphics just fine with the non-admin account.

Oops.  This is a bit misleading.  It also happens when viewing the member list, then choosing to view all posts of a given user (using a non-admin account).

Spuds

#129
Here is the latest beta .... I've made the following changes in this update:


  • Fixed wrong function name in validation check
  • Removed the hash/pound/number symbol as it was not internationally recognized
  • Improvements to the pseudo view on new,yet to be uploaded, attachments.  They now appear as blank boxes with the appropriate text and will respond to width and align attributes
  • Permission updates in an attempt to fix the view new since / all post of a user / other? ... problem(s)

As always ... uninstall the old and then install this version ...

engr_dood

I can now see the thumbnails with a non-admin account when doing "View most recent posts in the forum", and viewing all posts of a given user.  However, when I click on the thumbnail in these two scenarios, one of two things happens (and I can't figure out the exact scenario that makes the difference).

1) The thumbnail is expanded to a full-size graphic, but then that graphic is only seen by itself, not along with the rest of the post.
or,
2) A dialog box comes up for the purpose of downloading the file.

I think what's going on is the dialog only shows up in graphics that were posted under 1.1.11 with the quake101 mod, but I can't be absolutely sure.

Spuds

#131
Quote from: engr_dood on March 07, 2010, 03:34:56 PM
I can now see the thumbnails with a non-admin account when doing "View most recent posts in the forum", and viewing all posts of a given user.  However, when I click on the thumbnail in these two scenarios, one of two things happens (and I can't figure out the exact scenario that makes the difference).

1) The thumbnail is expanded to a full-size graphic, but then that graphic is only seen by itself, not along with the rest of the post.
or,
2) A dialog box comes up for the purpose of downloading the file.

I think what's going on is the dialog only shows up in graphics that were posted under 1.1.11 with the quake101 mod, but I can't be absolutely sure.

Argh ! ... well at least they are showing up for everyone now.  I had not noticed this expand issue as I use a jquery/lightbox mod to expand the thumbnails and that was working for me.   

Anyway I think what is happening is that the ilaexpandthumbnail javascript is not being loaded when viewing posts from user/new posts since/etc since the javascript function was added as part of smf's topic.js   When viewing those compiled post lists, its not a single topic so that javascript file does not get loaded.  I've pulled that function into its own js file and load it in the headers (I hope) so its available no matter where we are trying to view ila posts.  That should fix the images from not expanding inline when clicked but not sure about the option to download dialog you are getting.


engr_dood

Quote from: Spuds on March 07, 2010, 11:32:15 PMI've pulled that function into its own js file and load it in the headers (I hope) so its available no matter where we are trying to view ila posts.  That should fix the images from not expanding inline when clicked but not sure about the option to download dialog you are getting.

It fixed all cases! (I noted which posts were doing which).

It's looking mighty good now!  It blows away my existing 1.1.11 setup.  At this point, I guess there's a feature freeze with it, so now it's just a case of doing more testing, right?  I will keep trying more oddball combinations of things to test.

Spuds

Quote from: engr_dood on March 08, 2010, 12:00:04 AM
It fixed all cases! (I noted which posts were doing which).

It's looking mighty good now!  It blows away my existing 1.1.11 setup.  At this point, I guess there's a feature freeze with it, so now it's just a case of doing more testing, right?  I will keep trying more oddball combinations of things to test.

Thats great news! ... Yup bug detection and elimination are the goal at this point, I think its pretty stable at this point, largely due to all the testing you have done, but there are probably still a few gotchas.  If everything keeps looking good I may release it as its own mod and at some point beef up the admin section so there is a little more configuration available.

engr_dood

I've done a bit more testing, and so far nothing amiss with functionality.  I did see these error log entries though (shortened a bit).

8: Undefined variable: ila_attachments_context
File: ILA-Subs.php
Line: 116

8: Undefined variable: ila_attachments_context
File: ILA-Subs.php
Line: 110

Spuds

#135
Quote from: engr_dood on March 08, 2010, 01:45:27 PM
I've done a bit more testing, and so far nothing amiss with functionality.  I did see these error log entries though (shortened a bit).

8: Undefined variable: ila_attachments_context
File: ILA-Subs.php
Line: 116

8: Undefined variable: ila_attachments_context
File: ILA-Subs.php
Line: 110

Notice errors ... found a couple of other ones in my log .... with the last update the program allows a new flow and I did not initilize some vars .... I've attached a new version although I did not increment the number yet so its still shows a 1.02.  Clear the log and give this a go.

engr_dood

Hmm.  Now when I do a new post with a non-admin account, on the initial preview before the files are up on the server, I get this message for the graphic:

[ You are not authorized to view attachments ]

Once it's posted, I can see the graphics with a non-admin account just fine.

When I do the preview of a new post with an admin account, it's fine, showing the preview frame with file name and other info as it should.  Viewing the most recent posts in the forum is fine, even with a non-admin account.  This issue seems confined to the initial preview.

engr_dood

Working great now, and with an empty error log too.  Very cool!  :D

engr_dood

RC3?  LOL!  I didn't realize it was coming together while all this was happening.  I can't keep up! ;D  I guess I'll make an RC3 beta test forum and phase out the RC2 test forum then.

engr_dood

#139
I just installed this RC3-compatible version into my RC2 test platform.  The first 1.03 Beta you posted uninstalled fine.  The second 1.03 Beta installed fine, worked fine and had no errors in the error log.  So I thought I'd update my test platform to RC3, and in preparing for that I attempted to uninstall the second ILA 1.03 Beta.  When attempting to do this, I got uninstall errors.  I've attached a screen shot of what happened.

How can I go about recovering from this?

Edit:  I still have the first 1.03 Beta if it's necessary to use it.

Advertisement: