Goto Admincp->vBullietin CMS->Widgets->Create New Widget
Choose PHP Direct Execution as Widget's Type
Place a Title. eg Upcoming Events. Keep it short as this is what will appear as title on your pages.
Click Save
Click Configure on the right of the new created widget.
Remove the default code that appears. Be sure to not leave behind even a single letter.
Copy and Paste the code that you can find below.
Leave the template name as is (vbcms_widget_execphp_page)
Click Save
Goto Admincp->vBullietin CMS->Layout Manager
Click Go on the Default Layout
Add the Widget to your Layout
Click Save
That's all !!
PHP Code
PHP Code:
ob_start();
// %d
$show_count = 5;
$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || ( dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);
I tried with the code in the main page and it gives a blank page.
I also created an event for tomorrow to test but nothing showed up. Please help !!
Quote:
ob_start();
// %d
$show_count = 5;
$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || ( dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);
This is probably entirely off-topic to this widget specifically, but I was hoping someone could help me out. Once I create the widget, I click configure, and copy the code in. But when I hit Save, it closes out the Configure box without saving the changes, and when I hit Configure again the default PHP Widget code is still there. I have narrowed it down to pretty much just the PHP Widgets, at least as far as what I use. I can still edit and save my Static HTML Widgets just fine. Any ideas?
Edit: Nevermind, it is Widget specific. It's just not saving THIS code. I can delete the default and save it blank, or save it with random text, but it will not save this code.
The widget only shows one date to me, even though I have two test events and even though they have names. How come?
I use the newest vB 4 installment in German.
Range events are working, but when there's a recurring event the widget only displays the range.
I have created a recurring event. The range is starting Jan 01, ending Dec 31 and the event is 1st Sunday of every month.
The event is listed, but the widget just displays this:
My Event
From Sat Jan 1st 2011 to 31st Dec 2011
And because the range started Jan 1st, this event is always at the top of the list.
Any way to get help on this? Ranged reoccurring events are problematic and the ONLY issue remaining for me. We have our monthly general and board meetings defined in our calendar, and the widget shows the entire range.
Thunderbird Hamfest
From Sat Jan 7th 2012 to 7th Jan 2012
Board Meeting
From Fri Jan 13th 2012 to 13th Jan 2014
General Meeting
From Fri Jan 20th 2012 to 1st Feb 2013
Arizona Centennial
On Sun Feb 12th 2012
I need it to say the date for the upcoming event, and not display the range. It's completely useless that way. Many people have asked for help on this and they have all gotten ignored.