News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMFChess

Started by feeble, February 29, 2008, 11:51:29 PM

Previous topic - Next topic

Paracelsus

One extra question (which is coding-related):
I don't have the default theme so it's easy to guess that the "menu button" to access SMFChess in index.template.php has a different syntax. The thing is that the SMFChess button syntax is slightly different from the others as it is prepared to show a tiny extra whenever there are moves in our own chess games. How do I put this in a custom theme button?

This is the SMFChess button:
    //Begin SMFChess code
    if($context['allow_chess']){
        echo ($context['current_action'] == 'chess' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $context['current_action'] == 'chess' ? 'active_back' : 'back' , '">
                <a href="', $scripturl, '?action=chess">'.$txt['SMFChess'].'', $context['user']['chess_turn'] != 0 ? '[<strong>!</strong>]' : '' , '</a>
            </td>' , $context['current_action'] == 'chess' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
    }
    //END SMFChess code


And this would be a SMFChess button from my custom theme:
    //Begin SMFChess code
    if($context['allow_chess'])
        echo '
        <a href="', $scripturl, '?action=chess"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chess.png" alt="', $txt['SMFChess'], '" title="', $txt['SMFChess'], '" /></a>', $context['menu_separator'], '&nbsp;&nbsp;&nbsp;';
    //END SMFChess code


Does anybody know how to add that kind of link with the "strong" tags in this button below? (this is probably very easy for those who are PHP programmers)

feeble

#81
well since you are using images instead of text, its a little more difficult, but doable

just create another button image however you want, just needs to be a stronger version, for example "Chess!"
call it "chess_strong.png" and upload it to where the other buttons are located

then use
    //Begin SMFChess code
    if($context['allow_chess'])
        echo '
        <a href="', $scripturl, '?action=chess"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/'.($context['user']['chess_turn'] != 0 ? 'chess_strong' : 'chess').'.png" alt="', $txt['SMFChess'], '" title="', $txt['SMFChess'], '" /></a>', $context['menu_separator'], '&nbsp;&nbsp;&nbsp;';
    //END SMFChess code

*Fixed as per Paracelsus

Paracelsus

It worked after putting an extra dot "." before the PNG in the syntax you mentioned... thanks feeble ;)

jossanaijr

Any possibility to include an option to show some stats in Info Center?

weightman

Feeble, is it possible that this mod conflicts with the javascript copy link feature in the user profiles by the referals mod? It doesn't seem to copy to the clipboard on my site and I am wondering if it might be a conflict with this mod per your previous post on javascript conflicts.

Link for referral mod: http://custom.simplemachines.org/mods/index.php?mod=1114

Thanks very much

PLAYBOY

Turkish language file is horrible. It doesnt translate most of the things. Also some places are totally blank. Please get me a full language file which contains every word in the mod, so i can translate them all to turkish and make this mod perfect for turkish users also.

PLAYBOY

also language files are not included in MODs page.

feeble

#87
Quote from: jossanaijr on March 14, 2008, 09:15:42 AM
Any possibility to include an option to show some stats in Info Center?
What were you after it to say?
also this might have to wait till I get the SSI out.

Quote from: weightman on March 17, 2008, 01:10:44 AM
Feeble, is it possible that this mod conflicts with the javascript copy link feature in the user profiles by the referals mod? It doesn't seem to copy to the clipboard on my site and I am wondering if it might be a conflict with this mod per your previous post on javascript conflicts.

Link for referral mod: http://custom.simplemachines.org/mods/index.php?mod=1114

Thanks very much

I took a look through the code of the referral mod.

It doesn't look like the JavaScript is conflicting at all, since they aren't being loaded at the same time.

has it ever worked?
also what browser are you using and have you tried using the copy link in either IE or firefox.
Has the mod author stated anything about it being a little buggy?



Update on whats been happening lately.
Everything is going smoothly, just been taking a break for the last week and working through any issues sites have been having with the mod.
Mostly its just been conflicts between other javascripts and theme issues, which is good as I haven't had to make any changes to the mod itself to gets things to work correctly on the sites that were having issues.
This week I'll be working on the SSI and a language pack.

feeble

Quote from: PLAYBOY on March 17, 2008, 04:23:55 AM
Turkish language file is horrible. It doesnt translate most of the things. Also some places are totally blank. Please get me a full language file which contains every word in the mod, so i can translate them all to turkish and make this mod perfect for turkish users also.

