Hi MicroMonkey,
Just a quick update on the Poker module from our side at CrazySpirits.
We’ve continued testing and integrating it into our live TorrentTrader setup, and things are going very well.
Since our previous tests, we’ve worked on the table interface, French localization, player controls, sit-out/resume functionality, table status, chat, hand history, spectator display, sounds/room ambience, and the general integration with our CrazySpirits themes.
We’ve also just added an in-game “How to Play?” help window, accessible directly from the Poker table, so new players can check the Texas Hold’em rules and controls without leaving their game.
The Poker room is now looking and behaving like a proper part of the tracker rather than a separate add-on.
We’re continuing real-world testing with members and fixing the small details we find along the way.
Thanks again for the work on this module — it has given us a very solid base to build on. 👍
Spiritblue / CrazySpirits
Search in poker.php:
<button type="button" class="history-open" id="pokerHelpOpen">
♠ How to Play?
</button>
Add:
<div class="poker-help-overlay" id="pokerHelpOverlay">
<div class="poker-help-window">
<div class="poker-help-head">
<h2>♠ How to Play Texas Hold'em</h2>
<button type="button" id="pokerHelpClose">×</button>
</div>
<div class="poker-help-content">
<h3>Goal of the game</h3>
<p>
Build the best five-card poker hand using your two private
cards and the five community cards on the table.
</p>
<h3>How a hand works</h3>
<p>
Each player receives two private cards.
The community cards are then dealt in stages:
</p>
<p>
<strong>Flop:</strong> 3 cards<br>
<strong>Turn:</strong> 1 additional card<br>
<strong>River:</strong> 1 final card
</p>
<h3>Player actions</h3>
<p>
<strong>Fold</strong> — Give up the current hand.<br>
<strong>Check</strong> — Stay in the hand without betting when no bet is required.<br>
<strong>Call</strong> — Match the current bet.<br>
<strong>Raise</strong> — Increase the current bet.<br>
<strong>All-in</strong> — Bet your entire remaining stack.
</p>
<h3>Hand rankings</h3>
<ol>
<li>Royal Flush</li>
<li>Straight Flush</li>
<li>Four of a Kind</li>
<li>Full House</li>
<li>Flush</li>
<li>Straight</li>
<li>Three of a Kind</li>
<li>Two Pair</li>
<li>One Pair</li>
<li>High Card</li>
</ol>
<p>
The player with the best five-card hand wins the pot.
A player can also win if all other players fold.
</p>
</div>
</div>
</div>
Add CSS:
.poker-help-overlay {
position: fixed;
inset: 0;
z-index: 10030;
display: none;
align-items: center;
justify-content: center;
padding: 30px;
background: rgba(0, 0, 0, .78);
}
.poker-help-overlay.open {
display: flex;
}
.poker-help-window {
width: min(720px, calc(100vw - 60px));
max-height: calc(100vh - 60px);
overflow: hidden;
border: 1px solid #3a3a3a;
border-radius: 8px;
background: #151515;
box-shadow: 0 18px 70px rgba(0, 0, 0, .65);
color: #ddd;
}
.poker-help-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 18px;
border-bottom: 1px solid #303030;
background: #101010;
}
.poker-help-head h2 {
margin: 0;
color: #e7c46e;
font-size: 19px;
}
.poker-help-head button {
font-size: 20px;
}
.poker-help-content {
max-height: calc(100vh - 150px);
overflow-y: auto;
padding: 18px 22px;
line-height: 1.55;
}
.poker-help-content h3 {
margin: 18px 0 7px;
color: #e7c46e;
}
.poker-help-content h3:first-child {
margin-top: 0;
}
.poker-help-content strong {
color: #fff;
}
Add JavaScript (JS):
var pokerHelpOpen = document.getElementById('pokerHelpOpen');
var pokerHelpClose = document.getElementById('pokerHelpClose');
var pokerHelpOverlay = document.getElementById('pokerHelpOverlay');
if (pokerHelpOpen && pokerHelpOverlay) {
pokerHelpOpen.addEventListener('click', function () {
pokerHelpOverlay.classList.add('open');
});
}
if (pokerHelpClose && pokerHelpOverlay) {
pokerHelpClose.addEventListener('click', function () {
pokerHelpOverlay.classList.remove('open');
});
}
if (pokerHelpOverlay) {
pokerHelpOverlay.addEventListener('click', function (event) {
if (event.target === pokerHelpOverlay) {
pokerHelpOverlay.classList.remove('open');
}
});
}
document.addEventListener('keydown', function (event) {
if (event.key === 'Escape' &&
pokerHelpOverlay &&
pokerHelpOverlay.classList.contains('open')) {
pokerHelpOverlay.classList.remove('open');
}
});
Feel free to use, modify, or improve it however you like.
It’s a small contribution from CrazySpirits after all the work you’ve shared with us.
Thanks again!