Giter Site home page Giter Site logo

Comments (9)

calvicius avatar calvicius commented on July 29, 2024

firstly... my english si not very good....

welll...
I have a problem with fen positions
Your edit.html example
originaly inits with position:'start'. So ... if I change the start position with a fen with side to move as black; lets say : position : 'rnbqkbnr/pp1p1ppp/4p3/4P3/2PQ4/2N5/PP3PPP/R1B1KBNR b KQkq - 0 6' always inittiates the process as white to move.

I have also tried to change in html like this :
quote<script id="identificador_js" cadena="" src="../js/pgnvjs.js" type="text/javascript"></script>\unquote

and then change pgnvjs like this
//recuperamos la query string
var locojo=document.getElementById('identificador_js');
var esmio=locojo.getAttribute('cadena');

for receiving the fen chain, then I have changed this (ten lines below):
//var game = new Chess();
to
var game = new Chess(esmio); with "'"+esmio+"'" also

and the problem persists.

it would be very appreciated in my side if there is any solution that I have ommited.
thanks in advance,
calvicius

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

@calvicius Did you manage to solve the problems you faced? I would like to help you somehow, but to do that, I would like to take your comment as a separate ticket.

So perhaps I need the minimal example to show how to use PgnViewerJS in the most efficient way. Is that needed any more?

Have you seen that #13 describes exactly what you have described above. I have fixed that months ago, so you should give it a try.

from pgn-viewer.

calvicius avatar calvicius commented on July 29, 2024

thanks for your interest.
yes, it was solved.
in the meantime I have done one editor/viewer for multiples pgns (dependant of ram memory) only for entertainment.

If you (and everybody) are interested it can be downloaded from:

https://drive.google.com/file/d/0Bz_5GBxD4LKIWm9xTzl0X01DS1U/view?usp=sharing

the internal schema is an array of arrays, in order to emulate a tree of n-nodes; and codification is not very elegant, but the idea may serve to others. Note: is in spanish

from pgn-viewer.

cxd4 avatar cxd4 commented on July 29, 2024

@mliebelt Please do find some time to have this feature working.

Among other web-friendly PGN viewers I've tested so far, yours is the most thorough and well-developed, but its fatal flaw for my means comes down to just this one and only feature's absence.

In this case I use JavaScript to read from an ...f="filename.pgn" suffix to the URL as which of my PGN databases of my games I want to review, and inside each PGN is a tournament's worth of games. I was hoping I could finally get rid of Chess Tempo's PGN viewer but was disappointed at the road block I hit while migrating to yours, because only the first and foremost round of each tournament is viewable in my page. I can't picture splitting all my tournament databases into single games per multiple PGN files.

Add a configuration parameter, to make explicit that many games should be read at once.

A configuration parameter is probably safest as a start point, because with said parameter turned off or set to false, the current PGN parsing procedures in your scripts can remain traditional without being distracted by searching for more than one game inside a PGN. In the long run, though, detecting the presence of multiple games instead of relying on an explicit config parameter would probably be simpler, as too many config options (including a questionably useful option to only show the top-most game inside a potentially massive PGN file) can complicate things as well.

from pgn-viewer.

gbtami avatar gbtami commented on July 29, 2024

@cxd4 have you tried http://pgn4web.casaschi.net ?
https://sourceforge.net/p/pgn4web/code/HEAD/tree/trunk/

from pgn-viewer.

cxd4 avatar cxd4 commented on July 29, 2024

@gbtami I avoided pgn4web initially due to the project saying it was written partially in PHP, and, just in case that meant what I feared, I wanted to avoid wasting time trying to install PGN viewers that required server-side scripting like PHP. I tried PgnViewerJS first because it's a 100% JavaScript-focused project.

However, I am successful so far with getting pgn4web to work with my offline website. It appears to do just what I need. I will be using pgn4web at least until PgnViewerJS supports actual PGN file databases. Thanks.

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

For me, the feature has not a high priority, due to the fact, that I use the viewer mostly in our web site of our local chess club, to display games alone.

The description of the feature is sufficient, for any one interested to implement the feature on their own. Anyone?

I have done a lot of things lately not related to the PgnViewerJS, therefore I cannot promise to implement something like that soon ...

from pgn-viewer.

cxd4 avatar cxd4 commented on July 29, 2024

I understand. I'm a little primitive with my application of JavaScript and experience with it, but I'll try to find some time to investigate how to implement it myself.

For examples, I have used 2 PGN viewers besides this one which demonstrate effectively working import of multi-game PGN databases.

  1. Chess Tempo
  2. pgn4web

Both of those show a drop-down box that lets you pick which game to view. (I'll never go back to Chess Tempo's though because that's licensed under non-free and restrictive licensing.)

For me, the feature has not a high priority, due to the fact, that I use the viewer mostly in our web site of our local chess club, to display games alone.

I guess for something like that, there isn't much of a game "Round" concept (as in the Round field required by the seven-tag PGN roster). One game per PGN file could work in theory in the non-tournament or casual event cases, but even in a chess club I'd probably feel like grouping all the games I play within a certain period or so, depending on the circumstances. Maybe not.

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

I finally created a working solution. See the example file many-games-left.html how to do it.

from pgn-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.