Convert this javascript to PHP?

Discuss phpBB 3.0.x in general.
Forum rules
Please post any phpBB 3.1.x related topics in the forum.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Saeru
Past Contributor
Past Contributor
Posts: 177
Joined: 17 Jun 2006, 23:58
Location: Behind a PHP book.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Convert this javascript to PHP?

Postby Saeru » 08 Dec 2006, 02:17

I have a simple javascript that I have been using to display the current date on my site. But when it lands on a certain date, it changes to display that. Like if it lands on my birthday it puts up a message, or if it lands on the week of halloween it displays something else. But the rest of the time it just shows the normal date. Yes it's a holiday script.


http://phpbbmodders.net/pastebin.php?show=48
That is added to an .js file and put on the page via
<script language="javascript" src="dates.js"></script>
where the date is to show.

I have tried to make it in php but I could only get it to show the next holiday rather then just the date and just the extra stuff on the dates I want.

"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]

User avatar
Noobarmy
Past Contributor
Past Contributor
Posts: 545
Joined: 02 Jun 2006, 11:19
Real name: Anthony Chu
Location: UK
Contact:

Postby Noobarmy » 08 Dec 2006, 06:26


User avatar
Saeru
Past Contributor
Past Contributor
Posts: 177
Joined: 17 Jun 2006, 23:58
Location: Behind a PHP book.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Saeru » 08 Dec 2006, 07:02

.......umm.. for starters.. it is -not- a forum mod.. @.@ I said it was being used on my site, not my form.

This is why I rather post these in off-topic.. but everything php related ends up being moved here anyway even if it has nothing to do with phpbb! Yet being here makes people think it is! @.@

"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]

User avatar
Afterlife(69)
Member
Member
Posts: 175
Joined: 30 Jun 2006, 21:23
Real name: Dean
Location: Sydney, Australia
Contact:

Postby Afterlife(69) » 08 Dec 2006, 14:36

The concept is still the same, just change the coding.
Life in the house :)

User avatar
Saeru
Past Contributor
Past Contributor
Posts: 177
Joined: 17 Jun 2006, 23:58
Location: Behind a PHP book.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Saeru » 08 Dec 2006, 14:49

But there is no database involved. @.@

"Naku ga yousuru ichidanto tsuyosa kyaku ga icchuu wo yusuru."[/size]

UseLess
New member
New member
Posts: 13
Joined: 10 Oct 2006, 11:18
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby UseLess » 08 Dec 2006, 16:12

Movie Quote:
It's not the years honey, it's the mileage...


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB 3.0.x "Olympus" discussion”

Who is online

Users browsing this forum: No registered users and 7 guests