TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 469
  • Total: 469

SMF Chess Block Code

Started by Lord Anubis, January 08, 2008, 07:29:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lord Anubis

To use this block code, you must first have the SMFChess Mod installed
(This mod is made by Feeble, any support for mod should be answered at the SMF site)

Here is an easy way to have all the SMFChess user functions in a block

Screenshot:



Demo:
Live Demo Check out the right block, and click on chess  ;)

Instructions:

1. Download THIS FILE, and unzip the package
2. Upload the folder "chessblock" to the root of your forum
3. Insert the code below into a PHP block
4. Enjoy!


global $scripturl, $context;
echo '

<img src="/chessblock/chess.png"/> <a href="', $scripturl ,'?action=chess">My Chess Stats</a><br />
<img src="/chessblock/challenge.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=challenge">Challenge</a><br />
<img src="/chessblock/matches.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=current">Current Matches</a><br />
<img src="/chessblock/matches.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=finished">Finished Matches</a><br />
<img src="/chessblock/leader.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=leaderboard">Leaderboard</a><br />
';

Jakki

Btw it is on the left..LOL and guests don't have access..LOL I tried. HEHE

platinumUWE

#2
hi there lord anubis i looked at the post and made the changes to my index template php as the post said and im getin an error on instaltion of mod board index template php and ideas or help be appreciated ty.

this is error im getting at apply mod.

18. Execute Modification ./Themes/default/index.template.php Test failed

Jakki

When I tried to install I got this error
18. Execute Modification ./Themes/default/index.template.php Test failed

Lord Anubis

Use the package parser and make the edits manually

http://www.smfhelper.info/forum/package.php5

I personally had that problem too, but it works without making the edit to the index.template.php

That seems to just make a button at the top of your forum, which you wouldn't need with this block :up:

Oh and yep, no playing Chess at my site without registration  :2funny:

Jakki

Never understood how to use that thing.

Lord Anubis

It is easy, upload a package to it and it tells you which files to edit and what to edit the files with ;)

Jakki

Did all the parsing and now my php's files are messed up and I can't get them back..LOL

Lord Anubis

#8
Huh...Did you save a copy before editing, I always keep a copy...Well what you can do is most files create another with a ~ at the end, you can take off the ~ and restore your files

But whenever installing a mod, especially if you do the code yourself....SAVE AN ORIGINAL COPY

Also, remember to install mods using the default theme...What I am guessing is you only edited the index.template.php

Hopefully this wasn't for the default  ???

Zetan

SMF creates a backup when installing any new mod via the package manager.

/ public_html / Packages / backups / before_newmod.tar.gz

You can download the file, extract and upload the contents back to your server.

This website is proudly hosted on Crocweb Cloud Website Hosting.