81
geekwright
Re: total number of search result in search php

There is no point in the XOOPS search process where a total number of results is calculated. The individual module search functions respond to a limit (maximum number of results to return) and offset (skip over this many results before a set of at most 'limit' results.) No totals are generated.

I would assume this design was intended to limit the potential database load for each search transaction.



82
geekwright
Re: Error during the installation initial setting

Try changing the MySQL host to "127.0.0.1" instead of "localhost".

By default the installer will use "localhost" as the MySQL host. In some stacks on some versions of Windows that will cause issues. The underlying issue is each connection experiencing a time out waiting on a response from MySQL due to IPV6 vs. IPV4 versions of localhost.

There is a longer discussion of this here:https://xoops.org/modules/news/article.php?storyid=6758



83
geekwright
Re: xoops 2.5.9 installation with non-english language

Quote:

aerograf wrote:
If you install xoops by default, with English, some variables are written to the database, which you can then change only through the mysql editor.
For example table profile_field


There is no provision in the profile module to localize the strings in profile_field. You can create totally new fields, so it is possible no language constant ever existed. Only the initial setup uses the constants, after that whatever is entered in the profile module admin area is used.

If another language is properly installed as the default when the profile module is installed, it should use that language as the starting values in profile_field. To dynamically translate the profile_field field_title, you would need to use a multi-language hack like xlanguage.

Also, I think Michael is correct that the admin page screenshot issues are strings in the new transition theme:
modules/system/themes/transition/language/english/admin.php

Add translations for that file, and it should fix that issues.



84
geekwright
Re: New 2.5.9 install path problem

Quote:

Dante7237 wrote:
...
So you're telling me that the installer will prompt me for input rather than expecting paths to be present in mainfile?


Right! There is no mainfile.php before the installer runs. Enter the correct paths when prompted, and it will verify them. After that, the installer will create the new mainfile.php once all the needed information has been gathered.

Here is the relevant documentation on GitBook.



85
geekwright
Re: Error when trying to edit an article on publisher

Looks like we got a little detail out of sequence.

The Xmf\Request::hasVar() method was added to XMF after XOOPS 2.5.8 was released. The current Publisher version was developed along with XOOPS 2.5.9, which does include that method. I'm not totally sure, but it looks like it was my mistake. Sorry!

There are a couple of ways you could fix it today.

If you are comfortable using composer, running the following command in the class/libraries directory would update XMF to the current version:
composer update


Alternatively, you could update just the Request class file, by copying this file:
https://raw.githubusercontent.com/XOOPS/xmf/v1.2.10/src/Xmf/Request.php

over this file in your XOOPS installation:
class/libraries/vendor/xoops/xmf/src/Xmf/Request.php

Either one of those should get you through the error you are encountering.



86
geekwright
Re: Protector and Bad Ips

Actually, that looks like it is working.

Protector's bad IP works at the application level. That means Apache still gets the request, and launches the task. Protector checks the list, and when it matches, it sends out a short message like "You are registered as BAD_IP by Protector." Then it ends the task.

In the apache log, that will still be a 200 (found) with a small byte count.

In your log screen shot, all the 216.244.66.230 requests are logged as:
...HTTP/1.0" 200 289 "-"...

The 289 is the byte count of the reply, which is about right for the banned message, and much too small for a real page view.

That indicates that it is doing what it is supposed to do. To stop the transactions completely would require a firewall that stopped the requests before they reached Apache. The protector filter is just minimizing the load as best it can from inside the PHP script.



87
geekwright
Re: Protector and Bad Ips

Ending with a dot should ban everything that matches up to the dot, i.e. 216.244.66. will ban 216.244.66.1, 216.244.66.2, 216.244.66.3, etc.

I've tested that on 2.5.7 and 2.5.9, and both are working as expected here. (The code changed to support IPV6 between the two versions.)

If there was a problem reading or writing the xoops_lib/modules/protector/config/badips file, you would be able to see that in the protector center.

I'm not sure what is going on in your case, as it works here.



88
geekwright
Re: Protector and Bad Ips

The wildcard is supposed to be ending the address with a dot, i.e. 216.244.66.

What XOOPS version are you using?



89
geekwright
Re: Xoops Tags and char limit in modules

Quote:

Bleekk wrote:

Does this also prevent that xoops tags will be counted as chars?


Sorry, I misread things.

That works on HTML, not XoopsCode.

You would render first with MyTextSanitizer::xoopsCodeDecode(),
then crop the resulting HTML,
then run through that code to make sure the result is valid.

It isn't perfect, but it should fix the "article destroys the design of the complete website" issue.

Since some modules/configurations might allow HTML, a solution that works with the HTML would be best? We should have a standard function to do that, but we don't yet. Its on my list now.



90
geekwright
Re: Xoops Tags and char limit in modules

You can't just cut out a section and expect it to be valid -- you need to work with the DOM.

This sample code takes whatever you cropped, and turns it into valid HTML with all the tags closed:
// $croppedInput is your cropped summary
$doc = new DOMDocument();
$doc->loadHTML($croppedInput);
$docBody $doc->getElementsByTagName('body')->item(0);
$validOutput '';
foreach (
$docBody->childNodes as $childNode) {
    
$validOutput .= $doc->saveHTML($childNode);
}
// $validOutput should now be valid HTML




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 22 »



Login

Who's Online

221 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

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

Latest GitHub Commits