Page 1 of 1

Need your input: Shorttags

Posted: Mon Feb 20, 2017 5:06 pm
by alf
In this thread, I need your input on what attributes you want for your shorttags. An example of a short tag is

[chess db="1" tactics="1"]

for showing tactics of the database with id 1 or

[fen]6rk/R6p/2pp4/1pP2n2/1P2B1Q1/n6P/7K/r3q3 w - - 0 1[/fen]

to display a fen position.

the **chess** short tag supports attributes like

db - reference to database
game - reference to a game id
tpl - reference to a template(the once you'll see in the short tags menu item)
tactics="1" - to identifiy that w want to show a tactics board(drag and drop)
theme="[wood1|wood2|wood3|woord4|wood5|wood6|wood7|grey|brown|blue]" , i.e. one of the available themes. This attribute will override your default settings for this board.

Which other short tags attribute would be useful to you? I appreciate your input

Re: Need your input: Shorttags

Posted: Tue Feb 21, 2017 4:32 pm
by uyasar
perfect, nothing to add :)

Re: Need your input: Shorttags

Posted: Tue Feb 21, 2017 7:13 pm
by alf
Support for width attribute has been added today. Default is 100%

example:

[fen width="70%"]....[/fen] for 70% of parent
[chess game="1" tpl="5" width="500"] for 500 pixels

In most templates, height is dynamic based on width, so support for that attribute is not yet added. It may be added on some view templates later on.

Re: Need your input: Shorttags

Posted: Thu Mar 16, 2017 2:23 pm
by chessnagar
Alf:
The way FEN is shown is as a static diagram and it would be wonderful if we can draw some arrows and highlight some squares to explain the diagram. In case if you are wondering what I am referring, please check out http://www.chessnagar.com/tactics/chess-pin/

Regards.

Re: Need your input: Shorttags

Posted: Thu Mar 16, 2017 5:40 pm
by alf
Support for arrows and squares has been added today. For details, see

https://wordpresschess.com/fen-position/

The properties used are: highlight and squares, example:

Code: Select all

[fen width="50%" highlight="c4,d5,e6,f7,g8" arrows="d1d6,g5f4;#669900" float="left" theme="wood8" css="padding-right:8px"]r1bqr3/pp1kn1pp/2pp4/6B1/1P6/PBp5/2P2PPP/R2QR1K1 w - - 0 1[/fen]

Re: Need your input: Shorttags

Posted: Thu Mar 16, 2017 7:54 pm
by chessnagar
wow, that is great....thanks for the quick solution.