News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Attachments Positioning

Started by quake101, April 10, 2008, 11:06:49 PM

Previous topic - Next topic

ukhalik2

please make this one compatible for 2.0 rc3

gbsothere

I realize that this is an outdated mod and not actively supported, but I am hoping that some code-savvy member might offer some insight as to why I'm having the issue in question.

SMF 1.1.11 Default

For quick parsing reference, the mod link is here:
http://custom.simplemachines.org/mods/index.php?mod=1159

Version 1.2 parses for 1.1.11.

Here is the issue and stay with me; I'll try to be clear.

Say you want to attach three images.  This is how you do it:

Click Additional Options, then browse to your image, click [Insert Attachment 1] which will place this tag in your reply box:  [attachment=1].  This tag will become the image when you actually post.  Now... on to the second and third images:  you must first click [more Attachments] before proceeding.  A second browsing field will open and, after navigating to your image, you will click [Insert Attachment 2] which will place the tag [attachment=2] in your reply box.  Click [more Attachments] to open a third browsing field, click [Insert Attachment 3] which results in the [attachment=3] tag and you're ready to post your images.  All well and good...

Now, for the problem.  Say you decide you're not happy with image 1.  You click Modify and Additional Options and uncheck the first attachment and remove the [attachment=1] tag from your post and click Save.  Will the image simply be gone?  No.  It will, instead, be replaced by this ugly text in your post:  [ Attachment Invalid Or Does Not Exist ].  (Not only that, but the last image gets placed below your post, rather than within it.  Same thing if you're happy with image 1 and 3, but want to delete image 2 and go through the process of unchecking the second attachment and removing [attachment=2] from your post and clicking Save.  You will get [ Attachment Invalid Or Does Not Exist ] in place of the deleted image and the last image (3) will be placed beneath your post, rather than within it.  However.....   if it's only the very last image you want to delete.... only the last one, you understand.... and you uncheck that last image and remove [attachment=3] from your post, there is no ugly [ Attachment Invalid Or Does Not Exist ] and no image gets placed at the bottom of your post.

So......   it's a sequence thing, right?  If the sequence is interrupted in any way (with the exception of the very last attachment) the ugly text and bottom-placement of an image happens.  But if only the last image is deleted, all is well.  Yes, a sequence thing or no, that's not it?

:-\


Can anyone see anythinig at all in the parsing for 1.1.11 that might cause the interruption of a sequence to yield [ Attachment Invalid Or Does Not Exist ] within a post and placement of the last image below it?

Please do mull it over and, if you have any ideas, any help at all would be appreciated.   :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

gbsothere

*stops back by, still wearing a toolbelt and carrying a hammer*

Okay, here's the work-around:

Replace or delete anything you like, when editing your post.  Just make sure that the [attachment=1] (and so on) tags in your post are numbered in succession, beginning with 1 and ending with the number matching the total number of images posted.  Just change the numbers in the tags to make them remain in succession and you're good to go.

*shrug*

I can live with that....   
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

samurai-lupin

Has anybody ever found out how to use the lightbox on this?

Thanks ....

deansmar

for all those that would like there Attachments Horizontal insted of vertical, this has been tested with SMF2 RC3, there is no errors in the error Log.

i have moded my Display.template.php, and added some text in my language file, plus installed this mod jQLightbox.0.5.1, which makes everything lightbox enabled, and the attachments are horizontal

as in the photo attached to this post.

firstly:
install the jQLightbox.0.5.1 Mod i know it does not mention that its for SMF2 RC3, but i assure you it does work on RC3

then:
the language changes were in Modifications.english.php copy and paste this in there
// Attachment layout
$txt['Attached_files'] = 'Attached files';
$txt['Other_attached_files'] = 'Other attached file(s)';
$txt['Thumbnails'] = 'Thumbnail(s) click on Image to enlarge';


then:
upload my display.template.php, either into your theme or the default theme

any other changes can be made in the CSS to change the looks..

don't forget to make backups first, hope you all enjoy..

samurai-lupin

Hello, I have the JS Viewer on my site but it doesn't take effect when using the attachment positioning mod. Do you have any suggestions on what to change in the mod so the lightbox takes effec? Thanks!

deansmar

firstly i do not know what JS Viewer is ??

i would imaging the reason beheind the lightbox not taking effect, is that the image link is not calling the  rel="lightbox" link..

samurai-lupin

Thanks for your advice. I have been successfull in implementing the viewer. However I have one more problem: The mod will keep on displaying all images positioned into the posting again on the bottom - but the 1st one ?! ... however I think that ANY image inserted into the posting by using the image attachment positioning mod should NOT be repeated on the bottom.

Has anybody any thought how to fix this problem? Thanks!

timned88

Quote from: ukhalik2 on May 31, 2010, 04:42:23 AM
please make this one compatible for 2.0 rc3

yes, i agree.  please make this rc3 compatible.

yol

Could anybody fix that issue?


Quote from: samurai-lupin on October 07, 2010, 07:32:37 PM
Thanks for your advice. I have been successfull in implementing the viewer. However I have one more problem: The mod will keep on displaying all images positioned into the posting again on the bottom - but the 1st one ?! ... however I think that ANY image inserted into the posting by using the image attachment positioning mod should NOT be repeated on the bottom.

Has anybody any thought how to fix this problem? Thanks!
Istanbul is Istanbul ;-)

FragaCampos

Can anybody make this compatible with SMF 2.0.3 please?

dougiefresh

#91
I took the liberty of making this add-on compatible with 2.0.4, since I'm hoping to also use it with my forum :P  This mod consists of a few changes from 2.0 Beta 3 Public to make it work with 2.0.4, no new features....  Thought I'd share my few minutes of work  ;D Enjoy....

EDIT: Removed attachment.

mark7144

Does anyone know how to have this show in ssi News? It just shows the code instead of the image.

dougiefresh

#93
Someone would probably have to rewrite the mod so that the additional processing takes place in the parse_bbc function in Sources/Subs.php.  Right now, the additional processing for inline attachments takes place in Sources/Display.php after the call to parse_bbc....

EDIT: It also takes place in Sources/Posts.php for post editing (at least I think it's post editing).  Also, a way to get at the attachments would be necessary to develop, as well...

kkmixs

I have install inline atachement, even it install well.But it is showing an option to inline attachement for my first attachement only.I m not getting an option for my other attachement.Please check the image attached the image inline attachement is there with first attachement only.

Further, it appear if after making the post i refresh the page.

Please help me how to add in line attachement options to all my attachement.

I m using version 2.0.5 with core theme

jm_araujo

Attached is updated version compatible with 2.0.6, works fine in my forum.
It's mostly based on the original code, only made changes where compatibility where broke, so all credits must go to original author.
Feel free to use my version as you please.

PML100

Quote from: kkmixs on November 19, 2013, 02:20:13 AM
I have install inline atachement, even it install well.But it is showing an option to inline attachement for my first attachement only.I m not getting an option for my other attachement.Please check the image attached the image inline attachement is there with first attachement only.

Further, it appear if after making the post i refresh the page.

Please help me how to add in line attachement options to all my attachement.

I m using version 2.0.5 with core theme

Did you ever find a solution to this, I have the same problem too.


dougiefresh

Quote from: dougiefresh on July 28, 2013, 07:27:06 PM
Someone would probably have to rewrite the mod so that the additional processing takes place in the parse_bbc function in Sources/Subs.php.  Right now, the additional processing for inline attachments takes place in Sources/Display.php after the call to parse_bbc....

EDIT: It also takes place in Sources/Posts.php for post editing (at least I think it's post editing).  Also, a way to get at the attachments would be necessary to develop, as well...
My Post and PM Inline Attachments mod, which I wrote from the ground up, has been approved for a little while.  It takes care of many of the issues that I have with this mod....

Advertisement: