Welcome visitor
Login - Register - I Forgot My Password - Search - Members
Main Page » how can I add align text functions   (Pages: 1, 2)

how can I add align text functions

Hi I wonder how can I add align text functions (Right, left & Center). before i post my message similer to the functions Bold, Italic, Underline...etc

Re: how can I add align text functions

Hello, to achive that:

- Firstly, you should add the necessary ASP code to "inc_auto_code.asp".
- Then, if you want to get visual buttons on your post forms you should add them manually to "default.asp" and "topic.asp" by adding necessary HTML and Javascript code.

The second step is a little hard and it would be too long to explain here but a competent programmer should be able to do it by himself by looking at the code of the files I listed above.

For the first step, open "inc_auto_code.asp" and add following lines after 211th line (You can fine-tune to get the exact effect you want):

		NewText = Replace(NewText, "[right]", "<p style=""text-align=right"">")
NewText = Replace(NewText, "[/right]", "</p>")

As you might see there, there is already a [ center ] (without the spaces) command to center the text.

Re: how can I add align text functions

Thanks so much for quick reply , but i have quick question in which line (line number) you recommand to add HTML and Javascript code because i will add it manual :)

Thanks in advance

Re: how can I add align text functions

Mainly 4 places:

- To the top of the default page: inc_beginning.asp, anywhere between line 241 to line 245.

- To the bottom of the default page: inc_end.asp, anywhere between line 100 to line 104.

- To the topic editing area: topic.asp, anywhere between line 327 to line 331.

- To the reply editing area: topic.asp, anywhere between line 569 to line 573.

You can look at the similar button's code at the mentioned lines ;)

Re: how can I add align text functions

Thanks soooooooooo much dear and can I ask you for last favour&#8230;could you please pass the necessary HTML and Javascript code beacuse i couldn't find it :D

Re: how can I add align text functions

You have to arrange the line below according to your needs and then paste it to the necessary places I mentioned before:

<img src="skins/<%=SettingsSkin%>/bold.gif" alt="<%=LanTitleBoldText%>" title="<%=LanTitleBoldText%>" onclick="AddiyziCode('Message', '[b]{SelectedText}[/b]')" onmouseover="style.cursor='pointer'" />

Re: how can I add align text functions

Thanks alot dear....you are the best^^

Re: how can I add align text functions

Sorry again ...but the command working fine when i added it but still the right command not working any idea please

Re: how can I add align text functions

please dear ZuLuuuuuu any idea regarding my earlier question?

Re: how can I add align text functions

Sorry for late answer,

You should give more information like copying and pasting the code added.

Re: how can I add align text functions

I add the following code as you told me:
- <img src="skins/<%=SettingsSkin%>/right.gif" alt="<%=LanTitleRightText%>" title="<%=LanTitleRightText%>" onclick="AddiyziCode('MessageBottom', '[Right]{SelectedText}[/Right]')" onmouseover="style.cursor='pointer'" /> in inc_end.asp

-<img src="skins/<%=SettingsSkin%>/right4.gif" alt="<%=LanTitleRightText%>" title="<%=LanTitleRightText%>" onclick="AddiyziCode('TopicMessage', '[Right]{SelectedText}[/Right]')" onmouseover="style.cursor='pointer'" />
&
<img src="skins/<%=SettingsSkin%>/right.gif" alt="<%=LanTitleRightText%>" title="<%=LanTitleRightText%>" onclick="AddiyziCode('Post<%=ReplyPostID%>', '[Right]{SelectedText}[/Right]')" onmouseover="style.cursor='pointer'" /> in topic.asp

-<img src="skins/<%=SettingsSkin%>/right.gif" alt="<%=LanTitleRightText%>" title="<%=LanTitleRightText%>" onclick="AddiyziCode('Message', '[right]{SelectedText}[/right]')" onmouseover="style.cursor='pointer'" /> in inc_beginning.asp

and I modified inc_auto_code.asp by add the following code:
NewText = Replace(NewText, "[Right]", "<Right>")
NewText = Replace(NewText, "[/Right]", "</Right>")

when i tried the similer code with center & left it was working fine but with right thier was no effect at all.

Re: how can I add align text functions

It is because there is no HTML tag named <Right>. <Left> probably worked because text are aligned left by default.

So you should change <Right> to
<p style="text-align: right">
and </Right> to
</p>

Re: how can I add align text functions

you mean in inc_auto_code.asp i have to change

Re: how can I add align text functions

Yes.

Re: how can I add align text functions

thanks dear i will try

Re: how can I add align text functions

Dear ZuLuuuuuu ,
I did the change by adding the given code by you but still not working, do you think there is another change I have make to make right align work with me. And please advice if you tried it by yourself and if it is work.
Sorry if I distribute but I wondering all other functions work fine (left align/centre align) when I test it except the right align

Best regards,
Main Page » how can I add align text functions   (Pages: 1, 2)
Search - Members
iyzi Forum | Email
iyzi Forum v1.0 Beta 3.01