[ABD] hanelyp fancy dice

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

The ACP issue might be a problem I had in development of the extension management code thinking the extension was "effectively installed" despite the extension code saying otherwise. So far the only fix I've found involved a manual edit to the database.

Incremented version number, project moved to *removed for security reasons*
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Hi,
Thanks for the new version. I installed and don't see an ACP menu. I do get the following but when I enable the extension:

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/ext/hanelyp/fancydice/ext.php:22)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/ext/hanelyp/fancydice/ext.php:22)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/ext/hanelyp/fancydice/ext.php:22)
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

a couple small changes in git, disabled some debug code that was causing a warning, fixed a bug in ACP.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

If the ACP still isn't showing up with the new code:
disable extension.
open up the site database,
find in table *_migrations the record for this module,
change migration_data_done to 0,
reactivate the extension.

The core code is not bothering to ask the extension if install is complete so long as this flag is 1. It's a pain when working with an extension under development.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Thanks,
Will test later.
Btw remembered an old mod for 3.0 which had anti-cheat, maybe it can help? viewtopic.php?f=70&t=1816135

p.s. tested - deleted extension and data, no item appears in ACP after fresh install.
After changing migrations table manually, I got an error:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/hanelyp/fancydice/migrations/acp.php on line 70: array_merge(): Argument #1 is not an array

SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 [1064]

SQL

INSERT INTO phpbb3_bbcodes

BACKTRACE


FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 194
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/hanelyp/fancydice/migrations/acp.php
LINE: 71
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: hanelyp\fancydice\migrations\acp->add_bbcode()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 550
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 496
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 322
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 202
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 185
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 80
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/ext/hanelyp/fancydice/ext.php
LINE: 23
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 187
CALL: hanelyp\fancydice\ext->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 184
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

bug fix in git. rework with anti-cheat coming once I make another test pass here.

I took a quick look at the 3.0 mod. I think the method I've already written for anti-cheat is simpler.
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

rework for anti-cheat attempt 1 in github.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Now I get a settings menu, but it doesn't recognize language strings
Also, the following error when enabling, although it says it was successful.
[phpBB Debug] PHP Warning: in file [ROOT]/ext/hanelyp/fancydice/migrations/acp.php on line 89: opendir(cache): failed to open dir: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/ext/hanelyp/fancydice/migrations/acp.php on line 91: readdir() expects parameter 1 to be resource, boolean given
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 132: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
Will test anti-cheat tomorrow
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Reworked the code generating those errors (clearing cache), made sure it works on my system.

I hadn't noticed the language string issue on the left of ACP. One was missing a definition, but even fixing that it doesn't work. It's a head scratcher.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Hi,
No more errors when enabling extension.
Regarding language string, it seems that in phpbb official extension, they have a language file called something like "info_acp_boardrules.php" in which they define the module name.
Maybe something like that will work?
Now I see the dice in the bbcode list, which is great.

However when I send a message in the frontend I code an error 500 with no details :(
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Got the ACP language working on my dev board. languages/en/info_acp_<name>.php Uploads coming when I have something else to upload.
However when I send a message in the frontend I code an error 500 with no details
Can you describe your exact procedure? I'm not seeing that error here. Can you get to any error logs on your testing board?
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

Done an uninstall (disable, delete data, delete files with FTP)
Re-install (upload latest files from github + enable)
Still get error 500. Not sure how can I get more info about it (phpbb log files? where are they located?)

Currently at the dice roller ACP I have only:
base name - d, definition - @[1_>]
bbcode is:

Code: Select all

#[dice\s+seed={number}\s+secure={simpletext}]{text}[/dice]#ie
html replacement is:

Code: Select all

<blockquote>hanelyp\fancydice\event\main_listener::singlet()->replace_dice("{text}",{number},"{simpletext}")</blockquote>
Not sure what else to report - environment is mariadb 10.0.17, php is 5.4.39
I'm using IE11

It did work with 0.2
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

php errors are typically recorded with web server logs.

I have php 5.5.23 installed here, using mysql. A problem related to a too old php should still give a coherent error message.
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [dev]hanelyp/fancydice

Post by koraldon »

That's the error

Code: Select all

Fatal error: Call to undefined method hanelyp\fancydice\event\main_listener::prep_dice() in /home/pundak/public_html/forums/includes/message_parser.php(73) : regexp code on line 1
User avatar
hanelyp
Registered User
Posts: 124
Joined: Wed Apr 02, 2014 10:20 pm

Re: [dev]hanelyp/fancydice

Post by hanelyp »

Not entirely sure how, but the git repository had gotten out of sync with working code. updates in github.

Return to “Abandoned Extensions”