PDA

View Full Version : Sudoku for vBulletin


Allan
05-18-2006, 10:00 PM
Sudoku for vBulletin



Important: This hack will not work if...you must install this hack: Custom page wrapper (https://vborg.vbsupport.ru/showthread.php?t=92203&highlight=wrapper)



You must to create a new template called: page_sudoku, with in:


<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2"><center>Sudoku</center>
</td>
</tr>
</thead>
<tr height="500">
<td align="center" class="alt1">
<IFRAME SRC = "http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1" width="435" height="435" scrolling="no">
</IFRAME>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt2">
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="/forum"> Home</a> | <a href="/forum/index.php?page=sudoku">Delete Railing</a></div></td></tr></tbody>
</table>

For play to Sudoku in vBulletin, go to: www.your-site/forum/index.php?page=sudoku




Enjoy ;)



PS: don't forget to click on Install if you use this hack ^^
PS2: Idea from "cclaerhout"

Atakan KOC
05-19-2006, 09:07 PM
Nice allan. :)

Barakat
05-19-2006, 09:07 PM
love it woooooooooooooooooooooooo we will say to the newspapers bye bye

thanks man

Barakat
05-19-2006, 09:42 PM
i make for u that file on hurry

upload the file sudoku.php to ur main forum /forum/sudoku.php
upload the xml file to ur products manager

now in ur nav bar try to find

<td class="vbmenu_control"><img class="inlineimg" src="$stylevar[imgdir_misc]/nav_calendar.gif" alt="Calendar" border="0" />&nbsp;<a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>

add after

<td class="vbmenu_control"><a href="sudoku.php">sodoku</a></td>

Barakat
05-19-2006, 09:45 PM
it will work without page wrapper hack

Zachery
05-19-2006, 10:03 PM
Its not nessary to use that other hack, you can do this with builtin features.

MAke a new template called

custom_sudoku

use this code


<html>
<head>
$headinclude
<title>$vboptions[bbtitle] - Sudoku</title>
</head>
<body>
$header
<br />
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1">
<thead>
<tr>
<td class="tcat" colspan="2"><center>Sudoku</center>
</td>
</tr>
</thead>
<tr height="500">
<td align="center" class="alt1">
<IFRAME SRC = "http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1" width="435" height="435" scrolling="no">
</IFRAME>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt2">
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="$vboptions[bburl]"> Home</a> | <a href="$vboptions[bburl]/misc.php?do=page&template=sudoku">Delete Railing</a></div></td></tr></tbody>
</table>
$footer
</html>

the url is misc.php?do=page&template=sudoku

James T Brock
05-19-2006, 10:04 PM
How exactly does this work? Do I have to download the files you posted in post #4 or do I just follow the instructions from the first post and create the new template???

edit: Looks like Zachery already answered my question. Thanks.

Kyderoy
05-19-2006, 10:09 PM
Can you make this easier for a newbie at modding?

Zachery
05-19-2006, 10:17 PM
It doesn't get much easier than adding a new template

AdminCP > Styles & Templates > Style Manager > From the drop down Add new template

Kyderoy
05-19-2006, 10:19 PM
I am just a bit confused, does adding your template achieve the same results as the very first post?

Allan
05-19-2006, 10:21 PM
Its not nessary to use that other hack, you can do this with builtin features.

MAke a new template called

custom_sudoku

use this code


<html>
<head>
$headinclude
<title>$vboptions[bbtitle] - Sudoku</title>
</head>
<body>
$header
<br />
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1">
<thead>
<tr>
<td class="tcat" colspan="2"><center>Sudoku</center>
</td>
</tr>
</thead>
<tr height="500">
<td align="center" class="alt1">
<IFRAME SRC = "http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1" width="435" height="435" scrolling="no">
</IFRAME>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt2">
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="$vboptions[bburl]"> Home</a> | <a href="$vboptions[bburl]/misc.php?do=page&template=sudoku">Delete Railing</a></div></td></tr></tbody>
</table>
$footer
</html>
the url is misc.php?do=page&template=sudoku
Yes, bad good, thanks ;)

