The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to link to current date for the calendar
I want to create a static image displayed on my cms that is linked to the current date for the vbcalendar. Is there a current date command so that I don't have to change the link on the picture everyday?
Is this possible? |
#2
|
||||
|
||||
You can probably use the calendar_getday_start hook and do something like:
if (!$vbulletin->GPC['day']), then set $vbulletin->GPC['day'] to todays date |
#3
|
|||
|
|||
Quote:
What do I use as the href on the image? Thanks! |
#4
|
||||
|
||||
calendar.php?do=getinfo&c=xx
xx would be the calendar id. That link is not going to work right now because the date isn't specified which is why I'm saying to specify today's date in the plugin and then it will work. |
#5
|
|||
|
|||
I disabled it because it was giving errors.
Here is the link I used. http://www.rotharmy.com/forums/calen...do=getinfo&c=1 The calendar is 1 (the public calendar) Here is the error, Parse error: syntax error, unexpected ',' in /home/content/r/o/t/rotharmy/html/forums/calendar.php(1160) : eval()'d code on line 1 here is how I entered it into the hook manager. |
#6
|
|||
|
|||
thanks for helping with this Lynne!
|
#7
|
|||
|
|||
Lynne wasn't posting the exact code, just a description of what needed to be done. But try this:
Code:
if (!$vbulletin->GPC['day']) $vbulletin->GPC['day'] = vbdate('Y-m-d'); |
Благодарность от: | ||
Lynne |
#8
|
|||
|
|||
That works! So it should point to tormorrows date after midnight (server time)?
Thanks! |
#9
|
|||
|
|||
That should go by each user's local time. If you want to always go by the server time, change vbdate to just 'date' (without the quotes).
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|