31
Eunydd
Theme Administration User Interface
  • 2/20 11:06

  • Eunydd

  • Just popping in

  • Posts: 8

  • Since: 2022/10/8


Theme Administration UI

I float this as an idea having found the need to hack template code even to make simple changes very frustrating - which possibly puts off new xoops users altogether. One of the first things you do is pick a Theme for your site (xSwatch4 in my case). These are invariably Responsive 3 panel, 2 header, 2 footer designs because this meets most needs - you only need one or two. A Theme Administration UI, enabling editing of site name, logo, colour scheme etc. would get people up and running very quickly and encourage further use methinks.



32
Mamba
Re: Choice of editors for the Newbb module

Please keep us posting!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



33
Mamba
Re: Protector Module - Error : TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool

Great to hear that you've fixed that!

Thanks for letting us know!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



34
Eunydd
Re: Protector Module - Error : TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool
  • 2/9 16:53

  • Eunydd

  • Just popping in

  • Posts: 8

  • Since: 2022/10/8


Thanks, this hinted at a Permissions problem and once I had mastered PHP Error Logging the fix was straightforward.

The PHP Error :
Warning: fopen(/var/local/lib/xoops/data/protector/configcachea07794): Failed to open stream: Permission denied in file /var/local/lib/xoops/lib/modules/protector/class/protector.php line 184
Error: TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in file /var/local/lib/xoops/lib/modules/protector/class/protector.php line 185

Fix:
Change directory/file Ownership to root:www-data and Permissions to 0775/0664



35
Skype-Fr
Re: Choice of editors for the Newbb module
  • 2/9 16:00

  • Skype-Fr

  • Just popping in

  • Posts: 37

  • Since: 2006/4/27


Hi Mamba,

This code causes the HTTP : ERROR 500 !

I'll keep looking on my side ...

G.



36
Mamba
Re: Protector Module - Error : TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool

I installed XOOPS 2.5.11 on PHP 8.2.27 and also on PHP 8.4, and couldn't replicate the error.

This error happens normally when you want to open a file using
fopen()
do something, and then want to write the results to the file using
fwrite()


When the file couldn't be open in the first place, then fopen() will be false, and you will get your error when you try to write to that file

So you would need to place a check for false before you fwrite()

In code like this:

$fp = @fopen($protector->get_filepath4group1ips(), 'w');
        if (
$fp) {
            @
flock($fpLOCK_EX);
            
fwrite($fpserialize(array_unique($group1_ips)) . "n");
            @
flock($fpLOCK_UN);
            
fclose($fp);
        } else {
            
$error_msg .= _AM_MSG_GROUP1IPSCANTOPEN;
        }


you could check for false:

$fp = @fopen($protector->get_filepath4group1ips(), 'w');
if (
false !== $fp) {


or you could check for false and use Exception:

$fp = @fopen($protector->get_filepath4group1ips(), 'w');
if (
$fp === false) {
    throw new 
FileOpenException("Failed to open file for writing: $filePath (mode: 'w')");
}


Try one by one for the all the fwrite() cases within /xoops_lib/modules/publisher, and see if that helps to identify the issue.

Let us know if that helped to identify the issue.

Also, if I remember correctly, somebody said that there were some problems with an installation provided by the ISP, so you might download the full XOOPS 2.5.11 and reinstall it.

If this is a testing site, you might also download the Beta of XOOPS 2.5.12 and see if the problem is still there.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



37
Eunydd
Protector Module - Error : TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool
  • 2/8 20:21

  • Eunydd

  • Just popping in

  • Posts: 8

  • Since: 2022/10/8


I have a clean install of Turnkey Linux XOOPS 18.0 appliance running in VirtualBox 7.1.6 (no Guest Additions). This installs without error and initially XOOPS runs without error : the only modules present are System, Private Messaging, User Profile and Protector. However when I amend Protector Preferences there is a fatal error (even when nothing is actually amended but Go is pressed) :

Error : TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given

The same is true after applying Updates to all four modules, which are error-free in themselves.

My debugging skills have reached there limit and I could do with some support. Any ideas?
Thanks.

XOOPS 2.5.11 Stable
Protector 3.6.2_Stable
PHP 8.2.26
MySql 10.11.6-MariaDB-0+deb12u1
Apache 2.4.6.2



38
Mamba
Re: Choice of editors for the Newbb module

for the viewtopic.php you can try:
if (!empty($GLOBALS['xoopsModuleConfig']['rss_enable'])) {
    
$header $xoopsTpl->getTemplateVars('xoops_module_header');
    
$rssLink '
    
$xoopsModule->getVar('name') . '-' $forumObject->getVar('forum_name') . '" href="' XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/rss.php?f=' $forumObject->getVar('forum_id') . '" >';
    
$xoopsTpl->assign(
        
'xoops_module_header',
        
$header $rssLink $header $rssLink
    
);
}
For the moderator issue I would have to first replicate it.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



39
Skype-Fr
Re: Choice of editors for the Newbb module
  • 1/31 19:28

  • Skype-Fr

  • Just popping in

  • Posts: 37

  • Since: 2006/4/27


For the time being, I'm going to leave the choice up to the publishers, because it's not a blocking issue.

As for the missing moderation, while waiting for a ‘clean’ solution, I've modified the function newbbIsAdmin() to force ‘Admin’ status for 2 uid ... and it works.



40
Skype-Fr
Re: Choice of editors for the Newbb module
  • 1/31 18:52

  • Skype-Fr

  • Just popping in

  • Posts: 37

  • Since: 2006/4/27


No real errors, just a few reports of obsolete code ... like :

"XoopsTpl::get_template_vars is deprecated, please use getTemplateVars trace: /class/template.php:654 /modules/newbb/viewtopic.php:179"

I know how to correct this kind of error but I don't think it will have a different result ...





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



Login

Who's Online

186 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 186


more...

Donat-O-Meter

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

Latest GitHub Commits