1
hervet
Guide, how to solve problems caused by Wordbook
  • 2008/10/15 8:24

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

Wordbook's blocks can cause many troubles to the other modules.

Here is a fix.
Edit /xoops/modules/wordbook/blocks/entries_top.php
and replace line 13 :
le="color: #000000"><?php global $xoopsDB, $xoopsModule, $xoopsUser;


with :
le="color: #000000"><?php global $xoopsDB;


edit /xoops/modules/worbook/blocks/entries_new.php
replace line 12 :
le="color: #000000"><?php global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser;


with :
le="color: #000000"><?php global $xoopsDB, $xoopsUser;


and finally, in /xoops/modules/wordbook/blocks/random_term.php replace line 13 :
le="color: #000000"><?php global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser;


with :
le="color: #000000"><?php global $xoopsDB, $xoopsConfig, $xoopsUser;


A side effect of the bugs of its blocks is that other modules "loose" their preferences (and many things else like comments).

Bye,
Hervé

2
Anonymous
Re: Guide, how to solve problems caused by Wordbook
  • 2008/10/15 9:33

  • Anonymous

  • Posts: 0

  • Since:


Excellent - thank you

3
McDonald
Re: Guide, how to solve problems caused by Wordbook
  • 2008/10/15 9:44

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Wordbook 1.16 has some overkill when it comes to the use of 'global'.

Ofter $xoopsUser is listed twice as you can see in entry.php:
le="color: #000000"><?php global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL;


Also, this typo has been found a few times:
le="color: #000000"><?php list($numrows) = $xoopsDB -> fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB -> prefix("wbentries")." WHERE submit = 'O' AND offline = '0'"));

This is line 155 from index.php.
Instead of submit = 'O' (Ooooh) it should be submit = '0' (zero).

I think that Encyclopedia, which is based on Wordbook 1.17 beta, has similar problems.

Who's Online

880 user(s) are online (794 user(s) are browsing Support Forums)


Members: 0


Guests: 880


more...

Donat-O-Meter

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

Latest GitHub Commits