Zachery
05-19-2006, 10:24 PM
I also fixed the urls to be dynamic with the forums. :)

akanevsky
05-19-2006, 10:41 PM
Nice.

bashy
05-20-2006, 07:24 AM
I did this a little while back but i used Logicans Webtemplates, i didnt even think to post it here.... :o

Allan
05-20-2006, 07:40 AM
V?rification de votre licence, cliquer sur le lien en dessous:

http://www.vbulletin-ressources.com/forum/checkstatut.php

Rickie3
05-20-2006, 07:53 AM
thanx Allan and Zachery,this is excellent *installed*

Justdave
05-20-2006, 08:36 AM
I'm looking for better syntax for the rules. Has anyone re-written the rules in American English that I can use?

wizardan
05-20-2006, 09:19 AM
I'm looking for better syntax for the rules. Has anyone re-written the rules in American English that I can use?
http://www.sodokuweb.com/

:cool: wizardan clicks install

Snake
05-20-2006, 09:31 AM
Awesome man! Well done on that, Allan. :)

devilrulez
05-20-2006, 12:42 PM
awesome hack man.....

Can we get the users who are playing and only registered users can play... :D

Justdave
05-20-2006, 01:30 PM
http://www.sodokuweb.com/

:cool: wizardan clicks install

TY:rolleyes:

MustangLisa
05-21-2006, 03:03 AM
Cool, thanks. Some of my members will love this. Smooth, easy install.

dilbert
05-21-2006, 03:08 AM
I love Sudoku. Doesn't this depend on free-sudokus.com existing?
I think it would be great to have a working copy for your own site.

dashaka2
05-22-2006, 01:18 AM
is there a way to have it checked at the end to see if it was done correctly and then go on to a new puzzle?

Freesteyelz
05-22-2006, 01:42 AM
Here is a revised code (for post #6 (https://vborg.vbsupport.ru/showpost.php?p=981499&postcount=6)) which adds the </body> and $stylevar[htmldoctype] bits and miscellaneous corrections:

Add a custom template "custom_sudoku" and add this entire code:


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - Sudoku</title>
</head>
<body>
$header
$navbar
<br />
<table width="100%" class="tborder" align="center" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="tcat" colspan="2">Sudoku</td>
</tr>
</thead>
<tr height="500px">
<td class="alt1" style="text-align:center">
<iframe src="http://www.free-sudokus.com/cgi/sudoku.cgi?size=8&affiliate=1" width="450px" height="450px" name="Sudoku"></iframe>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt1">
<div style="font-weight:bold">
Rules from the official site <a href="http://www.free-sudokus.com/cgibin/rules.cgi" title="To Official Sudoku Rules">click here</a>.</div>
<br />
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</td>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="$vboptions[bburl]"> Home</a> | <a href="$vboptions[bburl]/misc.php?do=page&template=sudoku">Delete Railing</a></div></td></tr>
</table>
$footer
</body>
</html>


You can access it by misc.php?do=page&template=sudoku.

:)

*Currently testing the mod.*

Freesteyelz
05-22-2006, 03:29 AM
is there a way to have it checked at the end to see if it was done correctly and then go on to a new puzzle?

Yes. You can replace template "custom_sudoku" with the above post (#25) or...

Replace the original <iframe> code:


<iframe src="http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1" width="435px" height="435px" border="0" scrolling="no">
</iframe>


With this one:


<iframe src="http://www.free-sudokus.com/cgi/sudoku.cgi?size=8&affiliate=1" width="450px" height="450px" name="Sudoku"></iframe>


Change the "8" to a lower or higher number. Keep in mind that if you change it you may also need to adjust the "width" and "height" settings. Also for more ways to customize it go here to the official site (http://www.free-sudokus.com/cgibin/webmasters.cgi). :)

------------------------

@Allan: In my previous post (#25) I've added the fix if you're interested. The attachment down below shows the player options correctly. :)


*Now clicked "Install". ;) *

cclaerhout
05-22-2006, 01:44 PM
J'aurai appr?ci? que tu mentionnes la source qui t'a inspir?e pour d?velopper ce hack. Ne serait-ce que par convention et politesse.

French business sorry ;)

Just a word to say that unfortunately the grid provided by free-sudokus.com are sometimes quite strange. The best way would be to generate numbers with php... but it seems no script allows to do that.

davidw
05-22-2006, 03:11 PM
I'm glad to see that I wasn't the only one who was puzzle by the lack of a closing <td> tag here:<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div> Now, I guess my new question is where is the location of the opening </tbody> tag?

davidw
05-22-2006, 03:36 PM
Hehe, just thought of this using Freestylez's code (above) - for vBadvanced

Go to admincp => Add Module => Template

Module Title => Sudoku
Column => Center
Display Order => Your Choice
Active => Yes
Update all pages => Your Choice
Template to Include => adv_portal_sudoku
Style => Choose your top level style
Template Content => <table width="100%" class="tborder" align="center" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="tcat" colspan="2">Sudoku</td>
</tr>
</thead>
<tr height="500px">
<td class="alt1" style="text-align:center">
<iframe src="http://www.free-sudokus.com/cgi/sudoku.cgi?size=8&affiliate=1" width="450px" height="450px" name="Sudoku"></iframe>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt1">
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</td>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="$vboptions[bburl]"> Home</a> | <a href="$vboptions[bburl]/misc.php?do=page&template=sudoku">Delete Railing</a></div></td></tr></tbody>
</table>
Use Module Shell Template => No
The next 3 choices - leave blank, adjust usergroups as needed.

Next...

admincp => Add Page => Template

Page Title => Sudoku
Page Identifier => sudoku
Display Order => Your Choice
Meta Keywords => Your Choice
Meta Description => Your Choice
Parent Page => Your Choice
Custom Style for this Page => Your Choice
Page Active => Yes
Template Title => adv_portal_sudoku
Use Module Shell Template => No
Modules Enabled: I personally left all the left ones and right ones currently intact but only chose Custom Page Content for the center page.
Adjust the rest of the page as suited (eg usergroup permissions).

I have set it up here - http://www.christianboards.org/index.php?page=sudoku I hope I have set it visible to everyone.

Allan
05-22-2006, 04:35 PM
J'aurai appr?ci? que tu mentionnes la source qui t'a inspir?e pour d?velopper ce hack. Ne serait-ce que par convention et politesse.

French business sorry ;)

Just a word to say that unfortunately the grid provided by free-sudokus.com are sometimes quite strange. The best way would be to generate numbers with php... but it seems no script allows to do that.
Oui, tu a raison, j'avais compl?tement zapp?, excuse moi.

Je rajoute ton pseudo dans le premier post.

Freesteyelz
05-22-2006, 10:11 PM
Hehe, just thought of this using Freestylez's code (above) - for vBadvanced


I took the original template from Zachery then made a few adjustments. :) Nice work for vBadvanced, christianb. :)

As for the </tbody> or <thead> it's not necessary either. I'm not sure why it's there actually.

cclaerhout
05-22-2006, 11:25 PM
I took the original template from Zachery then made a few adjustments. :) Nice work for vBadvanced, christianb. :)

As for the </tbody> or <thead> it's not necessary either. I'm not sure why it's there actually.

This original sudoku version was at the beginning for CMPS : www.vbadvanced.com/forum/showthread.php?t=12447

But free-sudokus had changed its page. Thanks to have updated it.

Lottis
05-23-2006, 04:40 AM
Witch one of all the entries, should i use? :confused:

louis_chypher
05-23-2006, 11:19 AM
Thanks for mod.

Anyone got the vBShout displayed on the Sudoku page? If so, I'd like the info on how to.

davidw
05-23-2006, 12:07 PM
I just added the vBShout to my Sudoku page on vbadvanced...

http://www.christianboards.org/index.php?page=sudoku

MissKalunji
05-24-2006, 05:09 PM
i want to add ti to the arcade.....how can i do that?

