Tourney Quick & Dirty Blinds Timer (1 Viewer)

HobokenNJ

Two Pair
Joined
Feb 6, 2019
Messages
299
Reaction score
524
Location
Hoboken
I've been moonlighting as a designer (see this thread), and now its seems I've also been moonlighting as a programmer.

Here's what I cooked up--a simple blinds timer (hopefully the link works -- it should be a video of the timer in action).

I added a walk-thru tutorial on installing the files below. The link for that version is here.

Background:

I wanted a simple blinds timer for me and my son. Ideally something that could be projected onto my tv.

Nothing I found online worked quite right (tried a lot of apps & web programs), so I decided to build something myself. I did have help. Essentially, I've updated a script I found online and added some enhancements. (A back button; nicer fonts; a break screen; a chip up screen; some rotating graphics...)

The script allows for some customizability (through editing text files) -- i.e., you can create your own blinds structures. The one catch is you need to install the files on a web server. Infinityfree (no affiliation) offers free hosting that sufficient to run this script.

Any interest?

If there's interest, I could upload/share the programming. I'd rather it not be widely distributed, but if there was a way of sharing only with PCF users that would be perfect.
 
Last edited:
I'd love to have esomething like this! Following with interest!
 
I'd love to have esomething like this! Following with interest!

I'm happy to share. I just don't know the best way of doing so. The files are about 6 megs in total -- mostly pictures.

EDIT: It looks like Google Drive permits shareable links. I'd prefer password protection, but if you're interested send me a message and I'll send you the link.
 
Last edited:
Here's a walk-thru on how to install the files.

INSTALLATION

Step 1: PM me for a link to the files. Download them & unzip them.
Step 2: Get a webhosting account. I'm going to sign up for https://x10hosting.com/ (no affiliation) for this walk-thru. The URL I picked was http://poker.x10.bz/

NOTE: I found using the "paper_lantern" theme much easier than the basic theme.

Step 3: Find how to upload the files. In the case of x10, there's a link in your account to "file manager".

Screen Shot 2019-09-28 at 5.48.55 AM.png

