[3.2][3.3][DEV] Hangman - Resurrected

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Midway
Registered User
Posts: 76
Joined: Tue Dec 09, 2014 8:02 pm

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Midway »

No problem,

Very thanks to rmcgirr83 ce big boss ;)
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Mike-on-Tour »

Version 0.2.3 is available on GitHub and through the Download-Link in the OP, changed/new features:
  • Fixed the overlapping of the Quick links dropdown menu
  • gif images replaced with svg images, future scope of enlarging the graphics
  • ACP contains a button (and a warning notice since this is irreversible) to clear the highscore table (Thanks to RMcGirr83 for the PR). Following 3Di's hint on GitHub this is done with a DELETE FROM command instead of TRUNCATE so it should work in SQLite too
  • All frontend HTML and css files have been changed in a manner that only phpBB style elements are used, thus ensuring that display is coherent with all styles based on prosilver
  • Letters used in game and term input tabs are now derived from the boards default language and no longer from the current users language thus ensuring a common character set for all users of a board.
    Terms input by users will be checked against those characters and an error message will be displayed if invalid letters are used (e.g. German "Umlaute" on a board with BE as the default language)
To install this version please adhere to this sequence to avoid later difficulties caused by remaining files from earlier versions:
  1. Deactivate the extension
  2. Delete ALL subdirectories and files from the /ext/mot/hangman directory
  3. Upload all subdirectories and files from the locally unzipped package
  4. Activate the extension
Have fun and I'm looking forward to your comments.
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by 3Di »

Mike-on-Tour wrote: Tue Mar 09, 2021 1:03 pm ...
  • ACP contains a button (and a warning notice since this is irreversible) to clear the highscore table (Thanks to RMcGirr83 for the PR). Following 3Di's hint on GitHub this is done with a DELETE FROM command instead of TRUNCATE so it should work in SQLite too
Sorry not, your change is wrong.
I posted the right code here https://github.com/Mike-on-Tour/hangman ... #r48006983

DELETE FROM is correct for sqlite3 but not for all the other DMBS which use TRUNCATE TABLE
therefore you should implement the code I posted over there. :)

Code: Select all

	switch ($db->get_sql_layer())
	{
		case 'sqlite3':
			$db->sql_query('DELETE FROM ' . HANGMAN_SCORE_TABLE);
		break;

		default:
			$db->sql_query('TRUNCATE TABLE ' . HANGMAN_SCORE_TABLE);
		break;
	}

🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Miri4ever »

Looking much better now and also the tabs looking nice. Just some input boxes has no class definition inside, thats why they still appear white but this can easy be done with adding:

class="inputbox autowidth"

to get the correct colors if people using differ theme backgrounds. Also changed this line to class="button" for see the button on each style people use.

<dd><input id="start_button" class="button" type="button" value="{{ lang('HANGMAN_NEW_QUOTE') }}" onclick="hangman_start();"></dd>

And the hangman images did not display because they don't make the correct forum path. They forgot the subfolder if people use one.

I got:

xxxx.de/ext/mot/hangman/styles/all/theme/images/hm4.svg

instead of the correct:

xxx.de/yyyyy/ext/mot/hangman/styles/all/theme/images/hm4.svg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Miri4ever »

Ok made some fixes inside the JS Files and the templates for match better also with dark styles. This looks like it now:
Attachments
22.jpg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Miri4ever »

But I was not able to find this one to be fixed and this image to be removed. Inside the folders there is no kind of this image and all this white. There I need some help to do.
Attachments
11.jpg
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Mike-on-Tour »

It does look really nice with your changes. Dr.Death did the same on the GitHub repository by adding the class bg2 to the input fields - in case you would like to see his changes.

I experienced today the issue with the path to the images on one of my test boards myself, it's been solved by inserting the ROOT_PATH variable in the hangman_game.js file:

Code: Select all

var imagePath = '<img src="' + jsRootPath + 'ext/mot/hangman/styles/all/theme/images/hm';
with the following line inserted into the hangman_game.html file somewhere in the trailing script section:

Code: Select all

var jsRootPath = '{{ ROOT_PATH }}';
I have no idea where this funny Easter image comes from. This is none of my code since this is the output of line 271 in the controller/main.php file:

Code: Select all

trigger_error($this->language->lang('HANGMAN_WORD_EXISTS') . $this->back_link($this->u_action, $this->language->lang('BACK_TO_PREV')), E_USER_WARNING);
trigger_error is a PHP function also used by phpBB core files and it uses some phpBB style stuff because with prosilver it looks like this (the wording is in German):
Screenshot_Hangman_Info.png
Screenshot_Hangman_Info.png (3.94 KiB) Viewed 4668 times
A wild guess would be that yours does come from inside one of phpBB's image folders, perhaps you've already found an easter egg? :shock:
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Miri4ever »

Easter Egg was the right point out to find this kind of thing. It's funny I just saw it on this Hangman Game and not anywhere else, but now I got this fixed. It came from a easter event extension.

For the JS File.

For the filename of the Images I was pretty sure I just removed one for the two dots from the link as:

Code: Select all

var imagePath = '<img src="./ext/mot/hangman/styles/all/theme/images/hm';
But can't reproduce this anymore, its working but my code still showing the .. dots instead of one, but your solution seems much better.

Inside this Part for the Letter Buttons I changed class="letter-buton" to class="post" it looked best on my style but you also can use only class="button" but then some buttons got the differ size and not sure if class="button1" working on all styles for smaller buttons.

