31
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



32
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



33
Mamba
Re: Choice of editors for the Newbb module

I don't know if PHP 7.3.33 is the problem.

When you turn on the Debug (inline mode), are you getting any errors. If yes, please post them here for each problem, especially those that point to a file and line number, and I'll look into it.

Please also include info about your current NewBB configuration to make sure that I can reproduce the issues here.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



34
Mamba
Re: Choice of editors for the Newbb module

You can set in the module permissions:
see: https://xoops.gitbook.io/newbb-tutorial/2administration

Just disallow: "Can use and disable/enable HTML in posts"

You have two options:

1) Set "default" template for all forums/groups:
Resized Image


2) Set by group:

Resized Image


You can also set the DHTML for yourself as a Webmaster, if that's your preference.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



35
Mamba
Re: AI circumvent anti spamm

Resized Image


BTW - I love your statement on your website!!! Best testimonial we could wish for!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



36
Mamba
Re: AI circumvent anti spamm

This is the first time I hear of that.

Do you enforce during registration that the user has to confirm his email? If not, you should!

Are these two sharing same or similar IP address? If yes, you could block it

And how do you know that it was a bot, and not a person who first registered with your website, and who is paid for promoting some stuff?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



37
Mamba
Re: Help to import database

Happy Holidays to you too!!!



Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



38
Mamba
Re: xoops_redirect

You might limit registrations by forcing them for your approval. Once you see where they are coming from, you can ban the IP or email addresses
You could also add CAPTCHA to registration.

Other ways to consider

1) ModSecurity Rule (if you use ModSecurity):
# Detect multiple occurrences of xoops_redirect
SecRule ARGS_NAMES "@streq xoops_redirect" "chain,phase:2,deny,status:403,id:1000"
SecRule &ARGS_NAMES:xoops_redirect "@gt 1"


2) URL Rewriting Solution (Apache):
# Keep only the last xoops_redirect parameter
RewriteCond %{QUERY_STRINGxoops_redirect=([^&]+).*xoops_redirect=([^&]+)
RewriteRule ^(.*)$ $1?xoops_redirect=%[R=301,L]


3) Other possible options:

- Implement rate limiting for requests containing xoops_redirect
- Validate redirect URLs against a whitelist
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



39
Mamba
Re: XOOPS MyMenus 1.54.0 Beta 10

No plans on my side (because of lack of time), but if somebody submits code for it, then, of course, we could include it.

It would be definitely nice to be able to select an icon library in the preferences of MyMenus.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs



40
Mamba
XOOPS MyMenus 1.54.0 Beta 10
  • 2024/11/18 11:08

  • Mamba

  • Moderator

  • Posts: 11455

  • Since: 2004/4/23


Please test MyMenus 1.54 Beta 10

Changelog:

- add option to use font awesome icons (liomj/mamba)
- fix cloning of links (liomj/mamba)
- fix return to the same menu after delete of links (mamba)
- escape column names with backticks (mamba)
- fix pagination of menus (liomj/mamba)
- add new skins: imageonly, xswatch4 (liomj)

HELP NEEDED

We'll need some help from designers to do some magic with the skins.
Some of the skins seem to be outdated, so we need a refresh:

a) fix those skins that are fixable
b) remove the skins that are totally outdated
c) add couple of new and attractive skins

Who could help us with it?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs




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



Login

Who's Online

188 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 188


more...

Donat-O-Meter

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

Latest GitHub Commits