1901
fabou78
NewBB 5.0 loading wrong template?
  • 2019/9/12 15:00

  • fabou78

  • Friend of XOOPS

  • Posts: 43

  • Since: 2012/6/16


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/ ?



1902
luciorota
Re: xoopsClone issues
  • 2019/9/12 13:58

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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



1903
geekwright
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.



1904
luciorota
xoopsClone issues
  • 2019/9/11 9:52

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


Someone can explain to me the correct use of the xoopsClone() method?



1905
Mamba
Re: NewBB 5.0 Final and 4.34 Final are released
  • 2019/9/9 7:49

  • Mamba

  • Moderator

  • Posts: 11378

  • Since: 2004/4/23


One more thing - when you save your screenshots, can you remove the empty spaces and parentheses from the name?

It seems like it causes the image preview here...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1906
Mamba
Re: NewBB 5.0 Final and 4.34 Final are released
  • 2019/9/9 7:40

  • Mamba

  • Moderator

  • Posts: 11378

  • Since: 2004/4/23


I'll need to check your installation. Please check you PM and then send me an email.

There should be no issue with PHP 7, because that's what we have here.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1907
Lupin
Re: NewBB 5.0 Final and 4.34 Final are released
  • 2019/9/8 10:56

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


I don't think so, but ... maybe problems due to PHP 7.2 ( I have this ) ?



1908
Lupin
Re: NewBB 5.0 Final and 4.34 Final are released
  • 2019/9/8 9:47

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Reinstalled module : same problem.

I saw other bugs :

[img width=300]http://www.cmfoto.eu/cm8/images/Screenshot (4)_mod.png[/img]

and :

[img width=300]http://www.cmfoto.eu/cm8/images/Screenshot (3_mod).png[/img]



1909
fabou78
Re: Fine tuning template won't show on browser
  • 2019/9/7 19:42

  • fabou78

  • Friend of XOOPS

  • Posts: 43

  • Since: 2012/6/16


Thanks,

It worked ...



1910
Yurdal
Re: Fine tuning template won't show on browser
  • 2019/9/7 19:36

  • Yurdal

  • Friend of XOOPS

  • Posts: 386

  • Since: 2005/3/27


prefences ->system options -> general settings->Check templates for modifications? YES




TopTop
« 1 ... 188 189 190 (191) 192 193 194 ... 29425 »



Login

Who's Online

363 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits