Jump to content
MakeWebGames

Christmas Advent Calendar [ WORKING COPY }


Uridium

Recommended Posts

If no-one has ever seen an Advent calendar then visit google ;) But for those that have then you will understand the concept of this mod There are 25 doors to open on the calendar ranging from day 1 to 25th < Xmas Day > Whilst users are opening the doors they will get a nice cash reward for each day and just so this Mod isnt boring once a door has been opened the user can click on the Advanet calendar to reveal an image behind the door... Theres a big Surprise for Members once the 25th has been reached. I'll post some screenies for you all to see it... In a few minutes...

SCREENIES

Calendar Frame.....

emptygrid.jpg

A Few Random doors Opened

emptygridopen.jpg

Christmas Message ( when door 25 is opened )

emptygridmessage.jpg

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

SQLS

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Call this file advents.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now create a TXT file call it words.txt and add these words or you can make up your own...

Did you know: Pope Julius Ist declared Christ’s birthday as December 25th sometime during the 4th century.

Did you Know: Christmas trees received their first written acknowledgement in Germany in 1531.

Did you Know: The first Christmas card was designed by John Horsley in 1840 but was not sold until 1843.

Did you Know: Alabama was the first state in America to proclaim Christmas day as a legal holiday in 1836

Did you Know: Austria issued the first Christmas stamp in 1937

Did you Know: Christmas Pudding was originally a type of porridge with fruit in it

Did you Know: In the festive song, ‘The 12 Days of Christmas’, there are 364 gifts.

Did you Know: Italian children are brought gifts by a friendly witch, as well as Santa Claus

Did you Know: The average person in Britain sends 50 Christmas cards

Did you Know: This great script was written by illlusions

Did you Know: The Queen's Christmas speech was first shown on television in 1957.[/b[

 

PART 2 Follows

Link to comment
Share on other sites

now call this file adventimage.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And call this one adventgraph.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add this small piece to your cron_day.php

$db->query("UPDATE users SET calturn=1 WHERE calturn=0");

And finally upload these images the Main image goes in your root folder adventgridnumbered.png then create a folder on your ftp for images/xmas and place all the rest of the images nito the xmas folder.

Link to comment
Share on other sites

download adventimages

dowbnload the below Zip extract the image called adventgridnumbered.png and place it into your public_html folder

download Image for Root <<< IMAGE UPDATED SORRY MY FAULT....

FORGOT TO MENTION

add a link on mainmenu.php or explore.php pointing to adventcal.php

WORKING DEMO you will have to register

when REGD goto adventcal.php

if you like this script then gizz some dosh i know its a freebie but hey Christmas is drawing near :)

[paypal][email protected][/paypal]

Link to comment
Share on other sites

Cool mod, Gona add a few things thogh like points donator days and money maby make an item called chocolate :D

insted of 25 fields added to the user tabl;e why not do something like

FIELD NAME befor colected - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25

FIELD NAME AFTER CLOLECTED - 1c,2c,3c,4c,5c,6c,7c,8c,9c,10c,11c,12c,13c,14c,15c,16c,17c,18c,19c,20c,21c,22c,23c,24c,25c

$fields = explode(',', $ir['FIELD_NAME']);

//probly is a better way to do this

$int = (int) $fields[1];

if ($int==$fields[1]) {//colect} else {echo 'you have this pack';endpage();exit;}

by no means am i saying this work just saying it saves code plus data

Link to comment
Share on other sites

when you run out of coffee at 4:30am you dont care how the tables look ;)

However i am working on a paid vesion of this which will i clean up

And still need to add the calcount which just tells the users which day they are on

The hardest part was the Co-ords that took the longest time as some of the grid Squares are not equal to 100x100 some are smaller..

I used Coral, Paintshop Pro for the co-ords to begin with and found that Crappy Microsoft Paint Worked the best at giving me a better idea of the Co-ords...

**FOOTNOTE**

Ive set the calturn to 0 but you will need to

alter table users set calturn=1 where calturn=0

On the 1st so that will start the calendar off then add the cron for it on that day..

Link to comment
Share on other sites

looks good on the test site.

but, it lets me keep opening the box over and over. ?? dont think you meant for that did you?

and the opened box did not show up after i opened one. but still a nice mod.

most of your mods are very good and bug free. keep up the great work.

 

The TEST site allows 24 doors to be opened at once so you can See the calendar and test it However when its on your site you calturn will be set at 1 door to be opened per day...

 

and the opened box did not show up after i opened one. but still a nice mod.

Mcfarlin i see you opened the same door 8 times Thus meaning you didnt goto Door 2 you must have refreshed the screen on door. This is to stop epople going straight from 1 and opening door 25.

Link to comment
Share on other sites

  • 2 weeks later...

[mysql]The requested URL /adventgraph.php was not found on this server.[/mysql]

i looked to see if i missed that file, three times. lol but i dont see that its posted here.

and shouldnt

[mysql]$db->query("UPDATE users SET calturn=1 WHERE calturn=0");[/mysql]

be

[mysql]$db->query("UPDATE users SET calturn=calturn+1");[/mysql]

correct me be all means if im wrong, but the first one will just set those who have not went to the advent calender and opened one, to they have opened one. the second one should keep those who have not opened any from joining in the fun mid way through the calender and getting the benefits of the whole thing. would it not?

it would keep a guy from going there on the last day and just opening all of them right? that way they are rewarded for being active, not being on the last day.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...