1
limecity
[img] disable left right alignment
  • 2008/12/27 1:48

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


How do I disable the left right alignment prompt when the user links an image?

hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
limecity
Re: [img] disable left right alignment
  • 2008/12/28 6:03

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


bump
hhttp://www.mounthiking.com
all your hiking gears and gadgets


3
ghia
Re: [img] disable left right alignment
  • 2008/12/28 11:40

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Module, editor and XOOPS version?
If the alignment is not to be selected, should it be fixed to something or what?

4
limecity
Re: [img] disable left right alignment
  • 2008/12/28 12:39

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


hmm. the editor / text composer.
don't really know what its called.

its when the user clicks on the imgsrc button

and it has this prompt

"Now, enter the position of the image.
'R' or 'r' for right, 'L' or 'l' for left, or leave it blank."

I want to disable that particular prompt cause the users are making a mess out of the forum.
with bad alignments.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


5
limecity
Re: [img] disable left right alignment
  • 2008/12/29 11:07

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


bump
hhttp://www.mounthiking.com
all your hiking gears and gadgets


6
ghia
Re: [img] disable left right alignment
  • 2008/12/29 11:43

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Comment all lines (with //) from
var text2 prompt(enterImgPosPhrase "n" imgPosRorLPhrase"");
        while ( ( 
text2 != "" ) && ( text2 != "r" ) && ( text2 != "R" ) && ( text2 != "l" ) && ( text2 != "L" ) && ( text2 != null ) ) {
            
text2 prompt(errorImgPosPhrase "n" imgPosRorLPhrase,"");
        }
        if ( 
text2 == "l" || text2 == "L" ) {
            
text2 " align=left";
        } else if ( 
text2 == "r" || text2 == "R" ) {
            
text2 " align=right";
        } else {
            
text2 "";
        }
in /include/formdhtmltextarea.js, except one line starting with
text2 "
for the aligment of your choice.

7
limecity
Re: [img] disable left right alignment
  • 2008/12/29 13:33

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


oh that worked for DHTML Form with xCode.

but still can't solve the problem for Extended DHTML form.

i edited the same thing in xoops.js where i found the similiar code.
but doesn't seem to solve the problem.

or to make things easier, how do I set the default editor in xoops?
hhttp://www.mounthiking.com
all your hiking gears and gadgets


8
ghia
Re: [img] disable left right alignment
  • 2008/12/30 1:18

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Clear the browsers cache.

9
madDan
Re: [img] disable left right alignment
  • 2010/6/14 10:14

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I have been using scaled aligned images and find that it is the sequence they are generated in by the image instal feature in the editor.

for instance

the editor will give you
[img align=left width=200]imgurl[/img][img align=left width=200]imgurl[/img][img width=200]imgurl[/img]


this would be an attempt to have 3 images side by side at the same level. but you will get two on the same level the last one below and the following text to the right of the last image.


If hand entering the code

[img width=200 align=left]imgurl[/img][img width=200 align=left]imgurl[/img][img width=200]imgurl[/img]


You get three images aligned and the following text below

I use the last image without alignment to turn off the forced alignment.


I think the problem is that the editor image insertion simply puts the text into the posts in the wrong sequence

it should be img width then alignment

10
madDan
Re: [img] disable left right alignment
  • 2010/6/15 10:32

  • madDan

  • Not too shy to talk

  • Posts: 105

  • Since: 2010/1/6 1


I have been having a play with this on my site and tried altering


include/formdhtmltextarea.js

line 74



var result "[img" text2 text3 "]" text "[/img]";



to

var result "[img" text3 text2 "]" text "[/img]";


Did a system and forum module update (not sure if it was needed) and after a clearing of my browser caches etc


this little tweak helps with image alignment, it doesn't fix the forced alignment issue but putting your last image without alignment in that row does stop the text alignment getting hijacked.

Should this be submitted as a bug fix?


Login

Who's Online

373 user(s) are online (249 user(s) are browsing Support Forums)


Members: 0


Guests: 373


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits