The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vB3 calendar showing on non vb page
Ok... I would really need a hack for the vB3 calendar. What I want it to do is to show for example the 5 comming happenings on my site (not on vb). Since you can have multiple different calendars in vB3 it would be really great if someone also could fix so the script only reads from one of the calendars.
|
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
No vb3 hacks untill rc, it is posted.
|
#4
|
|||
|
|||
oh, that's a pity :|
|
#5
|
|||
|
|||
Hey man I gotcha covered
this is NOT a hack as many people seem to think you are simply reading from the MYSQL DB data that VB3 has put there... So chill you damn nazi's www.midwestlan.com almost everything on that site is tied to vb3 and not one VB3 file has been modified, all just custom PHP scripts and SQL calls. in the top right hand corner you can see a listing of coming events. heres my code for it: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Works like a charm with Vb3. Enjoy! Now all I need to do is find out how to use the parse bbcode function in vb3 for my site news... theres no formatting that I can access for post data like I used to be able to before in vb2... that was the whole reason I came snooping today |
#6
|
|||
|
|||
We have a few scripts that get latest posts etc that get written to a js file for including on non-vb pages. After upgrading from 2 to latest 3 these all work except for the one accessing the calendar.
The php routine we have always used is as follows, then the error we get. Presume the calendar is held differently in vb3 - Any help appreciated. require("includes/config.php"); $num_active = 20; $num_chars = 75; $db=mysql_connect($servername,$dbusername,$dbpassw ord); mysql_select_db($dbname); $fp = fopen("news/events10.js", "w"); @flock($fp, 2); $today = date("Y-m-d",time()); print ("$today<br>"); $querylatest="SELECT event, DATE_FORMAT(eventdate,'%a %d %b') AS date, eventdate, eventid, subject FROM calendar_events WHERE (public = 1 AND eventdate>='$today') ORDER BY eventdate LIMIT $num_active"; echo $querylatest; $resultlatest = mysql_query($querylatest,$db); while ($event = mysql_fetch_array($resultlatest)) { $eventid = $event[eventid]; $eventtitle = addslashes($event[subject]); $eventdate = $event[date]; print ("<b>$eventid $eventtitle $eventdate</b><br>"); fputs($fp, "document.write(\"<a href='http://www.southportforums.com/forums/calendar.php?action=getinfo&eventid=$eventid'>$eve nttitle</a> $eventdate<br>\");\n"); } @fclose($fp); print ("<br><b><u>Events Have been updated - Thank You</u></b><br><br>"); Causes error.... 2004-09-04 SELECT event, DATE_FORMAT(eventdate,'%a %d %b') AS date, eventdate, eventid, subject FROM calendar_events WHERE (public = 1 AND eventdate>='2004-09-04') ORDER BY eventdate LIMIT 20 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result |
#7
|
|||
|
|||
Incredible Clegg!! Thaks a lot for share your code.
May I made you a question? How do you do to show last posts at your main page? I made a script that obtains last posts and prints out the texts, but it shows unparsed texts withs BBCODE TAGS and so... May you help me? Thanks in advance |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|