Step 4: Upload the 'php' files. The button looks like this for x10. They should go in the main folder. I had to do it file-by-file (not sure if there's a more efficient way). The other free webhosting service I mentioned (Infinityfree hosting) had a way of uploading multiple files at once. (NOTE: Once I used the "paper_lantern" theme, I was able to upload multiple files--see new post below)

Screen Shot 2019-09-28 at 5.50.15 AM.png

Step 5: Create a new folder called "pix".
Screen Shot 2019-09-28 at 5.55.40 AM.png

Step 6: Navigate to this folder. Upload all the images to this folder. Sorry there's so many files!

That should be sufficient to set up the basic framework. Go to your URL and see if it works!


Here are some options you can change:

1. Generic room name. Edit the file called "blinds.php". There's a line that says something like $roomname = "[---] Card Room"; Edit the text between the quotation marks to what you like.

2. Add New Blinds Structures. Copy the files called "blinds_x.php", "blinds_x_setup.php" & "blinds_x_alerts.php", where 'x' is one more than the last set of files. E.g., there are currently 3 versions, so the next set would have a '4' for the 'x'.

>> the first file contains the blinds structure. Maintain the same format for the blinds.
>> the second file (optional) lets you change the name for this particular version & rotate additional images on the left. (Upload files to your "pix" folder.)
>> the third file (optional) designates when breaks & chip ups occur.

After you've setup those files, update the "index.php" file. There's a line that says $versions = x; Change the x to the number of versions you now have--e.g., 3 becomes 4. You can also add a name & tooltip for your new version. The name is added by creating a line that says something like: $name[x] = "[NAME]"; (where 'x' is the version number) and the tooltip is created by adding a line that says something like: $tip[x] = "[info about blinds]"; (where 'x' is the version number)

Be careful about adding special characters between the quotation marks.

CONCLUSION

Yes, this is a little messy. But it meets my needs and is sufficiently customizable. I hope you find it useful too.
 
Last edited:
One more tip. The times shown in the front page table are customizable as well. Open the "index.php" file and edit this line: $time = array(3,4,5,6,10,15,20,30,60);

Change those numbers to the minutes you'd like in your table. Each separated by a comma (with no comma on the end.)

You can also manually change the time per round -- for, e.g., if you wanted a 348 seconds for each round edit the URL: http://poker.x10.bz/blinds.php?v=1&dur=348# to change the number after "dur=" (value is in seconds).
 
I found x10 hosting works much better using the "paper_lantern" theme (& more like Inifinityfree hosting). It really should be the default. Click the "switch themes" at the upper right part of the home page. Select "paper_lantern". Much better.

Screen Shot 2019-09-28 at 9.43.55 AM.png
 
I was inspired by this thread regarding Poker Genie and decided to update my blinds timer to make it a touch more user friendly.

I'm happy to announce: My quick & dirty blinds timer has gotten quicker and dirtier. Please visit http://poker.x10.bz/ for a demo of the newest version.

What has changed?
  • You can now set up an 'ante file' to add antes to your preset structures.
  • More importantly, the script now accepts a copy-and-paste of a blinds structure generated in PokerSoup (no affiliation) to allow you to quickly set up a customized blinds timer. You can also add your own room name and select the stages for breaks & color-ups.
    • I think this should make this script useful to a wider audience.
A few easy steps:
  1. Visit PokerSoup and use their blinds structure calculator to generate a blinds structure you're happy with.
  2. Copy the 'copy-friendly blind list' (cmd-c / ctrl-c). See Picture 1. You can edit the structure by hand as long as you maintain the same format.
  3. Paste that list into the "quick setup" page (cmd-v / ctrl-v) and click 'submit'. See Picture 2. The URL for this page on my demo site is: here.
  4. On the next page, finalize your options (room name; stage length; etc.) and hit submit.
  5. Enjoy!
I use this script often. (Originally was using Chromecast onto a tv screen. More recently my iPad.) Hopefully it's of some use to you too! :)

(I'm still working to clean up my files. I will make these files available to PCF members to install on their own server upon request. The benefit of installing on your own server is you can swap out the rotating images and set up preset structures. Plus, hard to say when the free hosting services I'm using will cease to exist.)

I'm not a programmer or designer (or in a particularly creative field) so gentle feedback is appreciated.

Picture 1:
Screen Shot 2019-11-11 at 7.18.47 PM.png


Picture 2:
Screen Shot 2019-11-11 at 7.19.08 PM.png
 
Excellent, much appreciated. This does everything I need from a blind timer, no download, and I can save a structure as a really simple text file (likely in my email account so it doesn't matter what machine I'm on). Seems you can even edit the text if you're not happy with PokerSoup's algorithm.

Didn't run my test long enough to figure out, does it make a sound at level change? If so, it's got everything I'd really want. Probably takes some more elaborate work, but if I were feeling really ambitious and actively looking to make additions, a slider for the time within levels might occasionally be useful.
 
Didn't run my test long enough to figure out, does it make a sound at level change?

Thank you for the kind words.

I think it is supposed to as there's a link to a sound file in the script. If it doesn't work I'll tinker with it, and try to figure out something. I may need to look into a good public domain sound file.

EDIT: Fixed to play a sound on level change.

if I were feeling really ambitious and actively looking to make additions, a slider for the time within levels might occasionally be useful.

That may be beyond my skillset, but -- you're right -- when me and my son use it we sometimes would like to advance/reverse time. I was thinking buttons that +/- 30/60 seconds might be a fix within my abilities the next time I update the file.
 
Last edited:
I can save a structure as a really simple text file (likely in my email account so it doesn't matter what machine I'm on)

I've come up with something even simpler than that. I've updated the script so if you provide your 'custom code' the script will retrieve your saved blind structure.

Any PCF member is welcome to add a blind structure to the demo site (or a couple, within reason). Steps:
  1. Send me (in a DM) your copy-and-pasted friendly blind structure from PokerSoup.
  2. Also include your room name and if you have a preference for a sound that plays at the end of a level (or no sound at all). Choices are listed on the demo site. You can also set a default as to whether the timer pauses at the end of each stage.
  3. You can also set up the default 'breaks' and 'color up' rounds. Just send me the list of the stages where you want a break / color up to appear before.
  4. I will send you back a 'custom code' that will let you retrieve your blind structure easily from the home page.
A few examples of saved structures are available on the demo site now.
 
Last edited:
a slider for the time within levels might occasionally be useful.

I've updated to include a progress bar at the bottom of the screen. You should be able to click on the progress bar to move the time in the current level. It shows up as a blue bar on my laptop:

Screen Shot 2019-11-12 at 9.05.32 PM.png


Thank you for all the good feedback, @Sunshine . Here's the updates I've added because of your comments:
  • Multiple different "end of level" sounds to pick from.
  • A 'custom code' option that lets PCF members save their blind structures. Instructions above.
  • A progress bar that can be used to change the time in the current level.
I'm really liking these changes. :)

EDIT: Still not ready for prime time. There are some bugs I need to chase down. I'll probably take a break and come back to this in a few days.
 
Last edited:
I'm pleased to announce an updated version of my quick & dirty blinds timer (borrowing heavily from a previous project). Special thanks to the thoughtful feedback above.

You can see (& use) the demo site at: http://poker.x10.bz/

There are three options for setting up new blinds structures:
  • Original Quick & Dirty. I had originally envisioned folks downloading the script, uploading to their own website, and hard coding structures. This is still possible, but is now the least convenient option.
  • New Recipe Quick & Dirty. People can also copy-and-paste a blinds structure created at PokerSoup (no affiliation), and a new blinds timer will be generated. The script will let you select levels you want a break or a color-up. (As long as you keep the same format, you can edit the text to change the PokerSoup outputs.)
  • Extra Crispy Quick & Dirty. If you DM me your blinds structure (in PokerSoup format), I can save your structure on the demo site. You can access this using a custom code. I can also save your default room name and end of level sound, as well as break and color up levels.
Features:
  • You can choose for a number of different 'end of level' sounds. Or, if you'd like, you can use no end of level sound.
  • You can have the timer pause at the end of each level. Or, you can have the timer keep running. (My son and I play with short levels so we like to pause often.)
  • You can click on the 'progress bar' to change the amount of time remaining in a level.
Hopefully this is useful to you. :) Demo site: http://poker.x10.bz/
 
