Skip to main content
How To Implement This My Chess Forum? Started by Vector · · Read 10950 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic - Topic derived from Feature and Enhancements

How To Implement This My Chess Forum?

Hello! I have a chess forum. but there is no way to insert the game bbcode [pgn] [/pgn] into the message and the game appears in the message, people see the moves. Please tell me how this can be implemented on my chess forum?

Re: How To Implement This My Chess Forum?

Reply #1

Hello Vector,

pgn is a format for recording chess games in ASCII. I'm a bit confused why you would post the game code if you don't want people to see the moves in the game..
{If you just want to display the board layout (without the moves that built it), that's probably best done with a screenshot image of the chess program output/display (chess202x, etc.).}

Since this is (to me) an obvious solution to the "problem" of people seeing the chess moves from a program output intended to show the chess moves , I anticipate I'm not really understanding what you're trying to do  - can you explain better?

// Deep inside every dilemma lies a solution that involves explosives //

Re: How To Implement This My Chess Forum?

Reply #2

The website https://sourceforge.net/p/pgn4web/wiki/User_Notes_phpBB/ offers an implementation of this on various forums, but there is no elkarte there.
This is what it looks like on phpbb http://pgn4web-test.casaschi.net/phpbb/viewtopic.php?f=2&t=2
phpbb3 https://www.chess.com/forum/view/general/how-phpbb3-users-can-post-chess-diagram
And the bulletin had pgn tags and the batch was displayed in the message.
pgn is taken from chessbase products and looks like this in code:

[Event "?"]
[Site "?"]
[Date "??.??.??"]
[Round "?"]
[White "player"]
[Black "?"]
[Result "*"]
[PlyCount "8"]

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 *


Re: How To Implement This My Chess Forum?

Reply #3

OK, the way you posed the question initially seemed to imply (to me, anyway) ,that you wished to show the board (and board animation?) without displaying the actual code. 

The website page -> http://www.phpbb.com/support/docs/en/3.3/kb/article/adding-custom-bbcodes-in-phpbb3/
..explains the code implementation, so is it correct that you desire to know where in the ElkArte admin panel (or underlying php code) you would make the additions to support the chess function in order to replicate the display and animation as shown in the test board -> http://pgn4web-test.casaschi.net/phpbb/viewtopic.php?f=2&t=2  ?

If that is a "yes", then I'll step aside and defer to @Spuds or one of the other code chefs here to dish that up..

// Deep inside every dilemma lies a solution that involves explosives //


Re: How To Implement This My Chess Forum?

Reply #5

Nice, I also play chess in my free time, but I am not sure whether I am into it for now, as it has been some times since I looked into ElkArte or its addons code, but may be in the future. May be somebody else might be interested to develop this addon.

Edited: Looking at its wiki, I noticed that there is a sample to be used together with SimpleMachine forum mod known as Custom BBCodes Manager Module.

https://sourceforge.net/p/pgn4web/wiki/User_Notes_simplemachines/

This the closest to ours if some one wishes to develop an addon for this in ElkArte.

Of course ElkArte addon for BBC is actually simpler and we have few addons like that already that can be used as samples.
Last Edit: November 18, 2023, 10:06:15 pm by ahrasis

Re: How To Implement This My Chess Forum?

Reply #6

We will be very grateful to those who will not refuse to help us! Because we have a chess community and we can’t share chess games in topics:((
I tried to install the plugin for smf Custom BBCodes Manager but nothing worked :((

Re: How To Implement This My Chess Forum?

Reply #7

SMF mod won't work with ElkArte without modifications. You need to use ElkArte addon as sample and add up things needed as per that wiki's guide.

Re: How To Implement This My Chess Forum?

Reply #8

Just follow the installation notes but modify for ElkArte instead. There is no reason why it wouldn't work on ElkArte over some other software, specially not SMF as ElkArte is born out of SMF.

 

Re: How To Implement This My Chess Forum?

Reply #9

Well, you are welcome to try to prove your theory.  :cheesy:

Re: How To Implement This My Chess Forum?

Reply #10

Here is a shot at creating this ... upload the package and install it, there are no settings.

Some notes ....

-  it does NOT add a toolbar icon, so you have to enter the bbc code manually.
As an example [pgn]1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 *[/pgn]
This will render as: board.png

- it expects you have uploaded the pgn4web files in a pgn4web directory that is off your forum root.  If it is elsewhere you need to edit the directory in the addon's JS file.




Re: How To Implement This My Chess Forum?

Reply #11

Thank you for your help!