vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show Events on non-vb page (https://vborg.vbsupport.ru/showthread.php?t=24939)

Dave# 08-09-2001 08:26 AM

I will pay anyone who can modify the following hack

http://vbulletin.com/forum/showthrea...threadid=21232

to do the following
  • Run as a standalone script for inclusion in a non VB page
  • Be able to pull the next 5 events from the callendar (not just todays events) from todays date (including todays events)

Payment is open to negotiation but this is an urgent requirement.

Payment will be via one of the following options depending on how you want paid
  • paypal
  • cheque
  • bank transfer

Please PM me asap to get this work.

Please state:

a) The cost
b) the timescales

Thanks

Dave Campbell www.cpfc.org

sysmom 08-09-2001 02:03 PM

I'll bet Dave has a bigger budget than I do, but I'm pretty interested in this, as well.

Not neccesarily just the next 5 events, but the listings over the next X number of days would be good, too.

-deb

boatdesign 08-11-2001 01:41 PM

Me too!

Would love a mod which would show the next x events or events for the next x days on my homepage...

Freddie Bingham 08-11-2001 06:58 PM

PHP Code:

<?php

include('./global.php');
  
$events $DB_site->query("SELECT event, eventdate, eventid, subject
                           FROM calendar_events
                           WHERE public = 1 AND eventdate >= '"
.vbdate('Y-m-d',time())."'
                           ORDER BY eventdate LIMIT 5"
);
if (
$DB_site->num_rows($events)) {
  echo 
"Next Five Events:<br>";
  while (
$event $DB_site->fetch_array($events)) {
    echo 
"<a href='calendar.php?s=$session[sessionhash]&action=getinfo&eventid=".$event['eventid']."'>".$event['subject']."</a><br>";
  }
} else {
  echo 
"No Events";
}
?>

It should even be Kier approved in terms of quoted array indices but it may be subject to correction.

Dave# 08-11-2001 07:18 PM

Quote:

Originally posted by freddie
PHP Code:

<?php

include('./global.php');
  
$events $DB_site->query("SELECT event, eventdate, eventid, subject
                           FROM calendar_events
                           WHERE public = 1 AND eventdate >= NOW()
                           ORDER BY eventdate LIMIT 5"
);
if (
$DB_site->num_rows($events)) {
  echo 
"Next Five Events:<br>";
  while (
$event $DB_site->fetch_array($events)) {
    echo 
"<a href='calendar.php?s=".$session['sessionhash']."&action=getinfo&eventid=".$event['eventid']."'>".$event['subject']."</a><br>";
  }
} else {
  echo 
"No Events";
}
?>

It should even be Kier approved in terms of quoted array indices but it may be subject to correction.

You really can't imagine how happy this makes me :)

People can spout off about other products 'community' and 'support' but VB is in a different class.

I'll leave it there b4 I start gushing :)

Freddie Bingham 08-11-2001 07:34 PM

It just shows you how do it, you will have to format it how you wish. If you are not going to use the event text than you can remove it from the SELECT portion of the query.

Dave# 08-11-2001 07:39 PM

Quote:

Originally posted by freddie
It just shows you how do it, you will have to format it how you wish. If you are not going to use the event text than you can remove it from the SELECT portion of the query.
The formatting was a breeze as log as I escape " :)

It;s exactly as I needed 100% perfect and will save me lots of time every week

In action www.cpfc.org (latest fixtures)

Mike Sullivan 08-11-2001 07:44 PM

[QUOTE]Originally posted by Dave#
In action www.cpfc.org (latest fixtures)

Dave# 08-11-2001 07:46 PM

Quote:

Originally posted by Ed Sullivan
It's linking to the wrong place though :)

http://www.cpfc.org/calendar.php?act...nfo&eventid=82 gives a 404.

Should be: http://www.cpfc.org/forums/calendar....nfo&eventid=82

And make sure that's not a hardcoded sessionhash -- I don't know if you're including vB elements, which would generate a new sessionhash or what.

Fixed that :)

Ed Can you explain the session hash thing please? Should the href be different than calendar.php?s=$session[sessionhash] ?

sysmom 08-11-2001 08:05 PM

Wow, this can go on a non-vBulletin page, too?

-deb


All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01255 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete