Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #21  
Old 08-18-2001, 08:46 PM
JackG JackG is offline
 
Join Date: Nov 2001
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oooooooh YEAH It works..displays the events
fim but on top of the 5 events listings I get this error:

Warning: Failed opening './global.php' for inclusion (include_path='') in D:\websites\clubFREESTYLE.com\test.php on line 138


you can see for youself on our test page:

http://www.clubfreestyle.com/test.php

(left side column)

-----------------------
If i change the code to reflect: forum/admin

I get this error:

Warning: Failed opening '/forum/global.php' for inclusion (include_path='') in D:\websites\clubFREESTYLE.com\test.php on line 137



Thanks
Reply With Quote
  #22  
Old 08-18-2001, 09:00 PM
JackG JackG is offline
 
Join Date: Nov 2001
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATE:

I removed the : include('./global.php');
call and it works fine with no error

Is this ok to do?
Reply With Quote
  #23  
Old 08-28-2001, 03:14 PM
Pyro Pyro is offline
 
Join Date: May 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi everyone,

this hacks just works fine - if, yes if the php file which includes the calendar_hack.php3 is in the vb directory.

I would like to include the hack code like this
PHP Code:
<? include ("calendar_hack.php3"); ?>
in my index_homepage.php3 file which is NOT in the vb directory.

When I do this from outside that dir, it always give me a
Quote:
Failed opening required './global.php3' (include_path='')...
When I use the absolute path to global.php3 in the calendar_hack.php3 file, it does not find the config.php3...

So, how do I have to include correctly (best would be in absolute paths) that it works for pages from outside the vb directory???

Many thanks in advance!
Markus
Reply With Quote
  #24  
Old 08-29-2001, 01:51 PM
Pyro Pyro is offline
 
Join Date: May 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks,

chdir('directory');

before the inclusion is the correct way...

Markus
Reply With Quote
  #25  
Old 02-06-2002, 10:44 AM
atease atease is offline
 
Join Date: Nov 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 >= '"
.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.

tried this but get this error: Fatal error: Failed opening required './admin/config.php' (include_path='.:/usr/local/lib/php') in /home/atease/public_html/forums/global.php on line 72

does anyone know what i might have done wrong?
i'd appreciate it.
thanks
Reply With Quote
  #26  
Old 03-13-2002, 06:10 AM
sysmom sysmom is offline
 
Join Date: Oct 2001
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I have a completely new (but spectacular) issue with this great little scrap of code that calls out the next 5 events.

First, it works,

However, I'm changing things over to a PostNuke front page and content pages for a site, with VB as the workhorse forum and community.

I need the little events script to run in a standard php block for PostNuke. The PostNuke is in a separate mySQL database from the vBulletin.

Now, I did get it to run. BUT, it seems to *clobber* the living daylights out of a couple (but not all) other modules that are used with PostNuke.

So the page loads, the events are listed, but the moment you try to go to one of the affected modules, it starts spitting out:

Warning: Supplied argument is not a valid MySQL result resource

and goes on to give the path of the php file, which I won't bore you with here. There's a few warnings like this. It's really quite spectacular all over the screen.

First, let me say I know enough about php and mySQL to be dangerous. But I follow directions very well!

I have a suspicion that after the events query is made, the rest of the page gets confused about what database it is in. But why this only happens with some modules and not others is a mystery to me.

I might be all wrong.

Whatever is happening, it isn't pretty, and I'd really like to be able to include the events on the front page.

I don't know how to fix it, whether it is what I think it is or not, though. :|

Would someone please explain to me what could be going on, and how to fix it? I can point you to specific files and examples if needed, but I'll bet you vBulletin and php gurus would know what to do in your sleep with your hands tied and your computer off! It seems like some sort of obvious error condition like that to me.

Halp Mr. Wizard!

-deb
Reply With Quote
  #27  
Old 03-16-2002, 06:17 PM
Broncos Broncos is offline
 
Join Date: Mar 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can get this to work fine if I call the events.php file itself. But when I try to include that file on my front page I get the following:

Warning: Failed opening './global.php' for inclusion (include_path='') in /path/to/my/board/events.php on line 3

Fatal error: Call to a member function on a non-object in /path/to/my/board/events.php on line 5

I tried putting the assolute path in line 3:

include('/path/to/my/board/global.php');

but that simply produces a blank screen?
Reply With Quote
  #28  
Old 03-17-2002, 11:02 PM
WebMasterAJ WebMasterAJ is offline
 
Join Date: Oct 2001
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just found this, and it is EXACTLY what I'm looking for. When I originally installed the hack, I had less than 5 next events. I then added a lot more dates (about 15 more).

Now, I receive this error:

Warning: Cannot add header information - headers already sent by (output started at /path/username/to/boards/calendarfront.php:3) in /path/username/to/boards/admin/functions.php on line 1581

I named this PHP script calendarfront.php

Thanks for any help!
Reply With Quote
  #29  
Old 03-18-2002, 01:19 PM
WebMasterAJ WebMasterAJ is offline
 
Join Date: Oct 2001
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did some more trouble shooting with this and found that when I went DIRECTLY to the page that loads the script I get that error. However, if I first go to my message boards, and then go to the page, it works fine.

EX: Go to http://www.finheaven.com/, then http://www.finheaven.com/seasonal/dates.shtml in a new browser window after all other windows are closed

Someone I talked to said that it sounds like a cookie issue, but that's just a guess - i.e. expecting a cookie to exist that does not

However, if you go to the message boards: http://boards.finheaven.com/ and then type the URL in the Address bar it works fine. Strange....

Any ideas?
Reply With Quote
  #30  
Old 03-18-2002, 03:08 PM
WebMasterAJ WebMasterAJ is offline
 
Join Date: Oct 2001
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found out why the problem was being caused. Thank you for your time.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:05 AM.


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.04109 seconds
  • Memory Usage 2,258KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete