1
zyspec
Re: Mymenus Module with XOOPS 2.5.11-Stable
  • 1/15 16:31

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Sorry... rename is from ./mymenus/class/registry.php to ./mymenus/class/Registry.php - dumb autocorrect got me again.



2
zyspec
Re: Mymenus Module with XOOPS 2.5.11-Stable
  • 1/12 21:01

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Version mymenu version 1.54 Beta 2
This may not be the problem (I haven't tried loading the module yet) - but depending on OS and version of PHP, etc. the case of the file name matters. You may want to rename ./mymenus/class/registry.php to ./mymenus/class/Registry.com and the same with the builder.php file (to Builder.php). Then "update" the module. It could be the reason the Mymenus\Registry::getInstance() isn't loading correctly.

Version mymenu version 1.54 Beta 5
Is this a fresh install or did you update a previous version. There's a note in the update script that says
//TODO replace mymenus_block.html in newblocks table with mymenus_block.tpl


I suspect this is part of the reason it's still a BETA release - the update scripts aren't complete yet. You might look at the db table and see what it contains for the template (mymenus_block.html or mymenus_block.tpl).



3
zyspec
Re: where utf8mb4 protector table can not creat
  • 2021/12/9 17:47

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Thanks for the information.

As you stated above, the current code looks like:

CREATE TABLE log (
  
lid mediumint(8unsigned NOT NULL auto_increment,
  
uid mediumint(8unsigned NOT NULL default 0,
  
ip varchar(255NOT NULL default '0.0.0.0',
  
type varchar(255NOT NULL default '',
  
agent varchar(255NOT NULL default '',
  
description text,
  
extra text,
  
timestamp DATETIME,
  
PRIMARY KEY (lid) ,
  
KEY (uid) ,
  
KEY (ip) ,
  
KEY (type) ,
  
KEY (timestamp)
ENGINE=MyISAM;

CREATE TABLE access (
  
ip varchar(255NOT NULL default '0.0.0.0',
  
request_uri varchar(255NOT NULL default '',
  
malicious_actions varchar(255NOT NULL default '',
  
expire int NOT NULL default 0,
  
KEY (ip),
  
KEY (request_uri),
  
KEY (malicious_actions),
  
KEY (expire)
ENGINE=MyISAM;


Can you try the following to see if it resolves the issue you're seeing? As you have determined the keys are too long for MySQL 8. I've made some minor changes to what you've found to attempt to minimize the length of keys where appropriate to cover a majority of the cases. Unfortunately it's difficult to set an exact key length for some of the keys since the length of data in those fields can vary quite a bit.

CREATE TABLE log (
  
lid mediumint(8unsigned NOT NULL auto_increment,
  
uid mediumint(8unsigned NOT NULL default 0,
  
ip varchar(255NOT NULL default '0.0.0.0',
  
type varchar(255NOT NULL default '',
  
agent varchar(255NOT NULL default '',
  
description text,
  
extra text,
  
timestamp DATETIME,
  
PRIMARY KEY (lid) ,
  
KEY (uid) ,
  
KEY (ip (50)) ,
  
KEY (type(64)) ,
  
KEY (timestamp)
ENGINE=MyISAM;

CREATE TABLE access (
  
ip varchar(255NOT NULL default '0.0.0.0',
  
request_uri varchar(255NOT NULL default '',
  
malicious_actions varchar(255NOT NULL default '',
  
expire int NOT NULL default 0,
  
KEY (ip(50)),
  
KEY (request_uri(192)),
  
KEY (malicious_actions(128)),
  
KEY (expire)
ENGINE=MyISAM;



4
zyspec
Re: where utf8mb4 protector table can not creat
  • 2021/12/6 15:31

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Can you tell us what version of MySQL you are using?



5
zyspec
Re: Module translation and special characters
  • 2021/12/1 16:01

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Glad the explanation helped. In this case Cedric's change should fix this particular issue.



6
zyspec
Re: Module translation and special characters
  • 2021/12/1 3:41

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


The HTML 'id' has historically only allowed [A-Za-z0-9-_:.], and the string must start with [A-Za-z] and not be empty. In other words a '/', space or accented chars, etc. are not valid for an id attribute. For HTML5 the only requirement is that it can't be empty and can't contain a space.

Any code that uses a var for the HTML4 id should sanitize it first...

Maybe something like:
$idAttrib preg_replace('/^[A-Za-z]+([A-Za-z\d-_:.])*?$/''_'$id);
$idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty


For HTML5 just make sure that it's not empty and replace any spaces with an underscore. So something as simple as:
$idAttrib str_replace(' ''_'$id);
$idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty



7
zyspec
Re: New Theme on xoops.org to celebrate the release of PHP 8.1
  • 2021/11/24 15:17

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Looks great! Thanks Eren!



8
zyspec
Re: lostpass.php Have some error,On user by Gmail
  • 2021/11/23 16:27

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@cadch,

Does the code you posted above 'fix' the issue for you?



9
zyspec
Re: Overload the images on the search.php page
  • 2021/10/20 13:35

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@alain01,

The file you're checking for must be a path, not a URL. So chaine_surcharge should be something like:
/var/www/html/themes/mx-theme/modules/xmnews/assets/images/xmnews_search.png

use something like XOOPS_PATH, not XOOPS_URL to build the file location.



10
zyspec
Re: Overload the images on the search.php page
  • 2021/10/19 20:36

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@alain01

You should be able to just use something like this:
<{if file_exists($chaine_surcharge)}>
Found my file<br>
<{else}>
Unknown file<br>
<{/if}>




TopTop
(1) 2 3 4 ... 100 »



Login

Who's Online

165 user(s) are online (68 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

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

Latest GitHub Commits