Code: Select all

		row1.innerHTML = row1.innerHTML + '<td><input type="button" class="post" id="' + letters[i] + '" value=" ' + letters[i] + ' "	onclick="seek(\'' + letters[i] + '\');" class="alpha-butt"></td>';
	}

	for (i = letterRow; i < letterCount; i++) {
		row2.innerHTML = row2.innerHTML + '<td><input type="button" class="post" id="' + letters[i] + '" value=" ' + letters[i] + ' "	onclick="seek(\'' + letters[i] + '\');" class="alpha-butt"></td>';
	}
Inside hangman_game:

I change the START Button Code to this, because the button also was not to see:

Code: Select all

<dd><input id="start_button" class="button" type="button" value="{{ lang('HANGMAN_NEW_QUOTE') }}" onclick="hangman_start();"></dd>


I just put button inside the class field. And changed the textbox field:

Code: Select all

<textarea class="post" onfocus="word.blur();" name="word" cols="100" rows="2">	{L_HANGMAN_NEW_QUOTE_START}</textarea>
And each line of input code got at least a class definied, this can be bg1, bg2, post, panel this should all work with prosilver.

Inside Hangman.html

I got a double outside border in my style and need to remove this one class="page_body", don't know how it looks on prosilver but normal this does no file need.

Code: Select all

	<div id="page-body" class="page-body">
And on the CSS File I removed this line from the Image Display:

background: white;

this is not need and we can not tell what kind of background a user uses, so we can't put in there a white color.

I think those are the most changes I made yet to the code. And I like this TAB Idea much, and will maybe need to add this to my own games I got too, it just looks nicer and gives more room to play.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Mike-on-Tour »

Version 0.2.4 is available through the link in the OP and on GitHub, changes are:
  • This release incorporates all pull request since ver 0.2.3
  • Table names have been changed to avoid conflicts with another extension using identical table names, existing tables are "renamed" with migration file
  • Messages to the user are now displayed with a modal window instead of using Javascript's alert window thus giving more freedom in styling the output
  • The letter container in the game tab is no longer a table but a div to enhance display on mobile devices
  • The minimum width for the Hangman panel was removed to enhance display on mobile devices
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Mike-on-Tour »

Version 0.2.5 is available through the link in the OP and on GitHub, changes are:
  • All links are now defined as routes
  • All tabs are responsive
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
User avatar
Miri4ever
Registered User
Posts: 608
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Miri4ever »

All working nice and no dark style problems so far. My members love this we can put in questions they need to play inside the game and after they solved those, they can post the answer to this question in the chat. Another way of nice interacting game play.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Games Solitaire, MChat Poker, MChat Black Jack, MChat Cards, MChat Trivia
PHPBB Special Effects, Mousepointers, X-Mas Themes and Designs for PBWoW Style.
Supported work: (**New Updated** UCP Sidebar), Tables, Hide, PBWow3 Style
testingmro
Registered User
Posts: 74
Joined: Mon Mar 15, 2021 1:56 pm

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by testingmro »

We just installed on our forum, the fun is epic :-). Unfortunately it hit 2x with an error when adding new term, I am supposed to get some picture of the error then I will send it. But it worries me that used terms are being deleted... Counting quickly just today we added 260 termsto the database, at the moment there are already 80.... I think that it is not good to delete them...
Should they be randomized and given the frequency of the most number of times they were used? Some mechanism to balance it. If we allow this database to grow, there will be no chance that they will be repeated by the same person. But if the database is empty, they will start to complain, or I will just have to add something every time :-).
Maybe I'll add an option at the beginning so it won't erase after being used, even if it goes round and round.... without any randomization, but not to be deleted... It would also be nice if you could add more mass words. Maybe set some separator so you can add 30 at a time?
testingmro
Registered User
Posts: 74
Joined: Mon Mar 15, 2021 1:56 pm

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by testingmro »

There is a big issue to be fixed!
When im playing (when i pressed start and term is presented to me) and if im trying to escape from answer i should be treated as escaping and penalty should be counted. same as for no resolving terms. :D :D :D (perhaps some popup before? like "yours match is not finished yet, you will be punish if you escape!"
I heave noticed that if someone is "almost hanging" , they escaping... just pressing the board logo or menu... cheaters! :-)
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by Mike-on-Tour »

I will look into deleting the used terms but not now since I'm deep into developing the Usermap.
Same with the "cheaters" issue.
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
testingmro
Registered User
Posts: 74
Joined: Mon Mar 15, 2021 1:56 pm

Re: [3.2][3.3][DEV] Hangman - Resurrected

Post by testingmro »

Mike-on-Tour wrote: Sun Apr 04, 2021 5:23 pm but not now since I'm deep into developing the Usermap.
thumbsUP!

In meantime one more idea.
While adding a new term there is no need to go to another screen after pressing enter, current workflow is:
1. input new term
2. press enter
3. system is taking me to another screen with info about number of point i gather for adding new term and some option, (new game, add new term or info that term was already in database etc)
4. I have to take hand off keyboard, move mouse and again choose "add new term"
5. It takes me to adding term screen but cursor is not in field so i have to move mouse set cursor in field

I can add new term.

so one term is 5 steps.
Info about new game and score table is not nesessery because its still visible in menu. So i think there should be no other screen after pressing enter.
We should stay in same screen all the time
After pressing enter there could be some one row info like: last added word: XXX , total points from adding new terms in this session : XXX

and the workflow should be:
1. Input new term
2. pressing enter (last added word and total points updated so i can see it was ok, if not it should show info that this word was already in database)

Cursor should wait in input field after pressing enter so we have 2 steps and we can add terms one by one without taking hands off the keyboard.
Proven in tests ;-)
hang.PNG
Post Reply

Return to “Extensions in Development”