In Line Attachments -- ILA

Started by Spuds, April 17, 2010, 06:45:49 AM

Previous topic - Next topic

_pi

#40
when setting in 'Themes and Layout Settings/Member Options' the value 'Show WYSIWYG editor on post page by default.',
then your code does produce a javascript error in script.js

Fehler: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://www.forum-url.tld/Themes/default/scripts/script.js?rc3 :: replaceText :: line 361"  data: no]


that took me hours to find out that this is causing the problem (went nuts  :o ).

do you have an idea what the problem is and how to fix?
to me it looks like you need to target the WYSIWYG area.

thanks!

Spuds

I'll take a look and see if I can figure out what is going on ... what browser and version were you using when the error occurs?

_pi

#42
Quote from: Spuds on July 08, 2010, 05:23:08 PM
I'll take a look and see if I can figure out what is going on ... what browser and version were you using when the error occurs?

that actually doesn't matter, because the error is that once the WYSIWYG editor has been loaded, your insert code can't work (wrong target).

i tested with FF 3.6, iron (chrome alternative), IE8 and opera 10.
your way to replace or insert simply doesn't find the jsframe target.

Spuds

Quotethat actually doesn't matter, because the error is that once the WYSIWYG editor has been loaded, your insert code can't work (wrong target).
Since you seem to know what is occurring your are more than welcome (in fact encouraged) to provide a solution  ;)  The majority of the javascript code is 'left over' from the old 1.1 mod, I did very little to it (other than names/orders of choices) as I don't know that much javascript and it seemed to be working.

_pi

Quote from: Spuds on July 08, 2010, 05:57:54 PM
Quotethat actually doesn't matter, because the error is that once the WYSIWYG editor has been loaded, your insert code can't work (wrong target).
Since you seem to know what is occurring your are more than welcome (in fact encouraged) to provide a solution  ;)  The majority of the javascript code is 'left over' from the old 1.1 mod, I did very little to it (other than names/orders of choices) as I don't know that much javascript and it seemed to be working.

i will do so :D
first step will to build in a switch for checking if WYSIWYG has been set.
i am very familiar with smf 1.1.11, smf2 is new to me  8)

when WYSIWYG==1 then check for the WYSIWYG input area name ...
i did similar tasks when dealing with drupal and tikiwiki 8)

Spuds


tomdev

having some problems with the mod: it onlt displays the attachments as normal (without inline) with i add "[attach" in the body of the message.

live example: http:\\forum.rigsofrods.com/index.php?topic=35572.msg344569#msg344569
three attachments, non gets displayed :/

http:\\forum.rigsofrods.com/index.php?topic=35572.msg344581#msg344581
normal attachments displayed.

Spuds

You need to add [attach] and not just an [attach for the mod to pick up on its bbc code.  Remember that just calling attach by itself with no options will load them in the order found, if you need a specic attachment at a specific spot use the attach=?? where ?? is the number of the attachment uploaded ie 1 for the first, 2 for the second ....

tomdev

Quote from: Spuds on July 21, 2010, 09:34:09 PM
You need to add [attach] and not just an [attach for the mod to pick up on its bbc code.  Remember that just calling attach by itself with no options will load them in the order found, if you need a specic attachment at a specific spot use the attach=?? where ?? is the number of the attachment uploaded ie 1 for the first, 2 for the second ....
i think you dont get me. I dont want to use inline attachments in some posts. When someone adds a post without writing "[attach*" in the post, the attachments are not shown at all. Not even in the SMF default mode. this is clearly a bug to me :/

Spuds

Well now that you have explained what the problem is  ::)

Are you using the default theme?, what other mods are you using?

tomdev

Quote from: Spuds on July 24, 2010, 11:25:02 AM
Well now that you have explained what the problem is  ::)

Are you using the default theme?, what other mods are you using?
i use the default theme with some different styles. (using all original soures in Themes/default/*)

installed mods:
1.     InLine Attachments     1.06 Beta     [ Uninstall ]
2.    JPG Thumbnails    2.0    [ Uninstall ]
3.    Attachment Icon File    1.0    [ Uninstall ]
4.    Aeva Media    1.1b    [ Uninstall ]
5.    Pretty URLs    1.0RC    [ Uninstall ]
6.    PM Attachments    1.4    [ Uninstall ]
7.    The SMF File Management Tool    1.0.1    [ Uninstall ]
8.    Stars And Badges    2.1    [ Uninstall ]
9.    Attachments in Topics    1.0    [ Uninstall ]
10.    Advanced Footer Mod    1.0    [ Uninstall ]
11.    Karma Description Mod    2.6.7    [ Uninstall ]
12.    Active Members In Topic    1.8    [ Uninstall ]
13.    Activity_Bar    1.0.1.2    [ Uninstall ]
14.    Ad Managment    2.3.6.1    [ Uninstall ]
15.    Custom BBCode    2.00    [ Uninstall ]



sweetpotato

I am a newbie. Please let me know how to translate this mod for the use of my users in my language?
Thanks,

Spuds

If you look inside the install-2.0.xml file towards the bottom you will see two areas that need to be translated. 

The first is in the file Modifications.english-utf8.php, all of these start with $txt[] =

The second is the help file Help.english.php, its the very last thing in the install-2.0.xml file

just provide your translation of those areas and I can add them to the install package

yakyakyak

Thank you for providing a nice mod to the community

Would there be any chance of releasing a Lite version with just Inline Expandable Thumbnail as the only option?

yak



Spuds

I take it that to many options confuses users or that it causes format issues .... I very late in making some updates to this mod, when I do I'll look to make what type of ILA is available a admin config option, that way you can control what you allow users to select. 

Still a couple of weeks out before I will even be able to crack open the code to make changes, just letting you know not to expect anything real quick ;)

yakyakyak

You hit the nail on the head - my members have enough issues with below post attachments  ::)

Thanks for the reply

Makar

I'm using rc3  and auto merge double post. Sends the first message from the two images [attachmini = 1 ] and [attachmini = 2 ]. All approx. Then send another with two images [attachmini = 1 ] and [attachmini = 2 ]. There is a union of two posts into one. But, in the message body is shown two pictures instead of four. If you edit the message, and manually add the [attachmini = 3 ] [attachmini = 4], then there are all four images.
I have a suggestion
used for the variable n is the number assigned image and name. Then there should be no such mistake when linking messages.

Sorry for my english

Fernando_CD

First of all, thank you for this great mod. It answers one of my great needs, i.e., Inline Images.

I've tried to install in SMF2 RC3 and, because I have some small mods made by myself, plus "SimpleAds" and "TinyPortal", I thought it would be better to install manually. In fact, there was only one of the "Finds" that wouldn't run if automatic.

I have the default theme, in portuguese.

Now for the question: It does not work.  :-[ When adding a new or modifying a message, there should be a drop box to choose the inline format, following of the input box to select the file. The dropbox exists, but with 4 empty lines. No text in them.

I believe I missed any of the portuguese or theme files to modify, but can't see which one. I've double checked the modifications, with no success. Can anyone help me?

Thank you.

Fernando_CD

Something new: Trying to guess what the options would read, I've attached some pictures. It works great!!! ;D

Still I can't see any options to choose the way the picture should be inserted. The text is added to both
Themes\default\languages\Modifications.english.php
Themes\default\languages\Modifications.portuguese_pt-utf8.php

But I still see no options....  :-[

Any help? Thank you!

Fernando_CD

Found it!!!!!  ;D

The place is
Themes\default\languages\ManageSettings.portuguese_pt-utf8.php -> For admin Modification definitions
Themes\default\languages\Modifications.portuguese_pt-utf8.php -> For message inline select options

O:)

I wonder... shouldn't they both be in the same file?  :-\

Again, Thank you, Spuds!

Advertisement: