FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Code align
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Code align [message #37771] Sun, 24 June 2007 06:00 Go to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi All,
I translate the FUDforum to Hebrew and now I'm doing QA Smile
I found that the CODE section is align to right according to the RTL Hebrew page, But in Israel we are reading the code as all Smile from left to right.
I tried to change the align of the code section in the file post_oroc.php.t and rebuild the template. but this doesn't solve the issue. and when I'm editing the msg I see some HTML code like align etc. instead to see: [ code ] and [ /code ]

Where should I change this direction?

I tried in the CSS too add to the style div.pre direction: ltr but again it's the same right to left.

Please advise.
Thanks,
Miki
Re: Code align [message #37782 is a reply to message #37771] Sun, 24 June 2007 17:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The code section is generated by PHP, you may need to wrap it in a div and set the div to RTL via css.

FUDforum Core Developer
Re: Code align [message #37787 is a reply to message #37771] Mon, 25 June 2007 05:49 Go to previous messageGo to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi Ilia,
As I wrote before I tried in the CSS too add to the style 'div.pre' the option "direction: ltr;" but again it's the same right to left and not left to right. (I rebuild the template right after that)
Maybe I didn't change the right css file? can you write here what is the right CSS file?

Thanks,
Miki
Re: Code align [message #37792 is a reply to message #37787] Tue, 26 June 2007 01:29 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Try adding CSS style for the <pre> tag

FUDforum Core Developer
Re: Code align [message #37872 is a reply to message #37771] Wed, 27 June 2007 14:55 Go to previous messageGo to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi Ilia.
I changed the post_proc.inc.t fire by adding the style to the pre
$ostr .= '<div class="pre"><pre style="direction: ltr">'.reverse_nl2br($param).'</pre></div>';


What I get when I post message with a code is what you can see in the 1.png file.
When I tried to edit the message I see in the textarea the same has you can see in file 2.png

Please advise.
Thanks,
Miki
  • Attachment: 1.png
    (Size: 61.46KB, Downloaded 1181 times)
  • Attachment: 2.png
    (Size: 4.94KB, Downloaded 1127 times)
Re: Code align [message #37882 is a reply to message #37872] Thu, 28 June 2007 22:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to edit the code inside post_proc.inc.t to support style="direction: ltr" inside the <pre>. Another alternative would be to do pre { direction: ltr } inside the forum's css.

FUDforum Core Developer
Re: Code align [message #37892 is a reply to message #37771] Fri, 29 June 2007 14:49 Go to previous messageGo to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi again,
Thats exactly what i did in the post_pro.php.t see the attached image.
The results I got is the previous attachments.


Thanks,
Miki
  • Attachment: snapshot5.png
    (Size: 5.53KB, Downloaded 1126 times)
Re: Code align [message #37893 is a reply to message #37771] Fri, 29 June 2007 14:51 Go to previous messageGo to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi again,
Sorry the correct file I edited is post_proc.inc.t and not post_proc.php.t as i wrote before.
I add the style direction to the pre tag in line 205.


Thanks again,
Miki
Re: Code align [message #38240 is a reply to message #37771] Fri, 27 July 2007 19:24 Go to previous messageGo to next message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Any new idea to this issue?

I really like fudforum and I really want to use it.

Thanks,
Miki
Re: Code align [message #38262 is a reply to message #38240] Sun, 29 July 2007 15:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to modify the post_proc.inc.t parser to decode the new CSS block you've added. You can probably do <pre[^>]*> regex.

FUDforum Core Developer
Re: Code align [message #38843 is a reply to message #37771] Fri, 31 August 2007 16:33 Go to previous message
syslin is currently offline  syslin   Israel
Messages: 14
Registered: February 2007
Karma: 0
Junior Member
Hi,
I didn't success to do this.
Here is some issues that I would like to get in my customization Fudforums and I'll pay $10US for that Very Happy through paypal or something like that.

1) I wnat that the "code" section will be align to the left side (cuz my forums are in Hebrew and Hebrew is right from left).


2) I need that the "Body" textarea will be align to the right side instead to the left side like it is here.

3) I want to add a Javascript to the code button so first click it will open the code section (write "[ code ]" in the body) and the second click will close the code section (write "[ / code ]" in the body text area).


Can anyone help me with that?
My forums will be in my community Linux and OpenSource website http://linux-israel.net and they will replace the current forums.

Thanks
Miki

Email/MSN linux(dot)editor(at)gmail(dot)com

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: error when i hit save in the template editor, regardless if i change anything or not
Next Topic: Error when deleting user
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 01:07:57 GMT 2024

Total time taken to generate the page: 0.02663 seconds