Log in

View Full Version : Adding a Conditional


oglsmm
12-06-2005, 02:58 AM
Hey,

I have moved parts of the What's going on Box to the top of my forum. Only have the Upcoming Events and Birthday's there.

I made a conditional to only have it show to specific groups and that was fine.

Now I want to add a second conditional to only show the box If there is actually an Event (Birthday/Calender Event) in the next 7 days.

Any suggestions on how to go about this?

jpennington
12-06-2005, 03:10 AM
I know it can be done, but I'm sure of the exact code. You would just need to say if event time minus current time is the current time with the event time and if it is less than or equal to 241920 (one week unix) then show the table.

Dark Riku
12-06-2005, 03:18 AM
This has been posted many times... but kind of hidden...

if ($vbulletin->userinfo['usergroupid'] == 9)
{
echo "What you want here";
}


Change the 9 with the usergroup you want using it.

oglsmm
12-06-2005, 03:28 AM
This has been posted many times... but kind of hidden...

if ($vbulletin->userinfo['usergroupid'] == 9)
{
echo "What you want here";
}


Change the 9 with the usergroup you want using it.

I have that part fine.... What I am having trouble with is the conditional to only Show the events box IF an event is upcoming within next 7 days.