Go Back   vBulletin Setup > vBulletinSetup Information > Troubleshooting vBulletin Problems

Reply 
 
LinkBack Thread Tools Display Modes
Old 02-21-2009, 03:27 AM   #1
vBulletin Owner
 
Ross's Avatar
 
Join Date: May 2007
Posts: 109
Ross has a spectacular aura about
Change text on a per day basis

Hi,

I've had a read around and can't seem to find anything that would help. I need to put some text in my sidebar that would change on a daily basis. E.g

If it's Monday, it would show "Text Monday"
If it's Tuesday, it would show "Text Tuesday"
If it's Wednesday it would show "Text Wednesday"

etc. etc.

Is this possible?

Cheers,

Ross
Ross is offline   Reply With Quote

Advertisement [Remove Advertisement]

Old 02-21-2009, 06:42 AM   #2
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Change text on a per day basis

You could maybe use Javascript.

Something like this would display the day and date but I'm not sure how you could make that into a conditional that would display other info.

<script language="JavaScript">
<!--
var now = new Date();
var days = new Array(
'Sunday','Monday','Tuesday',
'Wednesday','Thursday','Friday','Saturday');
var months = new Array(
'January','February','March','April','May',
'June','July','August','September','October',
'November','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;}
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear()));
document.write(today);
//-->
</script>
glennybee is offline   Reply With Quote
Reply 
vBulletin Setup > vBulletinSetup Information > Troubleshooting vBulletin Problems

Tags
basis, change, day, text

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
To change or not to change, v. domain/site name. tryfuhl Community Forum Management 22 07-06-2009 11:34 AM
How do you change text link color? Garala Troubleshooting vBulletin Problems 0 04-28-2008 07:57 PM
can i change in copyright text loka Troubleshooting vBulletin Problems 4 11-04-2007 11:00 AM
change direction of text(defult language) in [B]one[/B] Forum loka Troubleshooting vBulletin Problems 0 11-02-2007 03:45 PM
How can I change the forum description text to "justify" ? Dan@TT Troubleshooting vBulletin Problems 2 02-17-2007 01:02 PM


All times are GMT -8. The time now is 08:13 PM.