Any possibility to include an option to show some stats in Info Center?
Heya PLAYBOY.

Sorry about this, reason for the languages packs aren't on the mod page yet is because they are out of date which is why you are getting these blank and incomplete language files.

I'll get out a language pack soon, as the Turkish language package will need to be updated with the full list of text strings, instead of a partial list(as it currently is)

PLAYBOY

You know im a patient guy, since i have been waiting for a complete language pack least 6 months. Now could i politely ask you to be a little quick on this issue please?

weightman

QuoteI took a look through the code of the referral mod. It doesn't look like the JavaScript is conflicting at all, since they aren't being loaded at the same time.

Ok, thanks very much.

Quotehas it ever worked?
also what browser are you using and have you tried using the copy link in either IE or firefox.
Has the mod author stated anything about it being a little buggy?

Not on my site it hasn't (not in IE7, FF2 or FF3b3orb4), but it works on other sites that have the mod installed. The mod author doesn't think its a problem with the referral mod.

Thanks for the help

Paracelsus

Feeble,

When reading the rules of "Dark Chess" I noticed that you have to capture the king but it states nowhere that once a king is in "check" it can't get away from it. I've played a game where I did a check to the opponents king with my queen and the game ended instantly by check-mate. If you look at the picture you see the king could still be moved to a safe location, so I really don't understand it it's supposed to be like this or a flaw in the game variant.


jossanaijr

Quote from: feeble on March 17, 2008, 06:48:57 AM
Quote from: jossanaijr on March 14, 2008, 09:15:42 AM
Any possibility to include an option to show some stats in Info Center?
What were you after it to say?
also this might have to wait till I get the SSI out.
It could be in the bottom, after Users Logged In Today.
Perhaps something like SMFCHESS Users Stats and show Ranks #1#2 and #3.
Thanks.

feeble

Quote from: Paracelsus on March 17, 2008, 02:07:30 PM
When reading the rules of "Dark Chess" I noticed that you have to capture the king but it states nowhere that once a king is in "check" it can't get away from it. I've played a game where I did a check to the opponents king with my queen and the game ended instantly by check-mate. If you look at the picture you see the king could still be moved to a safe location, so I really don't understand it it's supposed to be like this or a flaw in the game variant.
Thanks for this btw, I took another read of the rules that I was using as a guide
http://en.wikipedia.org/wiki/Dark_chess

And that makes more sense when you put it like that.

Ill make some adjustments so that it will be checkmate if for example
"Its blacks turn and the white king is in check"

or am I still reading this wrong?

Ill also add "1 space infront of the pawn is visible"

Anything else?

Paracelsus

I think you are reading it right ;)

mightygiants

Feeble,

THANK YOU!!  All your assistance was terrific!  The mod is now up and running and my group loves it!  Thanks again for all your help.

Rich

PLAYBOY

mod doesnt work on firefox.

It doesnt show the checkered board but only the pieces and number&letters on the border.

I cant see the chess board on firefox.

1.1.4 custom theme

Godsongz

 ??? ??? ??? Erm...  it seems to work just fine in Firefox here, I just tested it.  I have several chess players who use FF also, so I'm sure I would have heard from them.  My site is also 1.1.4, but with the default theme.

PLAYBOY

Well you may be right. Maybe its not the firefox. But let me give details of the problem.

the checkered board cant be seen in firefox. and its not a problem only myself have, all of the firefox users i have having the same problem. however everything is ok in internet explorer. and i know its not about the java i have, because just yesterday i have installed the latest version of java.

i use a custom theme, so maybe i need to copy a java scripts or a file to custom theme folder? or i need to make a little change to theme somewhere?

i wasnt having this problem with the old versions of smf chess but the newest official version made some problems on firefox. i can get you guys a screen shot if requested.

feeble

Quote from: PLAYBOY on March 19, 2008, 04:28:57 AM
Well you may be right. Maybe its not the firefox. But let me give details of the problem.

the checkered board cant be seen in firefox. and its not a problem only myself have, all of the firefox users i have having the same problem. however everything is ok in internet explorer. and i know its not about the java i have, because just yesterday i have installed the latest version of java.

i use a custom theme, so maybe i need to copy a java scripts or a file to custom theme folder? or i need to make a little change to theme somewhere?

i wasnt having this problem with the old versions of smf chess but the newest official version made some problems on firefox. i can get you guys a screen shot if requested.

A screen shot would be great.

Advertisement: