PDA

View Full Version : Miscellaneous Hacks - Cyb - Tic-Tac-Toe


Valter
07 Aug 2006, 12:52
vB 3.7 VERSION HERE
http://www.vbulletin.org/forum/showthread.php?t=177960

====

Info:
Easy integration of Tic-Tac-Toe game with vBulletin forum software.

The forum user play against the computer, and it has 4 levels of difficulty that are user-selectable. It also includes history of the game. Admin can change competitor name, select usergroups who can play the game, choose different images for X, O, and BGD.

Thanks to:
- Brian (http://www.dynamicdrive.com/dynamicindex12/tictactoe.htm) from Dynamic Drive for original version of this javascript game
- yoyoyoyo (http://www.vbulletin.org/forum/member.php?u=71842) for his vB release for vB 3.0
- Atakan KOC (http://www.vbulletin.org/forum/member.php?u=130169) for his vBulletin releases for vB 3.5/3.6

This version is preety different. Requires no file uploads nor template edits. It's easy to show/hide the game when browsing forums. It's phrased, looks little better, and integration with vB is improved. How? See screenshots and try it.


Installation:
1. Import XML file as Product through your Admin CP
2. OPTIONAL (If you are using some very customized styles):
Open template "FORUMHOME" and add "$cyb_tictactoe" after "$navbar". Save.
Open template "navbar" and add "$cyb_tictactoe_link" after "vbphrase[user_cp]</a></td>". Save.


Note:
Default images are stored at imageshack.com (to avoid files uploads when installing hack). If you want you can upload them to your own server and then change paths in product settings. Of course, you can use your own images too (one for X, one for O, and blank one).


Versions:
v1.0 - Jun 19. 2006.
- First version (never released here :p)
v1.1 - Aug 07. 2006.
- No more files uploads required
- Added options to choose images locations. Default ones are stored at imageshack.com (to avoid files uploads when installing hack). If you want you can upload them to your own server and then change paths in product settings. Of course, you can use your own images too.
v1.2 - Aug 07. 2006.
- Fixed bug that game can't be opened from other pages than forumhome


Click INSTALL (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=123287) if you like this.


Cybernetec

Neal-UK
07 Aug 2006, 14:10
In the UK, we call that Naughts and Crosses.

Nice release.

Atakan KOC
07 Aug 2006, 16:52
Thanks Cybernetec;

Silvio
07 Aug 2006, 18:33
ty so much. really appreciated!:cool: *InStAlLeD*

Silvio
07 Aug 2006, 18:52
*InStAlLeD*<---- lol on my 3.5.5 works on index page only but is really cool. I'll add this one to my new 3.6 forum installation 4sure!!.
ciao take care

Valter
07 Aug 2006, 19:52
v1.2 - Aug 07. 2006.
- Fixed bug that game can't be opened from other pages than forumhome

iran.gs
07 Aug 2006, 21:22
lnstalled ty very easy and simple.

Silvio
08 Aug 2006, 00:11
Is working great also on 3.5.5. now ty.
pls note that doesent seem to worg great with user subgroups

ciao
take care

Wordplay
08 Aug 2006, 15:32
would be cool if you could make this for that game 4 wins. where you need 4 in a row to win.

it's like an extention of tic tac toe.

bolly.beats
16 Aug 2006, 06:35
thank you buddy but its keep sayin me choose an empty field :( what does it mean lol ?

barny
24 Aug 2006, 21:29
as get I link in navbar of vba ?

Valter
24 Aug 2006, 23:51
thank you buddy but its keep sayin me choose an empty field :( what does it mean lol ?
Hi bolly.beats,

Maybe you have some problem with loading images. You can't click on image - you can't play. :)

Note:
Default images are stored at imageshack.com (to avoid files uploads when installing hack). If you want you can upload them to your own server and then change paths in product settings. Of course, you can use your own images too (one for X, one for O, and blank one).

Boots
02 Sep 2006, 20:07
Installed... how do I get the link off my navbar though?

Stop
03 Sep 2006, 12:45
Very nice little hack. But it seems there's a problem with the site that has the little images. Can you please attach them so I can upload them in my site ?

Valter
03 Sep 2006, 18:36
Very nice little hack. But it seems there's a problem with the site that has the little images. Can you please attach them so I can upload them in my site ?
Attached.

Installed... how do I get the link off my navbar though?
You can't open the game without it.

And to be able to play it on any page you can move it to header/footer only, or leave it in navbar.

Stop
04 Sep 2006, 05:04
Works fine on 3.5.4.

Thanks Cyb

BioWaffen
13 Sep 2006, 19:30
Does only excist Tic Tac Toe with 3x3 ? It is easy to draw ;) so I mean bigger fields and you need more I mean

Senn
16 Sep 2006, 13:54
When I click in a field I always obtain:

"Choose an empty field". All fields are empty.

Check it:
www.macosh.com/foro

Valter
16 Sep 2006, 17:35
Upload images to your server and update their locations options in ACP.

kylek
28 Sep 2006, 08:31
Thanks for the great game.

Is there any way to position the link in the navbar? I have added a second navbar and would like the link to appear in the second one.

Thanks!!

ReadOrDie
13 Oct 2006, 20:51
Do you think you could get a few other multiplayer games like connect four, checkers and/or chess?

RFViet
18 Jan 2007, 15:16
It would be great If the number of square can be customized

Charmedfan
14 Mar 2007, 23:37
Hey,
thanks for the game but is there a solution to display the game in a separate template. I want to add it in my Games Section (I need a full link) but I do not know how to do it in a separte template.
I hope you can help me.

Thanks

Charmedfan

TVNettet
22 Mar 2007, 03:05
In Ireland we call it x's & o's :-)
thx...
Tried installing it, can't get it to work in surge.
Found the different text in the templates than to your instructions, but then the game kept saying choose another.
Still works nice in default.

Silvio
03 Jul 2007, 22:23
hi,

What I have to modify on xml (b4 reloading it) to avoid link on main navbar and fit it onto quick links of the same navbar?

I guess this is where $vbulletin->templatecache['navbar'] = str_replace($cyb_ttt_srch_game, $cyb_ttt_srch_game.$vbulletin->templatecache['cyb_tictactoe'], $vbulletin->templatecache['navbar']);
$cyb_ttt_srch_link = ('vbphrase[user_cp]</a></td>');
$vbulletin->templatecache['navbar'] = str_replace($cyb_ttt_srch_link, $cyb_ttt_srch_link.$vbulletin->templatecache['cyb_tictactoe_link'], $vbulletin->templatecache['navbar']);

lol but how?

ty very much for help

periphrastic
26 Sep 2007, 03:49
hmmm...followed instructions, not working

the skin is highly customized. i made the template changes in default (not the applicable skin template), as this "vbphrase[user_cp]</a></td>" could not be found in the customized skin template. still not showing up, however.

any advisement? thanks


edit*

got it through

now there are javascript errors

ogameclub
13 Oct 2007, 17:29
No works in Firefox

rjp0615
13 Oct 2007, 17:30
doesn't work for me in firefox either

Butcher
10 Apr 2008, 14:44
works fine in firefox here

one problem i have however. i want to use this but i have a modified template. ie; my navbar is located in my header. But all links are images. so how would i go about making the image open the game. i have added $cyb_tictactoe on forumhome but how do i link to it. You seem to use $cyb_tictactoe_link however it's not possible to use this inside <a href="link">image code</a>

is there a work around?

*EDIT*

Sorry really should start to look for myself first before asking. Anyway sorted this problem by simply looking.
If anyone else needs this info then simply use
<a href="#cttt" onclick="return toggle_collapse('cyb_fh_ttt')">image code</a> :)

Butcher
10 Apr 2008, 16:55
hmmm ok this above lets me open the tic-tac-toe box but when i click in one of the boxes to play the game it says "Choose an empty field"

Butcher
11 Apr 2008, 17:24
ok figured this out also. If anyone else has this problem then here's the fix.
Basically the problem is because my navbar is actually located within the header template. Which you'll find most custom templates/styles tend to do.

IF this is the case for you then use this product instead

xa1ax
11 Apr 2008, 22:30
It's so nice;
thank you very much

Sgt Pepper
14 Apr 2008, 09:22
i always get the error "Choose An Empty Field!". I have tryed adding my own images,then adding ur images but still nothing. I used the XML file from butcher but didnt work. Please Cybernetec help me im a big fan of ur products. I have installed 5 of them :D. Well anyways i will keep trying but if u have any help plz do

Thanking you in advance,
Sgt Pepper

Sgt Pepper
14 Apr 2008, 09:36
here are 2 screenshots of what happens

Butcher
14 Apr 2008, 16:06
you have the game above navbar
it should be below your navbar

the XML i provided will only help if you move your nav buttons/links into your header. You seem to have both. But the actual game should still show up below the original navbar

AlphaMale85
14 Apr 2008, 17:18
So user can't play against user?

Butcher
14 Apr 2008, 17:29
no this is just against computer