The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Adding a Chess Viewer
PostPosted: Wed May 02, 2012 8:24 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 01, 2007 4:07 pm
Posts: 83
I want to add a chess viewer to a website. I was going to create a customHTML module and then use the loadposition to place it on the home page.

Here is a link to the installation of the viewer (scroll down until you get to step 1):

http://chesstuff.[URL banned].com/2008/11/how-to-publish-chess-game-on-your-blog.html

He says to add the following code:
Code:
<!-- Chess Viewer stub -->
<script src='http://chesstuff.googlecode.com/svn/deployChessViewer.js'
type='text/javascript'/>

How would I do this in the customHTML module? Seems all I get is a printout of the code?


Top
 Profile  
 
PostPosted: Sat May 05, 2012 7:44 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 01, 2007 4:07 pm
Posts: 83
Is there no way to add this kind of code in Joomla or run some java script?


Top
 Profile  
 
PostPosted: Wed May 09, 2012 6:12 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Sep 01, 2007 4:07 pm
Posts: 83
I figured it out. :D Best way is to use a module called Flexi Custom Code. Run your pgn file data through CVDs HTML Code Generator here:

http://chesstuff.[URL banned].com/2009/04/html-code-generator-for-blogs.html

Here's what you need in your code section in your Flexi Custom Code module:

Code:
<!-- Chess Viewer stub -->
<head>
<script src='http://chesstuff.googlecode.com/svn/deployChessViewer.js'
type='text/javascript'/>
</head>


After this code, paste the results of what the HTML Code Generator gave you. For example:

Code:
<!-- ChessViewer Section Start -->
<SCRIPT id="oChessViewer" type="text/javascript">/*
[Event "Montreal CA-open  Rd: 9"]
[Site "Montreal CA-open  Rd: 9"]
[Date "1956.??.??"]
[EventDate "?"]
[Round "?"]
[Result "0-1"]
[White "Sidney Norman Bernstein"]
[Black "Robert James Fischer"]
[ECO "D02"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "66"]

1. d4 Nf6 2. Nf3 g6 3. Nc3 d5 4. Bf4 Bg7 5. e3 O-O 6. Be2 Nh5
7. Bg5 h6 8. Bh4 g5 9. Bg3 Nxg3 10. hxg3 c5 11. Qd3 e6 12. Ne5
f5 13. g4 f4 14. O-O-O Nc6 15. Rxh6 Bxh6 16. Qg6+ Bg7 17. Bd3
Nxe5 18. dxe5 Rf7 19. Nb5 Kf8 20. Nd6 Rd7 21. Bb5 Rxd6
22. exd6 Bd7 23. Bxd7 Qxd7 24. Qxg5 fxe3 25. Qf4+ Kg8 26. fxe3
Rf8 27. Qg5 Qxd6 28. Rh1 Qe5 29. Qh4 Qxb2+ 30. Kd1 Qb1+
31. Kd2 Qb4+ 32. Kd1 Qe4 33. Qh5 Rf2 0-1
*/ makeChessApplet ( null );</SCRIPT>
<!-- ChessViewer Section End -->


Then, I used the loadposition in my home page to add the chessviewer.

The chess viewer home page is:
http://chesstuff.[URL banned].com/2009/04/html-code-generator-for-blogs.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 



Who is online

Users browsing this forum: imanickam, ttomljen and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group