The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Chess Details »» | ||||||||||||||||||||||||||
Chess for vbulletin.
This mod turns an existing forum into a forum for playing chess in. Members can then play games against each other as easilly as posting a new post in a regular forum. NB: the beta version of this dosn't enforce the rules of chess so illegal moves are possible - this does have the advantage of allowing handicap matches and variations on standard chess rules. beta This mod is a beta mod, this means that i have all the functions working on my board however there may be unforseen problems and conflicts on different vb setups. I'm 95% confidant that there are no major isseus left in the core code, the only issues that may arrise are from the new ajax features. If this is a problem for you, you can disable the ajax features in the admin cp. Demo A live demo can be seen here: http://www.giveupalready.com/forumdisplay.php?f=349 (running v1.0.1 till i've time to upgrade it) Screenshots Screen shot shows new UI Version History 1.1b (beta): current version - improved user interface (if you've changed the chess template you will need to revert/apply the changes manually) - back/forward buttons for local moves (unsaved. Full backward/forward movement will be added in a later version) - highlight for currently selected square. 1.0.1b (beta): - fixed a couple of misisng TABLE_PREFIX's - fixed table spacing issue 1.0b (beta): - forced quick reply to be enabled. - added reset board link + javascript to reset the board without reloading. - ajax posting of moves. - board updates itself every 10 secs via ajax. - added option to flip layout of board. 0.2b (beta): - added some javascript to update piece replacments instantly. - templates are now fully phrased. 0.1b (beta): - added faq entries to product file - (hopefully) improved compatablity with vbseo - modified instal instructions to avoid potential javascript problems. - changed version numbering scheme. beta: - re-exported product file to contain all the settings fields. alpha: - changed image paths to allow for customised images. Known Issues - Table sizes are inconsistant - If min post length is greater than 7 moves wont post without a comment. Compatability This mod was written on vb 3.6.0 and has been tested on 3.6.7 compatablity with other versions is unknown. Reported working on 3.6.8 Instalation
Upgrade from < 1.0b
Upgrade from 1.0b
Support As all of my boards have been upgraded to vbulletin 4, I am no longer actively maintaining any of my vb3.x mods. Free support for all of my 3.x mods is being removed from the 31st of March 2010 after this date, I will only be offering paid support for 3.x mods; downloading and usage of the mods will remain free but unsupported. For support of 3.x mods, please pm me as I won't be checking the threads very often. Liscense THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You may modify this software to suit your own purposes but may only distribute said modifications within this thread and with my approval. Credits Images were modified from icon files downloaded from http://www.enpassant.dk/chess/grafeng.htm Checkers Untill i get arround to coding and releasing a checkers game you can play checkers using this mod using the following instructions provided by one of my forum members: Quote:
You can add image sets by uploading a gfx for each piece identified by its initial into a new directory within the /images/chess/ directory and then changing the image settings in the admincp. If anyone has any custom image sets that they can legally distribute pm me a link and i'll link to them in this post. Feature requests - Leader board - Other games (checkers, monopoly,risk, go) Show Your Support
|
Comments |
#122
|
||||
|
||||
Carnage if its not asking 2 much, please think about a ranking system 2 show who's the Grandmasters, masters and lower rankings by usergroup...
Keep the ball rolling and U gotts my vote:up: |
#123
|
||||
|
||||
Quote:
|
#124
|
||||
|
||||
Excellent. Installed
|
#125
|
|||
|
|||
i've been playing arround and have managed to replicate the reset board bug; working on a solution.
For now, i'm going to release a minor update with a few misc bug fixes |
#126
|
|||
|
|||
If I post a move using click method, I see the change, but when I click post reply, the move is erased visually, but shows up in the text area. Also as a spectator, it will put coordinate moves in my quick reply.
also can posts be appended into the same post? Some games have 10s of pages of posts. |
#127
|
|||
|
|||
Quote:
Quote:
|
#128
|
|||
|
|||
any way to exclude chess games from "new posts" functions? Also when another user enters a game by moving a piece it doesn't update the forum view thread title. It changes the thread title in the thread, but if you goto the forum view the thread title is still for example "Dethfire vs "
btw, can you include version checking in the product page? |
#129
|
||||
|
||||
I have a couple really nit-picky users complained about white/black, flipped board, etc. Because this mod uses style CSS definitions of alt1 and alt2 for the board (which I think was the right way to go in coding it, btw) some users of mine complained that the Queen's not on her color. She is, but my some of styles are defined with light and dark tones reversed from vB's default. So here's what I did:
I added this bit into every style's "Additional CSS Definitions" area in style manger Code:
/** START Chess Board **/ .chess1 { background-color : #FFFFFF; } .chess2 { background-color : #000000; } /** END Chess Board **/ Code:
if($forumid == $vbulletin->options['chess_forumid']) { $empty = array('a'=>'','b'=>'','c'=>'','d'=>'','e'=>'','f'=>'','g'=>'','h'=>''); $board = array(1=>array('a'=>'wR','b'=>'wN','c'=>'wB','d'=>'wQ','e'=>'wK',f=>'wB','g'=>'wN','h'=>'wR'), 2=>array('a'=>'wP','b'=>'wP','c'=>'wP','d'=>'wP','e'=>'wP','f'=>'wP','g'=>'wP','h'=>'wP'), 3=>$empty, 4=>$empty, 5=>$empty, 6=>$empty, 7=>array('a'=>'bP','b'=>'bP','c'=>'bP','d'=>'bP','e'=>'bP','f'=>'bP','g'=>'bP',h=>'bP'), 8=>array('a'=>'bR','b'=>'bN','c'=>'bB','d'=>'bQ','e'=>'bK','f'=>'bB','g'=>'bN','h'=>'bR')); if(preg_match_all("#player\(1,([^)]+)\)#",$data[0][1],$matches,PREG_SET_ORDER)) { $player1 = $matches[0][1]; } else { $player1 = $data[0][0]; } if(preg_match_all("#player\(2,([^)]+)\)#",$data[0][1],$matches,PREG_SET_ORDER)) { $player2 = $matches[0][1]; } $moveno = 1; $taken = array(); foreach($data AS $move) { if(!$player2) { if($move[0] != $player1) { $player2 = $move[0]; } } $postcnt++; if( (($moveno % 2) && $move[0] == $player1) || (!($moveno % 2) && $move[0] == $player2)) { if(preg_match_all("#\(([a-h])([1-8]),([a-h])([1-8])\)#",$move[1],$matches,PREG_SET_ORDER)) { $moveno++; } foreach($matches AS $match) { if($board[$match[4]][$match[3]] != '') { $taken[] = $board[$match[4]][$match[3]]; } $board[$match[4]][$match[3]] = $board[$match[2]][$match[1]]; $board[$match[2]][$match[1]] = ''; } preg_match_all("#\(([a-h])([1-8]),(w|b)(Q|R|N|B|K|P)\)#",$move[1],$matches,PREG_SET_ORDER); foreach($matches AS $match) { $board[$match[2]][$match[1]] = $match[3].$match[4]; } } $movestext[] = implode($move,": "); } $post['signature'] = "<div id=\"chesschat\" style=\"max-height:200px;overflow:auto;\">" . implode(array_reverse($movestext),"<br />") . "</div>"; if($vbulletin->userinfo['userid'] == 100000000) { print_r($vbulletin->options); die($vbulletin->options['chess_rotation']); } if($vbulletin->options['chess_rotation']) { $board = array_reverse($board,true); } foreach($board AS $row =>$rowdata) { $output .= "<tr height=\"40px\"><td>$row</td>"; foreach($rowdata AS $col => $coldata) { $class = ($class == 'chess1') ? 'chess2':'chess1'; $imgstr = (($coldata == '') ? (' ') : ('<img width="40px" height="40px" src="' . $vbulletin->options['bburl'] . '/images/chess/' . (($coldata[0] == 'b') ? ($vbulletin->options['chess_black']) : ($vbulletin->options['chess_white'])) . "/" . $coldata[1] . ".gif\" />")); $output .= "<td id=\"".$col.$row."\"width=\"40px\" onclick=\"move(event,'".$col.$row."')\" class=\"$class\">$imgstr</td>"; } $output .= "</tr>"; $class = ($class == 'chess1') ? 'chess2':'chess1'; } foreach($taken AS $piece) { if(substr($piece,0,1) == "w") { if(!$white) { $white = "<tr>"; $whitecnt = 0; } $white .= "<td><img src=\"".$vbulletin->options['bburl']."/images/chess/".$vbulletin->options['chess_white']."/".$piece[1].".gif\" /></td>"; $whitecnt ++; if(!($whitecnt % 6)) { $white .= "</tr><tr>"; } } else { if(!$black) { $black = "<tr>"; $blackcnt = 0; } $black .= "<td><img src=\"".$vbulletin->options['bburl']."/images/chess/".$vbulletin->options['chess_black']."/".$piece[1].".gif\" /></td>"; $blackcnt ++; if(!($blackcnt % 6)) { $black .= "</tr><tr>"; } } } $game_text = $player1 . " vs " . $player2; $moveplr = (($moveno % 2) ? $player1 : $player2); $move_text = "Move: $moveno <br /> " . $moveplr . " to move next."; eval('$postbits = "' . fetch_template('chess') . '";'); } I am going to start looking into making a marble chessboard, wood chessboard, etc. |
#130
|
|||
|
|||
Awesome! Thanks, I also had some users who noted the non standard board setup.
|
#131
|
||||
|
||||
Actually, using images there is pretty simple if you know anything about CSS
I've done a marble one already: * Create a directory called "board" in your /images/chess/ directory. * Upload the attached files to that directory * Change that CSS definition to: Code:
/** START Chess Board **/ .chess1 { background : url(http://www.pathtoyourforum.com/images/chess/board/white.jpg); } .chess2 { background : url(http://www.pathtoyourforum.com/images/chess/board/black.jpg); } /** END Chess Board **/ http://www.mydomain.com/forum/images/chess/board/white.jpg |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|