agitated
05-25-2006, 08:37 AM
:) Which one to install. :confused: . BTW they all work.

I'd like to know how this can be restricted to members only please.
Disallow guest access ?

Allan
05-25-2006, 10:50 AM
:) Which one to install. :confused: . BTW they all work.

I'd like to know how this can be restricted to members only please.
Disallow guest access ?
It's easy, just add conditionnal to template (show just for member)
<if condition="$show['member']"> .....</if>

Freesteyelz
05-26-2006, 02:50 AM
@Allan: I suggest that you look at the changes made in post #25. A screenshot is provided in post #26. :)

carrie31
05-28-2006, 03:02 AM
hi, Freesteyelz, I used your method, it's nice !

wondering whether I should click IN TALL because the  thread starter  s Allan ...

Freesteyelz
05-28-2006, 03:36 AM
The credit goes to Allan so I say 'yes' to the "Install". I just cleaned up and made some corrections to a template originally posted by Zachery. While I'm using a different variation, I myself clicked "Install". :)

netcommander
05-28-2006, 09:36 PM
Its not nessary to use that other hack, you can do this with builtin features.

MAke a new template called

custom_sudoku

use this code


<html>
<head>
$headinclude
<title>$vboptions[bbtitle] - Sudoku</title>
</head>
<body>
$header
<br />
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1">
<thead>
<tr>
<td class="tcat" colspan="2"><center>Sudoku</center>
</td>
</tr>
</thead>
<tr height="500">
<td align="center" class="alt1">
<IFRAME SRC = "http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1" width="435" height="435" scrolling="no">
</IFRAME>
</td>
</tr>
<tr>
<td class="thead">Rules</td>
</tr>
<tr>
<td class="alt2">
<div style="font-weight: bold;">Short rules</div>
<div class="smallfont">It is necessary to fill the railing by using figures from 1 to 9. Necessarily only once in every line, column and square of 3 x 3.
</div>
<br />
<div style="font-weight: bold;">To resume the vocabulary of the guide</div>
<div class="smallfont">It is necessary to fill the railing by using 9 given symbols (Generally figures from 1 to 9, or letters indicated at the foot of the railing). Necessarily only once (but no more) on every line, column and region (or squared by 3 x 3).</div>
</tr>
<tr>
<td class="tfoot" colspan="2"><div class="smallfont"><B>Options:</B> <a href="$vboptions[bburl]"> Home</a> | <a href="$vboptions[bburl]/misc.php?do=page&template=sudoku">Delete Railing</a></div></td></tr></tbody>
</table>
$footer
</html>

the url is misc.php?do=page&template=sudoku
thanks I have installed this code but easy problem my board banner has been move to left align?
http://www.cepforum.com/forum/forumdisplay.php?f=319

davidw
05-30-2006, 05:48 PM
I clicked install as well. :)

Tim Skellett
05-30-2006, 06:23 PM
Just to say the members of my board love this hack!

CP,
06-04-2006, 10:42 PM
Ok i so want this hack but so many people have released so many fix in this thread. Where do i start, can Allan please update your hack?

Thanks

havefun
06-11-2006, 02:32 PM
THX 4 it :)

i changed the backroundcolor into #FFCC00 :
sudoku (http://www.acnw.de/board/misc.php?do=page&template=sudoku)

kylek
09-11-2006, 09:20 PM
I just installed this on 3.6.0 and its fine except when the page is loaded there is this message now:

Webmaster!

Please update the URL of this Sudoku to:

http://www.free-sudokus.com/1/8.html

Where does the change need to be made in the custom_sudoku template?

havefun
11-14-2006, 12:58 PM
@kylek

just change:
http://www.free-sudokus.com/cgi/sudoku.cgi?affiliate=1
in
http://www.free-sudokus.com/1/8.html

localroot_
11-22-2006, 01:00 PM
nice thanks

munnakv
10-22-2008, 03:27 PM
Thanks. I installed. My members will have some thing interesting to do now. :up: