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

Home » FUDforum Development » Bug Reports » {admin_control_row_all} <-- this section cannot be edited
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
{admin_control_row_all} <-- this section cannot be edited [message #7516] Fri, 29 November 2002 11:42 Go to next message
xiouxin is currently offline  xiouxin   Taiwan
Messages: 11
Registered: August 2002
Location: Taipei
Karma: 0
Junior Member
Dear Prottoss

In `thread.tmpl`, there's a section named {admin_control_row_all}. I use template editor to edit it, then the generated `thread.php` got parse error. The error is caused by some backslashes been stripped as follows:

[ORIGINAL]
$admin_control_row = '<td align=center class="RowStyleA"><a h
ref="javascript://" onClick="javascript: window_open(\'http://www.heygo.com/forum/ind
ex.php?t=mvthread&amp;'._rsid.'&amp;th='.$obj->id.'\', \'th_move\', 300, 400);">...

[MODIFIED]
$admin_control_row = '<td align=center class="RowStyleA"><a h
ref="javascript://" onClick="javascript: window_open('http://www.heygo.com/forum/ind
ex.php?t=mvthread&amp;'._rsid.'&amp;th='.$obj->id.'', 'th_move', 300, 400);">...

I restored `thread.tmpl` to the original version, edited it again with template editor, the generated `thread.php` still got stripslashed and parse error.

At last, I edited `thread.php` by hand, leave {admin_control_row_all} untouched. This surely work, but I have to bear in mind never edit this section in template editor again.

I wonder if this is unique for me? My php engine was modified with Big5 Chinese (for Taiwan/Hong Kong) encoding compiled in. The modified fuctions are addslash & stripslash.

Can you verify this for me? Thanks! ~~XiouXin

p.s. Other templates & sections within have no such problem.
Re: {admin_control_row_all} <-- this section cannot be edited [message #7519 is a reply to message #7516] Fri, 29 November 2002 15:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Could you please show me the modified {admin_control_row_all} section.
It appears like a multibyte problem with one of the PHP functions used, once I have more info I may be able to solve the problem.


FUDforum Core Developer
Re: {admin_control_row_all} <-- this section cannot be edited [message #7527 is a reply to message #7516] Sat, 30 November 2002 15:09 Go to previous messageGo to next message
xiouxin is currently offline  xiouxin   Taiwan
Messages: 11
Registered: August 2002
Location: Taipei
Karma: 0
Junior Member
Dear Prottoss

I want a line break, so I use <br> to substitute "|", here's the modified section generated by template editor:

<td align=center class="RowStyleA"><a href="javascript://" onClick="javascript: window_open('{ROOT}?t=mvthread&amp;{DEF: _rsid}&amp;th={VAR: obj->id}', 'th_move', 300, 400);">{MSG: move_thread}</a><br><a href="{ROOT}?t=mmod&amp;{DEF: _rsid}&amp;th={VAR: obj->id}&amp;del={VAR: obj->root_msg_id}&amp;{VAR: returnto}">{MSG: thread_mod_delete}</a></td>

Hope you figure it out. Thanks.

BTW, my forum is now acting merely as archives, the translation has been pendig for a long time. But I'm quite interested in FUD code, so splendid works as tutorial on how to code excellent program!
Re: {admin_control_row_all} <-- this section cannot be edited [message #7755 is a reply to message #7516] Fri, 13 December 2002 16:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
After looking at the bug further and speaking to several PHP developers I've come to the conclusion that the bug is due to PHP's function not supporting multibyte data in some cases. You've apparently stumbled across one such case. The 'real' solution would be to use mbstring, which enables multibyte support in PHP, but that only is nearing maturity in PHP 4.3.0, which is soon to be out.
In the mean time I recommend that you make layout modification in you favorite text editor and not rely on the web control panel for template modifications.


FUDforum Core Developer
Re: {admin_control_row_all} <-- this section cannot be edited [message #7767 is a reply to message #7755] Sat, 14 December 2002 16:23 Go to previous messageGo to next message
xiouxin is currently offline  xiouxin   Taiwan
Messages: 11
Registered: August 2002
Location: Taipei
Karma: 0
Junior Member
O.K. I see.

It's not rare situation for multibyte users as me to code with PHP, I've been used to this. Next time I'll use my favorite vi to fix it manually.

Thank you, anyway.
Re: {admin_control_row_all} <-- this section cannot be edited [message #7770 is a reply to message #7767] Sat, 14 December 2002 23:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
When I write version 3.0 I'll make it require a higher version of PHP, so usage of multibyte functions will become something that I'll try to integrate into the code.

FUDforum Core Developer
Re: {admin_control_row_all} <-- this section cannot be edited [message #7783 is a reply to message #7770] Sun, 15 December 2002 05:03 Go to previous message
xiouxin is currently offline  xiouxin   Taiwan
Messages: 11
Registered: August 2002
Location: Taipei
Karma: 0
Junior Member
Wow, 3.0! looking forward to...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: clear_old_session bug ?
Next Topic: upgrade to 2.3.6RC4...failed next day
Goto Forum:
  

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

Current Time: Thu Sep 19 23:53:37 GMT 2024

Total time taken to generate the page: 0.03565 seconds