21
Cesagonchu
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1

Thank you for your answer in the forum Irmtfan.

As said before, other bugs are due to caches problems but we still have icon.png bug and I use Xoops default template.

Other users have reported me the same bug.


My config:

Xoops 2.5.7 Beta 1

PHP 5.5.1-2+debphp.org~precise+2

MYSQL 5.5.32-0ubuntu0.12.04.1

22
Cesagonchu
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1

I think I found the problem, it is here: XOOPS2.5_mod_newbb_4.33.RC7_irmtfan\newbb\templates\newbb_thread.html line 43
<!-- irmtfan simplify onclick method (this.children[0] for IE7&8) - remove hardcode style="padding:2px;"--> <span class="pointer" onclick="ToggleBlockCategory('<{$topic_post.post_id}>',(this.firstElementChild || this.children[0]) , '<{$infobox.icon.expand}>', '<{$infobox.icon.collapse}>','<{$smarty.const._MD_NEWBB_HIDEUSERDATA}>','<{$smarty.const._MD_NEWBB_SEEUSERDATA}>')"> <{$infobox.displayImage}> </span>
This code displays the "define" with ' ' instead of " " So that if we as often have a "define" with an apostrophe (e.g.That's ok), it will give a bug. Precisely this code has a problem:
<{$smarty.const._MD_NEWBB_HIDEUSERDATA}>','<{$smarty.const._MD_NEWBB_SEEUSERDATA}>')">
In the English version, the "define" of: _MD_NEWBB_HIDEUSERDATA is "Hide User information" but in french it is: "Cacher les informations de l'utilisateur" and the code display simple quotes instead of double quotes: Resized Image
How to solve the problem without forcing us to take off our quotes?

23
irmtfan
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1
  • 2013/8/23 4:07

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Very nice finding! I try a little but still dont know any good solution for this. possible bad solutions: 1- change the define with this:
define("_MD_NEWBB_SEEUSERDATA","Cacher les informations de l\'utilisateur");
but it will show the \ in the loading page. 2- remove alts ( in the previous versions there were no alts)
<span class="pointer" onclick="ToggleBlockCategory('<{$topic_post.post_id}>',(this.firstElementChild || this.children[0]) , '<{$infobox.icon.expand}>', '<{$infobox.icon.collapse}>','','')">
the main questions is: can we change simple quotes in the above code with something else?

24
Cesagonchu
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1

Quote:

irmtfan wrote:
the main questions is:
can we change simple quotes in the above code with something else?


I tried with double-quotes in the code, but it does not work.
I wish it was the solution instead of the other two because the first solution, all translators do not necessarily think to put the backslash, and the second solution takes us away W3C standards.

25
slider84
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1
  • 2013/8/23 16:34

  • slider84

  • Just popping in

  • Posts: 21

  • Since: 2013/8/16


Quote:
Le dossier "/data/www/xxx/uploads/newbb/ Protégé en écriture Définir l'autorisation" n'existe pas
Le dossier "/data/www/xxx/uploads/newbb/" doit avoir les permissions CHMOD "755" - il possède actuellement : "755" ).
Le dossier "/data/www/xxx/uploads/newbb/thumbs/ Protégé en écriture Définir l'autorisation" n'existe pas
Le dossier "/data/www/xxx/uploads/newbb/thumbs/" doit avoir les permissions CHMOD "755" - il possède actuellement : "755" ).
This problem occurs when you create directories manualy on Unix/Linux system.
In this case, group and users rights are those of user or root
drwxr-xr-x 2 slider84 slider84 4096 août 21 23:03 newbb for user
or
drwxr-xr-x 2 root root 4096 août 21 23:03 newbb for root
Newbb need apache user and group rights (www-data in my case) to work fine.
drwxr-xr-x 2 www-data www-data 4096 août 21 23:02 newbb

Others modules who use standard moduleclass 1.1 fonction to check directories and rights on them don't have this limitation.

Please see post here

26
irmtfan
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1
  • 2013/8/24 0:30

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


@Cesag: You are right. I tried some ways like double quotes and backslashes (\' and ") It is a general issue. I mean in any xoops core template or modules you will have this problem in javascript functions. Also it seems it is not an issue in using single quotes inside the event. I changed the code with this:
<span class="pointer" onclick='ToggleBlockCategory("<{$topic_post.post_id}>",(this.firstElementChild || this.children[0]) , "<{$infobox.icon.expand}>", "<{$infobox.icon.collapse}>","<{$smarty.const._MD_NEWBB_HIDEUSERDATA}>","<{$smarty.const._MD_NEWBB_SEEUSERDATA}>")'>
It still works fine when you dont have ' in the definitions. Somebody could show us how we can use onClick event with single quotes inside definitions. @slider84: Newbb is using moduleadmin class. As you can see yourself those messages comes from moduleadmin class language files. I still cannot understand your issue. All xoops and modules is using the same chmod check and user should be the owner of directories.

27
Mamba
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1
  • 2013/8/24 5:51

  • Mamba

  • Moderator

  • Posts: 11274

  • Since: 2004/4/23


Quote:
Somebody could show us how we can use onClick event with single quotes inside definitions.
We need to use the Smarty "escape" modifier, and in our case related to quotes: Quote:
|escape:'quotes'
So your code then becomes:
<span class="pointer" onclick="ToggleBlockCategory('<{$topic_post.post_id}>',(this.firstElementChild || this.children[0]) , '<{$infobox.icon.expand}>', '<{$infobox.icon.collapse}>','<{$smarty.const._MD_NEWBB_HIDEUSERDATA|escape:'quotes'}>','<{$smarty.const._MD_NEWBB_SEEUSERDATA|escape:'quotes'}>')">
and it works perfectly, at least in my test.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

28
Cesagonchu
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1

Irmtfan thank you for your answer. I hope we will see you more often, we miss you.

A big thank you Mamba, you have found the solution, it also works for me!

29
slider84
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1
  • 2013/8/24 9:23

  • slider84

  • Just popping in

  • Posts: 21

  • Since: 2013/8/16


Thank you for your answer Irmtfan.

The error is triggered by a call to the PHP function is_writable() in newbb_admin_getPathStatus() function (not used by others modules).
She return "false" on my system and then PHP thinks the directory is not writable...

30
Cesagonchu
Re: Newbb 4.33 RC7 (irmtfan version) and Xoops 2.5.7 beta 1

Another little bug:
when I go to help section from another module (because newbb doesn't have help section), I get this error:

NoticeUndefined indexfct in file /modules/newbb/xoops_version.php line 767

Login

Who's Online

95 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 95


more...

Donat-O-Meter

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

Latest GitHub Commits