xoops forums

Forum Index


Board index » All Posts




fabou78

Friend of XOOPS
Posted on: 9/19 10:54
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#41

XOOPS France

Anyone knows what happened to the XOOPS France website? It has been down for quite some time now.

DNS issues?

dig +noall +answer www.frxoops.org
;; connection timed out; no servers could be reached


Lupin

Just popping in
Posted on: 9/16 23:08
Lupin
Lupin (Show more)
Just popping in
Posts: 50
Since: 2007/6/1 2
#42

Re: NewBB 5.0 Final and 4.34 Final are released

Sorry Mamba , I had probs with internet service last week ... Ok , I will read an reply ...

Pino


fabou78

Friend of XOOPS
Posted on: 9/16 11:40
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#43

Small display issue in date for yesterday and today

I was looking at an issue where dates for posts from yesterday or today would not display correctly in my language (French).

I found an error in our locale file language/french/locale.php ;

define('_TODAY', "\A\u\j\o\u\r\d\'\h\u\i G:i");
define('_YESTERDAY', "\H\i\e\r G:i");

The issue is that \r \e seem to be special characters and have not been translated properly in French so I can easily fix this by doing double back slash \\e and \\r like I have seen in the English version of the file language/english/locale.php

The function that is returning the date string is located in class/xoopslocal.php and at line 98 I can see the reference to _TODAY and _YESTERDAY defined in local.php

$datestring = ($elapse_today 0) ? _TODAY _YESTERDAY;


Now there is also another file called calendar.php that has a really neat variable called _CAL_TODAY

define('_CAL_TODAY', 'Aujourd\'hui');

I tried to be clever by replacing

$datestring = ($elapse_today 0) ? _TODAY _YESTERDAY;


With this

$datestring = ($elapse_today 0) ? _CAL_TODAY _CAL_YESTERDAY;



in class/xoopslocal.php and I also added _CAL_YESTERDAY to the calendar.php file as it was not present but it didn’t work.


I don’t know PHP but wanted to know if there is an easy way to fix it like I wanted by using calendar.php (if there is not risk to have side effects) ?

Also just out of curiosity why define('_TODAY', "\T\o\d\a\y G:i"); and not define('_TODAY', "Today"); in local.php?


Mamba

Moderator
Posted on: 9/15 9:49
Mamba
Mamba (Show more)
Moderator
Posts: 10779
Since: 2004/4/23
#44

Re: NewBB 5.0 loading wrong template?

I'm happy to hear that!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs


fabou78

Friend of XOOPS
Posted on: 9/13 20:50
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#45

Re: NewBB 5.0 loading wrong template?

Thanks, it worked.


Mamba

Moderator
Posted on: 9/13 0:54
Mamba
Mamba (Show more)
Moderator
Posts: 10779
Since: 2004/4/23
#46

Re: NewBB 5.0 loading wrong template?

Go to the /EXTRA folder in NewBB 5.0 and copy the /xbootstrap folder to the /themes folder.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs


fabou78

Friend of XOOPS
Posted on: 9/12 20:04
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#47

Re: NewBB 5.0 loading wrong template?

UPDATE: I have downloaded the latest version of XOOPS 2.5.10 and NEWBB 5.00 from github and tried the install a few time on my Linux server, I still encounter the same problem with the forum display.

Would be glad if someone confirm they see the same issue


fabou78

Friend of XOOPS
Posted on: 9/12 15:00
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#48

NewBB 5.0 loading wrong template?

I have an issue on NewBB 5.00 where the web page is loading with unresolved smarty constant like this

_MD_USERS_ONLINE 1 _MD_BROWSING_FORUM
[ _MD_ADMINISTRATOR ] [ _MD_MODERATOR ]
0 _MD_ANONYMOUS_USERS
1 _MD_REGISTERED_USERS

I suspect that the template that is loaded when I click on furum is themes/xbootstrap/modules/newbb/newbb_index.tpl since I am running the xbootstrap theme. In that file all smarty constants are in the form of “_MD_XXXXXXX”.

However, if I look in modules/newbb/language/english/main.php all constants are in form of “_MD_NEWBB_XXXXXX".


I found out that the template here modules/newbb/templates/newbb_index.tpl make reference to the correct constants format “_MD_NEWBB_XXXXXX".

How can I force XOOPS to load newbb_index.tpl from modules/newbb/templates/ instead of loading it from themes/xbootstrap/modules/newbb/ ?


luciorota

Module Developer
Posted on: 9/12 13:58
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#49

Re: xoopsClone issues

Thanks

Quote:

One potential problem is that the XoopsObject has no internal knowledge of it's primary key, so while the object is marked new, it still has any auto-increment PK set. You can work around this issue by doing a $newObject->destroyVars('key-variable-name'); to clean up after a clone.


In fact this is a problem I encountered

Also $vars[$key]['changed'] property si cloned as false, for this reason the cloned object cannot be correctly stored in the database.

In your opinion, can it make sense to correct the xoopsClone() method to create working objects?
Thx


geekwright

Quite a regular
Posted on: 9/12 2:44
geekwright
geekwright (Show more)
Quite a regular
Posts: 270
Since: 2010/10/15
#50

Re: xoopsClone issues

There are not a lot of examples for xoopsClone() that I can find.

Assuming $existingObject is a child of XoopsObject
$newObject $existingObject->xoopsClone();

will create a cloned copy of $existingObject.

It is probably wise to instead use PHP's clone like this:
$newObject = clone $existingObject;


It is possible that an object with custom properties might not produce a proper clone with xoopsClone(), while the PHP clone would clone any custom properties.

The clone, in either case, has all the vars copied, and is set as a new object.

One potential problem is that the XoopsObject has no internal knowledge of it's primary key, so while the object is marked new, it still has any auto-increment PK set. You can work around this issue by doing a $newObject->destroyVars('key-variable-name'); to clean up after a clone.

It probably would have made more sense for a xoopsClone() method to be in the handler rather than the object, but this choice was made a long time ago.



TopTop
« 1 2 3 4 (5) 6 7 8 ... 29242 »