SquirrelChess Forum
Welcome, Guest
Please Login or Register.
Lost Password?
Re:How to add chess boards to the Fireboard forum (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:How to add chess boards to the Fireboard forum

#119
Sciurus (Admin)
Admin
Posts: 88
graph
How to add chess boards to the Fireboard forum 2007/09/16 11:23 Karma: 2  
I received many questions on how to add the chess game viewing feature to the Fireboard forum component for Joomla!Joomla!.

Here are some instructions:

0) The code below is provided AS IS and WITHOUT ANY WARRANTY. In particular, don't blame me if your server blows up or your chess rating drops after you install this! Make sure you make backups before making any changes!

1) Download the LTPGNVIEWER and install it on your webspace. Simply copy the files in a directory. At my site it is under /pgnviewer . Remember where you put it.

2) Look for the file smile.class.php in your Fireboard installation. It can be found in components/com_fireboard/templates/default, although the location might vary depending on your settings.

3) Look for the following code in smile.class.php:

Code:

  // italic $fb_message_txt preg_replace("/(\[i\])(.*?)(\[\/i\])/si","<em>\\2</em>",$fb_message_txt);



4) Add the following code to the smile.class.php file, right under the code from point 3:

Code:

  // chess board $fb_message_txt preg_replace("/(\[board\])(.*?)(\[\/board\])/si","<iframe style=\"float:right;\"width=\"300\" height=\"380\" scrolling=\"no\" src=\"/pgnviewer/ltpgnboard.html?SetPgnMoveText=\\2\" > </iframe>",$fb_message_txt);                    $fb_message_txt preg_replace("/\[board move=([0-9])\](.*?)\[\/board\]/si","<iframe style=\"float:right;\"width=\"300\" height=\"380\" scrolling=\"no\" src=\"/pgnviewer/ltpgnboard.html?SetPgnMoveText=\\2&MoveForward=\\1\" > </iframe>",$fb_message_txt); $fb_message_txt preg_replace("/\[board move=([0-9][0-9])\](.*?)\[\/board\]/si","<iframe style=\"float:right;\"width=\"300\" height=\"380\" scrolling=\"no\" src=\"/pgnviewer/ltpgnboard.html?SetPgnMoveText=\\2&MoveForward=\\1\" > </iframe>",$fb_message_txt);



Make sure, that the path to the ltpgnboard.html corresponds to the one where you installed the LTPGNVIEWER software (in my case /pgnviewer)!

That's it! Now you should be able to include interactive chess boards in your forum posts.

Please post questions/problems in this thread so that other webmasters can learn from it!

Post edited by: Sciurus, at: 2007/09/16 11:29
  The administrator has disabled public write access.
#120
satrancokulu (User)
Pawn
Posts: 2
graphgraph
Re:How to add chess boards to the Fireboard forum 2007/09/16 14:14 Karma: 0  
It perfectly works.
Thank you Sciurus!
  The administrator has disabled public write access.
#147
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/10 04:30 Karma: 1  
Hi Sciurus. And thanks a lot for the information. Maybe you could help us with a similar question. We would like to add LTPGNVIEWER to a joomla webpage, but donīt know how to make this...

We hope you understand us, english is not our mother tongue.

Thanks.
  The administrator has disabled public write access.
#148
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/14 14:32 Karma: 1  
Hi again, i have been investigating about this, but i need to know how to insert an iframe in the central frame, or frontpage, of a joomla site...

please, could you help me with any suggestion? thanks in advance.
  The administrator has disabled public write access.
#149
Sciurus (Admin)
Admin
Posts: 88
graph
Re:How to add chess boards to the Fireboard forum 2008/05/26 09:47 Karma: 2  
Hi-

sorry for the slow response. I have been traveling

Here is the code I am using for embedding games into Joomla! content.

Code:

  <p> <iframe width="100%" height="450" src="http://squirrelchess.com/pgnviewer/ltpgnviewer.html?/games/DreadPirateJosh-Sciurus_080413.html"></iframe> </p>



The example is from here
  The administrator has disabled public write access.
#150
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/26 11:17 Karma: 1  
thanks for the reply scirus .

is there anyway to insert the iframe through the editor of joomla (TinyMCE)?

i usually have to make a "call" to jumi (plugin) from the editor.

example: {jumi [almacen/games/glodvsglod.php] }

in glodvsglod.php:
<iframe
src ="http://XXXXXX.com/almacen/games/glodvsglod.htm"
width="100%"
height="500">
</iframe>


it is a bit tedious...
  The administrator has disabled public write access.
#151
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/26 11:17 Karma: 1  
thanks for the reply scirus .

is there anyway to insert the iframe through the editor of joomla (TinyMCE)?

i usually have to make a "call" to jumi (plugin) from the editor.

example: in the editor, i write:
{jumi [almacen/games/playervsplayer.php] }

and in playervsplayer.php:
<iframe
src ="http://XXXXXX.com/almacen/games/playervsplayer.htm"
width="100%"
height="500">
</iframe>


it is a bit tedious...

Post edited by: gloderhel, at: 2008/05/26 11:19
  The administrator has disabled public write access.
#152
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/26 11:22 Karma: 1  
sorry , i was trying to edit the post...
  The administrator has disabled public write access.
#153
Sciurus (Admin)
Admin
Posts: 88
graph
Re:How to add chess boards to the Fireboard forum 2008/05/26 12:35 Karma: 2  
No worries

Hmm, I don't use any of the "fancy" editors. Usually, I just type the html code by hand using the "no editor" editor. But as far as I remember, some of the advanced editor plugins have buttons that allow you to edit html directly. This way, you can include the iframe without the need for a special plugin.
  The administrator has disabled public write access.
#154
gloderhel (User)
Knight
Posts: 9
graphgraph
Re:How to add chess boards to the Fireboard forum 2008/05/26 12:45 Karma: 1  
THANKS SO MUCH!!

it was so easy.............

sometimes i like to make mountains out of a molehill

thanks again
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
Đ Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop