The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Widget - Today's Birthdays Details »» | |||||||||||||||||||||||||||||
First I want to thank Lynne for giving me a good startup for both code and this post from her Widget - Online Users mod.
This is a widget for your CMS pages to show Today's Birthdays. You will need to Create a new Template (vbcms_widget_execphp_birthdays), Cache the template, Create a new Widget (Today's Birthdays), Configure the Widget, and then finally add the Widget to your Layout (I am not including instructions for that, you should know how to add Widgets to Layouts). 1.0 2010-12-10: First version (4.0.8) INSTALL INSTRUCTIONS: 1) Create a new Template Styles & Templates > select style (I like to do this in the MASTER STYLE, but you will need to reinput it after every upgrade) > Add Template Title - vbcms_widget_execphp_birthdays Template code - HTML Code:
<vb:if condition="$show['birthdays']"> <div class="cms_widget category_widget"> <div class="block"> <div class="cms_widget_header"> <h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" /> {vb:rawphrase todays_birthdays}</h3> </div> <div class="cms_widget_content widget_content"> <div> <ol class="commalist"> {vb:raw birthdays} </ol> </div> </div> </div> </div> </vb:if> 2) Create a new Plugin Plugins & Products > Add New Plugin > leave everything default except: Hook Location - cache_templates Title - Cache template for Today's Birthdays Widget Plugin PHP code - PHP Code:
3) Create a new Widget vBulletin CMS > Widgets > Create New Widget Widget Type - PHP Direct Execution Title - Today's Birthdays SAVE 4) Configure the Widget Now go to vBulletin CMS > Widgets > Today's Birthdays > Configure Change the Template Name to - vbcms_widget_execphp_birthdays Add the following code - PHP Code:
Download Now
Screenshots
Show Your Support
|
Comments |
#2
|
||||
|
||||
Thank you! Works great.
|
#3
|
|||
|
|||
Code:
Parse error: syntax error, unexpected T_LNUMBER in /home/socially/public_html/forums/includes/class_core.php(4074) : eval()'d code on line 2 Got ride of the error by clearing the CSM CACHE and / or Verify and Repair Node Table Setup a test account with today as the accounts (fake user's) birthday. Nothing showed up, so this seems not to be working for me. |
#4
|
|||
|
|||
which vb version are you using?
|
#5
|
|||
|
|||
4.0.8 Patch Level 2
Thanks for the quick reply |
#6
|
|||
|
|||
FIXED.
It works.... But it only showed up after I logged into my "demo / test account". What I had done was change the birth date from within the admin account to reflect today. But oddly enough it would not show up until I finally logged into that account. My "demo / test account" is simply another user to which I made to see things from another point of view, without having to make the changes on my account or another user's (2 browser going at once). (my test site basically died off and I've not gotten to re-making a new one yet... So much work) |
#7
|
|||
|
|||
That sounds logical. Since Birthdays make use of the datastore and when updating a user in the admincp you don't update that. Therefore the user did not come up as having a birthday on that day. I'll add a comment to the startpost that it's useful to clear the CMS cache after install! I am glad it all works! (Y)
|
#8
|
|||
|
|||
Hi ZexTasy,
I want display winget in forum block. I have complet step 1,2 and 4. At step 4 I config: Title: Today's Birthdays Active: Yes Content type: PHP Content: PHP Code:
After complete these step then nothing is happen. I do not know any mistake in these step. |
#9
|
|||
|
|||
Did you clear the CMS cache?
Also, when no one has a birthday today, the widget won't come up ... |
#10
|
|||
|
|||
is it working as a forum block? (in the forum sidebar)
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|