Last edited:
Used it for a tournament for the first time this past Friday. We had been on a streak of playing cash games for a while. Worked great and has everything I need. Only comment comes from a buddy of mine who changed the font and made it bold for the minute:sec numbers for legibility from across the room.

Thanks again for an effective solution!
 
Only comment comes from a buddy of mine who changed the font and made it bold for the minute:sec numbers for legibility from across the room.

Thank you for the feedback. Do you know the font, size, etc. your friend used? It should be relatively easy to make multiple font options available. Please let me know and I should have an update by the end of the week.

At home, we're relatively close to the screen so this hasn't been a concern.
 
Yeah, my monitor near the poker table is really old and relatively small. Only really came up because this was the rare time we had two tables.

Don't remember exactly what he did (especially how he made it bold), but tinkering just now with "Inspect Element", I could just remove the font family name and make the size 400px without screwing up your layout.
 
However, wouldn't using something like "EasyPHP" work to allow you to avoid needing an internet-based PHP host?

Cool idea -- I've never heard of that before; it looks like it's Windows based (I run on Mac), but there does look like similar solutions are out there for Mac. It would probably make it easier to update/test. I'll give it some thought. Thank you!
 
For anyone wondering.... Yes, it works.

I had to do some mods (not too difficult, even if you only semi-intuitively understand javascript & PHP - I'm not a programmer by any stretch), but, it will work without an internet connection using a program like easyPHP as your PHP host.

With easyPHP in particular, you can use the DevServer version, you don't need the full WebServer version, and you don't need to start the SQL server, just the local web server portion.

The lines that call to external files (2 javascript files, 3 Google hosted fonts, & the audio file) all need to get edited so they point those files after you have downloaded & saved them locally. But, that's the easy part.

Another thing (and this may be a quirk of easy PHP in particular) is that there are lines for some of the PHP calls that begin with "<?" that seem to work fine with most online hosts, but easyPHP only recognizes "<?php" as a proper PHP call. Again, another easy edit.

The last thing, that I have yet to actually figure out, is the random poker chip slide show generates errors. The biggest issue is the by-product of it, which is that the audio alerts will not fire at the end of each level. I took the lazy way out for the moment, & simply removed the lines of javascript code related to the poker chip slideshow. Which isn't overly difficult, there is a "remarks flag" where it starts, but you have to figure out where that part of the code ends. Even if you're not a javascript programmer (I'm certainly not) it is rather intuitively obvious if you've ever even looked at javascript code semi-seriously.

I've got to work some long hours for a few days, but, I'll post up some screenshots & more on exactly what I edited later in the week.
 
OK, here's the screenshots & edits I made to use this offline using EasyPHP.

First thing you need to do is download a copy of EasyPHP.

Go to easyphp.org/download.php & download the version of your choice. You don't need the full-blown WebServer version (unless you want to operate this thing over a local network) The DevServer or DevServer-lite versions work just fine. They simply turn your machine into a local PHP host.

There is no real "install" per-se. All the "installation" does is expand the compressed contents & place the install where-ever you have told it to. So, don't expect any "icons" to appear in your "all programs" directory or an "uninstall" in Windows' Control Panel. Unless you want to open Windows Explorer & locate the .exe file each time you want to run it, accept the option of an icon on the desktop. Also, uninstallation is as simple as deleting the EasyPHP folder from the location you installed it.

A note on install location... the default install location is your usual "Program Files" location. Which you will need to go to anytime you want to install/edit the web pages generated. So, you may want to pick/create a more convenient location. I simply pointed to the root directory of my "C:" drive, to make access to the files quicker. Another option would be to create a desktop shortcut to the underlying "www" folder in the EasyPHP directory.

Now create your "website" in the directory ending in "-www" in the EasyPHP directory. In this case that is done simply by copying all the files/folders from this project into it. "index.php" becomes the homepage of this "local website" that your browser will be directed to. Everything at this point works just like any other website.

Well... sort of... there are still external internet calls in the code that we'll need to address if you want to be totally "Internet-Free"... but, more on that in a moment.

Once you have EasyPHP installed & set up, getting it up & running is as simple as running the .exe. Once you click it you'll find the EasyPHP icon running in your taskbar. Right-click that & select "Open Dashboard".

The "dashboard" will open in your default browser. At the top you'll find the controls for two "Servers", an HTTP Server and a Database server. Click the "start" button on the HTTP Server.

From there, to go to your "website" you can go one of two routes. The "portable directory" link below should now be active (if you have an index page setup in the "www" folder) or you can go to the address bar in your browser and type in your "local" internet address, which is "127.0.0.1" (without the quotes)

If you did everything right you should now see the same homepage that you'd see on HobokenNJ's site. Well, kinda... you'll likely see some strange code that looks like an error. That's because it is. Don't panic, we can fix that easy enough.

Here's where we start editing...

1st step is to open the "index.php" file, the "blinds.php" file, "blinds_x_alerts.php" files, & "blinds_x_setup.php" files in any text editor.

EasyPHP seems to be touchy about only recognizing "<?php" as a legitimate PHP call. So, use the "search" function to look for any instances of "<?". When you find one change it to "<?php" & then re-save the file. In the case of the "alerts" & "setup" files it's easy, there's only one right at the beginning of the file. The index file only has two. The "blinds" file is the one with more than a couple.

Once that is done everything should at least render & appear to function normally. Although, you'll notice that the random chip image generator isn't working, and the audio alerts will not fire.

Why the random chip generator doesn't work is a mini-mystery at the moment, & why that would cause the audio alerts to not trigger is an even bigger one. But, for the moment, I simply removed the random chip slideshow generator & that fixed everything.

In the "blinds.php" file you'll find 2 comments lines of the following...

/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/

Directly below the 1st one you'll see a line that verifies it's the one for the chip generator...

var delay_chip=4850 //set delay in milliseconds

Scroll down to find the last line of the chip generator javascript code...

setInterval("rotateimage_chip()",delay_chip)

Delete everything you've just located. Alternatively, you could move the "comments close" symbol "*/" from above to just below the "setInterval" line & this would "comment out" the slideshow. Either will work. But now, everything should function normally, including audio alerts at the end of each level.

Now we can get to cutting the "Internet Umbilical Cord"...

First thing is the easiest part. There are 2 files you need to download. place them all in the "-www" directory in EasyPHP.

The default "alarm clock" MP3 file can be downloaded by right-clicking: http://soundjax.com/reddo/73797^alarmclock.mp3

At the bottom of the homepage of HobokenNJ's timer page is a link to other sounds that you could also use. Or, you can use whatever sound file you may have.

There is also a javascript file you need to do the same with... (right-click to save)

http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js

There are also 3 fonts you will need to install if you don't have them already on your computer.

They are called: "Fredericka+the+Great" / "Kaushan+Script" / & "Martel"

Alternately, if you don't have (or don't want) those fonts you can edit the "style" section of the page to fonts you already have installed. Or just let Windows pick substitutes.

Now, time for more editing...

Open the "blinds.php" page in your text editor...

Find the following 2 lines & delete them:

<link href="https://fonts.googleapis.com/css?fa...+Great|Kaushan+Script|Martel:800&display=swap" rel="stylesheet">

<script src="https://static.codepen.io/assets/co...8b414b87b8db5b08439cac3f1012092b2290c719cd.js"></script>

(NOTES: The "fonts" line is also in the "index.php" file and can be deleted there as well
The javascript file called in the second line seems to be of no real use here. May be
a holdover from the original javascript based clock this whole project came from.)

The following 2 lines get edited...

<source src="http://soundjax.com/reddo/73797^alarmclock.mp3" type="audio/mpeg" />
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

Need to become:

<source src="73797%5Ealarmclock.mp3" type="audio/mpeg" />
<script src="jquery.min.js"></script>

(if you use a different audio file, make sure your edit matches the filename you're using)

That's all there is to it, you should now have a working timer that needs no internet connection to function.

Beyond the above I "customized" my copy a bit. 1st thing was editing the style section to use default Windows fonts & adjusted the placement & sizing of certain elements so that it would all fit on my laptop screen with no scroll bar when the browser was in "full screen" mode.

I also removed the random card slideshow (same as removing the chip slideshow)

clock.jpg

Next up was firing the audio alert at breaks as well as running level changes. this was easy enough, just tell the javascript functions that fire the alert images to also fire the alert audio at the same time. Just insert the comment in the 2 places shown below.

showMSG_1:function () {

var x = Math.floor((Math.random() * 3) + 1);
document.images.alert_img.src=alertimages[x];
this.stopClock;
modal.style.display = "block";
pause_play_button.removeClass('play');
pause_play_button.addClass('pause');

},
showMSG_2:function () {
var x = Math.floor((Math.random() * 3) + 4);

document.images.alert_img.src=alertimages[x];
this.stopClock;
modal.style.display = "block";
pause_play_button.removeClass('play');
pause_play_button.addClass('pause');

Becomes....

showMSG_1:function () {

var x = Math.floor((Math.random() * 3) + 1);
document.images.alert_img.src=alertimages[x];
this.playAlarm();
this.stopClock;
modal.style.display = "block";
pause_play_button.removeClass('play');
pause_play_button.addClass('pause');

},
showMSG_2:function () {
var x = Math.floor((Math.random() * 3) + 4);

document.images.alert_img.src=alertimages[x];
this.playAlarm();
this.stopClock;
modal.style.display = "block";
pause_play_button.removeClass('play');
pause_play_button.addClass('pause');

Next was displaying the blind amounts a bit differently. By default as written, basic numbers are the only inputs allowed. Comma separators won't work. However, this can be changed by placing all the values in the "blinds_x.php file in quotes. As in...

blinds = [{
small: "100",
big: "200" },
{
small: "200",
big: "400" },
{
small: "300",
big: "600" },

This allows you to use comma separators once you get to 1000...

{
small: "1,000",
big: "2,000" },
{
small: "1,500",
big: "3,000" },

comma.jpg

And for those really big blind levels with way too many zeros across the screen, you can use a "K"...

{
small: "10K",
big: "20K" },
{
small: "15K",
big: "30K" },

kilo.jpg

This is an "all or nothing" mod. You have to use the quotes on all blind levels or none, not just the ones you want to display differently.
 
Last edited:
Did some more monkeying around... I think this will be my v2.0 that we'll be using next weekend....

Changed the background color for more contrast. Easier to read from a distance. (on my laptop screen the blue is actually much darker... more like a "navy" than the screenshot makes it appear)

Added (as in "swiped/stole/creatively acquired" - hope Hoboken don't mind/notice) the progress bar... kind of useful for adding back a few seconds of level time if I'm a little slow on the draw in pausing the timer (it's happened a time or few)

Played with the formatting of the page some more so it's less "vertically challenged" on a widescreen 16:9 laptop. Biggest help there was floating the "home" link to the left.

Changed the color of the Play/Pause & Next/Last Level text labels. Only because my title line is fairly long & they seemed to detract from it.

Here's the screenshot:

NewTimer.png

Also, added a few new alerts to the rotation.... just for giggles....

alert_1_800x.png


alert_2_800x.png


alert_4_800x.png


alert_5_800x.png

Possible Mod for v2.1: Ditching the buttons & mapping the Play/Pause & Next/Last Level functions to dedicated keystrokes. (giving more of a "dedicated clock" look)

Wishlist for 3.0: Break Timer function.
 
BREAK TIMER MOD
Well, OK... so it's more of an "add-on" than a real mod.... but anyway...

We used my "offline" version at the last tourney & it worked out great. I ran the video out of my laptop to a large screen display all players could easily see.

The only other thing that would have been nice would have been a break timer. As I've mentioned above, I'm not really a programmer, but I can sometimes fake it using a little logic & common sense in figuring out what does what.

That being the case, rewriting the PHP & Javascript code to have the timer alternate between breaks & blind levels is a bit over my pay grade. I can often tweak stuff like I did with the original timer, but writing something from scratch ain't gonna happen. That being the case, I hit upon an idea... I cheated.

Rather than a single timer, with this being browser-based, why not simply have two & use a 2nd browser tab for the breaks?

Presto... Break Timer Add-on.

break.png

All I did was simply copy the "blinds.php" file, modify it, & rename it "breaks.php". Copy & modify the appropriate "blinds_x.php" file & rename that "breaks_x.php". Done deal.

The modifications done include the break timer firing the alert sound at the end of the break, & then pausing after it resets rather than automatically continuing.

So, the drill becomes...

  • Blinds Timer hits a break interval, plays alert sound, pops up the alert screen & pauses.​
  • You swap to the Breaks Timer tab & start the timer​
  • Breaks Timer hits zero & plays alert sound​
  • You swap back to the Blinds Timer tab & restart the timer.​
Simple enough.

If anyone is interested in a copy of my "offline" version of the timer, let me know by replying in this topic or shooting me a message & I'll zip you up a copy.

If you have a Windows machine I can package up the whole shootin' match including a working copy of EasyPHP that makes it almost an "unZip & push play" affair. Although, I'll have to warn you that it's a large file. Almost 50MB all-in.

Alternately, for Mac users or for anyone else on Windows that wish to use the latest version of EasyPHP, I can zip up just the "local website" files & that's only about a 5MB download.

For you Apple guys a quick Goggle search turned up a solution called "MAMP" as a local PHP host. They have a free version which should do the trick.

https://www.mamp.info/en/
 
Changed the background color for more contrast. Easier to read from a distance. (on my laptop screen the blue is actually much darker... more like a "navy" than the screenshot makes it appear)

Nice work, @Dix . Thanks for your hard work on this.

I added a few different background color options to http://poker.x10.bz/ inspired by your adjustment.
 
Last edited:
The thanks goes to you.

I'd been looking a while for a simple timer that didn't need an internet connection, and could be run from a laptop with a video out to put the display on a screen that the whole room could see. It's a large room (Amer. Legion Post) & we usually have 3 (sometimes 4) tables of players, so just a laptop screen by itself wasn't going to cut it.

With the key word being "simple", most of the simple ones I found required an internet connection. & I'd rather not have to rely on using a phone as a wifi hotspot. So those were out.

All the dedicated software I could find (The Tournament Director, etc.) was overly complex packed with a ton of stuff we didn't need.

So this (with a few tweaks) was the perfect solution.
 
is there a way of placing the functioning code in notepadd ++ then execute it from there into whatever browser one chooses from the run command? it handles most languages java and i believe php

Actually if the code is local, simple html and java why do we need a php backbone? PHP is really for server side scripting and easy php is so you can test code offline before putting it on server.

I think what you guys did is fantastic, just asking what if.
 
From what I could find in a quick search, Notepadd++ would still need to be "synched" to an external PHP server. Which, would kind of defeat the purpose (being "internet connection free").

As I understand it, Notepadd "understands" PHP coding, so as to assist in writing PHP pages (such as alerting you to basic formatting errors), but can't actually execute it natively. (I use "EditPad Pro" - which is kind of the same thing)

https://stackoverflow.com/questions...pad-run-the-php-file-on-the-server-that-i-set

And, yes, EasyPHP & other like programs are generally for "local testing" purposes. But in this case, it works, works well, and is incredibly simple to boot. So, why not use it?

In the case of EasyPHP (can't speak for others) you don't even need to really know a thing about PHP or server-side scripting in the least. Just run it, push play, & tell your browser to consider your local machine a "website". Which is as simple as typing "127.0.0.1" in the address bar.

Also, (again, in the case of EasyPHP) there is no real installation process as far as Windows is concerned. The only thing the "install" process does is write custom configuration files so easyPHP knows exactly where to look for the "local website" it's supposed to be rendering. If you don't need it anymore, don't bother looking for the typical "uninstall" icons in Windows, there ain't one. Just delete the entire EasyPHP directory & you're done with it.

(Note: I've found this also makes it possible to run the whole thing from a USB stick - nice little "easter egg" bonus - copy the whole EasyPHP directory on a USB stick & take it wherever you want. All you need is a Windows laptop or tablet wherever you're going.)

As for why not doing the whole shootin' match in Javascript? That's a question that's over my pay grade. But, I can only assume that there's just some things that are easier/more efficiently/possibly only done as a server-side function rather than in Javascript. At least that's my dumb*ss backwoods mountain redneck guess.

For example, having multiple different blinds schedules as separate stored files & calling up a specific one. I think I can see how that might be a ton easier & more efficient using PHP.
 
Last edited:
Actually if the code is local, simple html and java why do we need a php backbone? PHP is really for server side scripting and easy php is so you can test code offline before putting it on server.

For me, it's the flexibility. The original project is here: https://codepen.io/chemoish/pen/gzcdo . Lots of stuff is static.

The PHP lets me do a bunch of things: (i) change the blind structure; (ii) change where breaks occur; (ii) change the room name; (ii) change the sound at the end of each level; (iv) change the color of the background....

If there is a version you like (with all the settings fixed etc.) you could download the HTML that gets generated and use that file.
 
  • Like
Reactions: Dix
i do like the jump drive concept. Both your concepts make total sense to me, as i said i was just wondering and thanks
 
The instructions for my "offline" version of the timer.

v2.png

For those who think getting this to work without needing to be tethered to the Internet is an overly complex task, or may be slightly squeamish about modifying/customizing this timer, I figured I'd at least start with a "how-to" on installing and getting it up & running with a "local" PHP host. Just to show how it's not that difficult at all.

The timer is even fully functional with no customization or mods needed what-so-ever. Or, you can customize/mod it to your heart's content. Heck, even if you're just curious about learning what it takes to do that. Here's your perfect opportunity. As I've said before, I'm in no way, shape, or form a "programmer". Everything I do is based on simple common sense & deductive reasoning... coupled with a ton of "cut & try" experimentation that can & does go totally sideways on occasion... but then, that's why you always do a backup first, & experiment on a copy..... right? :D

In case you're wondering, it's not possible to screw-up your computer in the process. You can't cause any ill-effects to any of your hardware or your operating system figuring this out. Not possible. The worst that's going to happen is you'll try to view your results in a web-browser & get a crap-ton of errors on the page it's trying to render. No harm, no foul. But, you do now have to try & figure out what you did wrong, or start over. I won't say trying to get a handle on it may not be frustrating at times, but then, playing poker against donkeys can be too, right?... same deal. In fact, I'd say if you're sharp enough to play poker semi-decently, you're sharp enough to figure this stuff out too.

For example, when I was trying to get my "comma separator" mod for the blind amounts working I spent about a half-hour trying to figure out why it didn't work... only to finally notice that I'd forgotten a simple single "closing bracket" ( ] ) in the formatting at the end of the file..... yea, nice move dumb*ss.

So, "getting on with it"....

This is the same "v2.1" version in the screenshot above. If you go fullscreen mode with your browser & have a vertical resolution of at least 846 pixels you'll have no scrollbar. (most people seem to use 1600x900 - I'm old, I use 1504x846).

  • Yellow clock on Dark (Navy) Blue background - Easily readable from a distance.
  • No random card & chip slideshows.
  • Alert sound plays at breaks. Not just running level changes only.
  • Clickable "Progress Bar" that allows time adjustment.
  • Extra Break & ColorUp alert screen popups.
  • Also includes the blinds schedule I created for our local tourney.

I have 2 versions available.

The FULL version - AKA: The "easy" version. Everything all set up, ready to go in one ZIP file. (50MB)
The LITE version - The "website" files only. You have to download & install a local PHP host. (5MB)

I also have the BREAK TIMER ADD-ON for anyone that wants it to go with the above. (8KB)

FULL (easy) VERSION (Windows only - Sorry Mac users).

This version includes EasyPHP with the "website" files already setup & ready to go.

The EasyPHP version I've included is a really old one (5.3.3). Biggest reason is to keep the filesize at a minimum. Even with this old version the zip file is nearly 50MB. Using the latest version of EasyPHP would have made it 5 times that. But, I've tested it on a Win7-64bit laptop & had it running with no issues.

The upside is, if you have a really old laptop sitting in a closet collecting dust, you can pull it out & use it as a dedicated blinds timer. It'll run on Windows as old as Windows 2000. (Yes, that's the old machine I pulled that version off of). Although, if you do actually use Win2k, the only browser that works properly is an old version of Firefox (v12). IE & Netscape can't cope. Also, with Win2k you may need to change the audio alert to use the included "WAV" file. (simply find the text "<source src="ship_bell.mp3" type="audio/mpeg" />" in the "blinds.php" file, change it to "<source src="ship_bell.wav" type="audio/wav" />" & resave the file)

WinXP & up should all be fine with MP3 audio.

Step one is simply unpacking the ZIP file. Once that's done, you'll find a "PCF Blinds Timer" folder. If you have somewhere special you want this folder to live, now is the best time to move it.

Inside the PCF Blinds Timer folder is a file called "EasyPHP-5.3.3.exe". This is the executable that starts your "server". You can either double-click it from inside this folder, or right-click it and create a shortcut to it for your desktop. At any rate, getting your "server" running is as easy as clicking the EXE file or your shortcut.

Well, sort of...

The 1st time you run it you'll get a prompt telling you the location of the install has been moved and asking if you want to regenerate the configuration files.

config.png


YOU MUST CLICK "YES" TO THIS PROMPT!!!

EasyPHP will then re-write all of it's configuration files for the local PHP server so they will point to the correct local directory. If you install this on your local machine's hard drive you will only get this prompt once.

A bonus is that you CAN run this from a portable drive (like a USB stick). The only downside is that you may get that warning prompt above if Windows assigns the portable drive a different drive letter than the one it used previously. No issues, simply click "Yes" again & have it once again re-write the config files. (it takes less than a few seconds)

This is also a "one shot" deal. You have one chance, & one chance only, to click "Yes" to the config files re-write. Miss that opportunity and nothing is going to work.

OK, so you're like me & never read the instructions first. You unzipped everything, didn't bother with reading that text file called "IMPORTANT-READ 1ST" either, saw that prompt about regenerating config files, either dismissed it or clicked "No", & then got some kind of warning about a "Syntax Error".

That voice in your head saying, "You should have read the instructions." ... That's your wife... or mine, if you don't happen to have one of those.

The good news is, all is not lost, you just created a little extra work for yourself.

Find the EasyPHP icon that's running in your system tray, Right-click it & close the program.

The easy way out is to just delete the whole PCF Blinds Timer directory & start over. However, there's another way around this that can come in handy if you plan on using it from a portable drive. So, you may want to practice this one.

Create a directory somewhere on your drive (it can be a temporary one). "Cut & Paste" the whole PCF Blinds Timer Directory into it (effectively moving it to yet another "new" location). Then run it again from inside this new directory. Remember to click "Yes" to the config files regen this time. Now, everything should be working fine. If you moved it to what you intended to be a temp directory, you can now close EasyPHP (again), then move it back & repeat the config files regen process... again.

Once you have EasyPHP running you'll find an icon running in your taskbar. To verify that everything is running properly, double-click it and a "Dashboard" or "Control Panel" should appear. You should see two "servers" both with green lights that say "started".

cp1.png

If you want, you can stop the "MySQL" (database) side, it's not needed.

cp2.png

At this point you can now open your web browser & type "127.0.0.1" in the address bar. (without the quotes) That will open the timer homepage. Or, if you "right-click" the EasyPHP icon & select "Local Web" (or press F7), your default browser will open & go to the timer's homepage.

home.png

That's it, you now have it running & don't need an Internet connection. All the specified modifications to install your own blind schedule apply. Mod it to your heart's content... or stay tuned. If I get some time in the not too distant future maybe I'll do a few quick "walkthroughs" on some of those details as well.

LITE VERSION - Website Files Only

If you have a Mac (or want to use a different PHP host/later version of EasyPHP), I also have a "Lite" version. This is the timer website files only (with my above listed mods).

Download & install whatever version of whatever local PHP server you like & install the "website" files into it.

As stated in a post above, for Mac users a quick Google search turned up a free local PHP server called MAMP as one solution: https://www.mamp.info/en/


BREAK TIMER ADD-ON

break.png

If you want my "Breaks Timer Add-On" page as well, let me know & I'll include a link to it.

Although, I'd suggest getting the initial setup running & tested 1st. Then add the breaks timer.

If you want to preserve the initial "no breaks timer" setup, rename your "index.php" file to "index.orig" or something to that effect. The add-on includes a new index.php file that you'd need to overwrite the original with, as the new index file includes breaks page links.

Once you've renamed the index file (if you wanted) simply unzip & copy all the files included into the "www" directory of EasyPHP where all the other website files are located. If you didn't rename the index file (because you didn't care to keep it) you'll be asked if you want to "overwrite" or "replace" the existing file, just accept the file replacement.

On the new "homepage" you'll notice "breaks" links below the timer link options...

links.png

To use these, right-click the breaks link in the appropriate "version" of the blinds structure you're using, & select "open link in new tab" or "open link in new browser window" (whichever you prefer). This becomes the tab or window you will switch to at break time.

NOTE: You don't have to select the same time interval for breaks as levels. You can select a 10 or 15 minute interval for breaks, while using a 20 or 30 minute blind level interval for the tourney.

If you've made up a custom "blinds_x.php" file, you can optionally create a corresponding "breaks_x.php" file to display what the upcoming post-break blinds level will be. (if you don't, that area will simply remain blank).

This can be done by simply making a copy of your "blinds_x.php" file, renaming it "breaks_x.php" & editing out all the levels that are not immediately preceded by a break. The ones listed in your "blinds_x_alerts.php" file are the ones you want to keep.

Just be mindful that your last one must end with that closing bracket between the last "curly brace" & the final comma- }],


Oh, and one last "tip"...

Go into your power saving/screensaver settings and turn 'em off. Otherwise you'll have to "wake up" your screen at whatever interval that's set for. You can probably guess how I know this.
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account and join our community. It's easy!

Log in

Already have an account? Log in here.

Back
Top Bottom