Results 11 to 16 of 16
-
17th Jun 2010, 11:34 AM #11Member
I remember some sites were showing my current time(from my computer) is there a way to implement that code into this one?
Good work
-
17th Jun 2010, 11:43 AM #12Member
well, I've modify the code for the CSS stylesheets to change everyday.
here is the sample for phpbb
PHP Code:<link href="{T_THEME_PATH}/
<!-- PHP -->
$today = Date('D');
switch ($today){
case 'Mon';
echo 'style1.css';
breaK;
case 'Tue';
echo 'style2.css';
breaK;
case 'Wed';
echo 'style3.css';
breaK;
case 'Thu';
echo 'style4.css';
breaK;
case 'Fri';
echo 'style5.css';
breaK;
case 'Sat';
echo 'style6.css';
breaK;
default;
echo 'style1.css';
breaK;
}
<!-- ENDPHP -->
" rel="stylesheet" type="text/css" media="screen, projection" />
-
17th Jun 2010, 11:50 AM #13Respected Developer
what about a javascript touch?
Code:<script language="javascript"> <!-- Stamp = new Date(); var Hours; Hours = Stamp.getHours(); if (Hours >= 7 && Hours < 19) { document.write('<link rel="stylesheet" type="text/css" href="/static/css/default_dayt.css" />'); } else { document.write('<link rel="stylesheet" type="text/css" href="/static/css/default_night.css" />'); } //--> </script>
Bots Development | Web Development | Wordpress Customization | PSD Conversion
Life has many twists and turns in it, you have to take what you are given and use it for the best.
-
17th Jun 2010, 02:15 PM #14MemberWebsite's:
litewarez.net litewarez.com triniwarez.comYour best of using javascript for this, unless your detecting the users timezone and using PHP's functionality such as set_timezone() etc.. because me and jay would see a day version but people in other countries will see the day version even if it is night time !
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
20th Jun 2010, 08:50 AM #15Member
Thanks Jay & Elj.
-
20th Jun 2010, 12:12 PM #16Member
As someone pointed out it would only show the server time.
I will take vb as an example, say your forum time is set differently you can use the var $vboptions[timeoffset] - which is the forum time offset
(im sure there is one for users which will fix the issue of users with different time zones)
Anyways good code jay, most of these ive seen is in javascript.Please follow signature rules
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Long time lurker, first time poster
By Opie in forum IntroductionsReplies: 1Last Post: 27th Sep 2012, 06:53 PM -
[VPS] Need USA based RDP
By masterlog in forum ArchiveReplies: 2Last Post: 19th Apr 2011, 12:57 AM -
[WTB] Vps UK based
By Godly Chaos in forum Hosting DiscussionReplies: 7Last Post: 4th Nov 2010, 05:23 PM -
[VPS] VPS From $8.95/mo USA Based
By webhead2 in forum ArchiveReplies: 4Last Post: 20th Sep 2009, 12:55 AM -
SQL error i get from time to time
By Raven Faust in forum vBulletinReplies: 11Last Post: 27th Aug 2009, 07:54 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...