News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Image upload "in post"

Started by ChILd_ReBoRn, March 05, 2015, 06:06:07 AM

Previous topic - Next topic

ChILd_ReBoRn

Hello.

We're using 2.0.9 version, and standard image uploader (same as this forum uses). We've decided to ditch the third party hosters, and use our own hosting abilities. The problem with the standard uploader is, that the attached pics always end up at the bottom of the post. When you upload a report from your travels, you would like to add a picture, and write some comment for it. Without opening a separate post for each picture, this can't be done with the standard uploader.

Are there any mods that would allow to upload multiple images in post (or upload them to our server, then generating bbc which can be implemented in the single post?

Or ar we stuck with the third party option for coding the images....

Thank you


ChILd_ReBoRn

thnx, will try it out later when I backup my forum

ChILd_ReBoRn

this kind of works

I get a lot of code on the top of my screen:

// BEGIN MOD Inline Attachments $txt['ila_title'] = 'Inline Attachments'; $txt['ila_highslide'] = 'Enable Highslide effects for inline attachment'; $txt['ila_duplicate'] = 'Remove attachment image under post after in-post use'; $txt['ila_download_count'] = 'Show download link and counter under inline attachment'; $txt['ila_attachment'] = ' [ Attachment ] '; $txt['ila_nopermission'] = ' [ You are not allowed to view attachments ] '; $txt['ila_invalid'] = ' [ Invalid Attachment ] '; $txt['ila_disabled'] = ' [ Attachments Disabled ] '; $txt['ila_insert'] = 'Insert Attachment'; $txt['ila_turn_nosniff_off'] = 'Turns "nosniff" option off for IE and Chrome'; // END MOD Inline Attachments

that is like a header on all pages, and the upload works, you can add multiple images with the comments below, BUT, the last picture will always be a separate attachment, and the comment will be atop of it, not under like the rest of the pictures.. so this won't work

margarett

Check your Modifications.english.php (Themes/default/languages)

Make sure that ?> is the LAST line of the file, no text after it.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

ChILd_ReBoRn

I'm not using english on my forum. Could that be the problem?

Themes/default/languages, I can access that via cpanel and phpmyadmin, right?

margarett

Via cPanel --> File Manager or via FTP ;)

BTW, Modifications.english.php is *ALWAYS* modified by MODs (of course, if they affect languages). SMF falls back to English if a certain string isn't found in the language you're using ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

ChILd_ReBoRn

Thank you. Will try it out when I return to my PC

ChILd_ReBoRn

I checked the Modification.english.php and it ends without the character you said. When i add them, and save the php, the code on the top of my forum just ads ?> in the end.

I'll make a backup of it, and delete that part of code and see what happens

Illori

check before the code that shows for ?> if you see one anywhere else in the file remove it. it should ONLY be on the last line of the file.

ChILd_ReBoRn

Damn..I saw one of those...will do!

ChILd_ReBoRn

that worked! Thank you madams/sirs

now just to educate the users how to use the mod...

ChILd_ReBoRn

the mod is silly.

Sure, it works, to an extent. You can add as many images as you like, and write the text underneath them, BUT every time, the last image will be treated as a normal attachment under the post ( divided by a page break), and the text you write under it, will be written under the text of the last photo, but on top of the last one, just over the page break.

Can't understand why it does that.

ChILd_ReBoRn

ok.. managed to make it work A OK...

let's try to see a pattern

ChILd_ReBoRn

the problem is that the upload script generates attachment names as in attachment 0, attachment 2, attachment 3... The "1" is missing, and when you press post, the last attachment  goes bust. The solution is to change the attachment numbers IN POST  in order 0, 1, 2, 3, 4.....Then it works like a charm

margarett

You should post that information in the MOD support topic so that the author is aware ;)

There is another similar MOD, FWIW:
https://github.com/Spuds/SMF-ILA
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: