| View previous topic :: View next topic |
| Author |
Message |
ajhits Drive-By Poster
Joined: 31 Jul 2004 Posts: 2
|
Posted: Saturday, 31 July 2004, 16:53 Post subject: Including the blog on an existing page? |
|
|
I'm trying to test version 2.2 beta 2... it works absolutely fine with the default page. I want to make the blog a part of an index page but the files fail to get included. What should I put into the code?
Right now including settings.php and blog.php both fail.
|
|
| Back to top |
|
 |
ajhits Drive-By Poster
Joined: 31 Jul 2004 Posts: 2
|
Posted: Saturday, 31 July 2004, 19:45 Post subject: |
|
|
Never mind... I messed up the paths 
|
|
| Back to top |
|
 |
Tomasahl Drive-By Poster
Joined: 04 Aug 2004 Posts: 3
|
Posted: Wednesday, 04 August 2004, 10:05 Post subject: help-advices do not work |
|
|
Hello.
i am playing with phpbbblog now, since i find it a very smart thing. Thanks for providing it.
However, when i follow the advices in help.txt to get it in to an existing webpage I get an error 'failed to open blablabla.inc'. I have put the php-lines where they ought to be, and i also renamed it to index.php.
The page contains a lot of css, among other things a menu. can that be the problem?
Anyone that feels they have some time? I would be very grateful, and can email my index.php so it maybe is easier to find out the problem?
|
|
| Back to top |
|
 |
aboyd Site Admin

Joined: 10 Jan 2004 Posts: 519 Location: USA
|
Posted: Wednesday, 04 August 2004, 12:17 Post subject: yes. |
|
|
Hi. Send me your index.php file, and your settings.php file. My email is webmaster |at| outshine |dot| com.
_________________ Publisher Database - tools & forums for writers
|
|
| Back to top |
|
 |
Tomasahl Drive-By Poster
Joined: 04 Aug 2004 Posts: 3
|
Posted: Friday, 06 August 2004, 11:41 Post subject: Re: yes. |
|
|
Hi aboyd and all.
Well, thanks for the assistance. I got it to work now. added a mouseover menu and a "banner" and it stil works.
Thanks again
/Tom
| aboyd wrote: | | Hi. Send me your index.php file, and your settings.php file. My email is webmaster |at| outshine |dot| com. |
|
|
| Back to top |
|
 |
Mumblee Drive-By Poster
Joined: 09 Aug 2004 Posts: 8
|
Posted: Monday, 09 August 2004, 02:57 Post subject: |
|
|
I get similar errors.
Changing seemingly random things ($show_profiles, $blog_url, etc) in settings.php will give me this error at the start of the document:
| Quote: |
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\index.php:9) in C:\program files\apache group\apache\htdocs\phpBB2\includes\sessions.php on line 293
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\index.php:9) in C:\program files\apache group\apache\htdocs\phpBB2\includes\sessions.php on line 294 |
No matter what I do, though, I also get:
| Quote: |
Fatal error: Call to a member function on a non-object in c:\program files\apache group\apache\htdocs\blog\blog.php on line 104
|
Where the blog should be showing up. Line 104 of blog.php is:
| Code: |
if (!$result = $db->sql_query($sql)) {
message_die(GENERAL_ERROR, 'Querying the database didn\'t work. Feeling helpful? Email the webmaster.');
}
|
Which has me confused, considering this exact if statement was used on a number of occassions earlier in the code, without trouble.
The file i'm adding to is index.php in my base web directory (/blogs/ is also in that dir.).
I use other javascript/php in index.php (for easily simple calendar), so I thought maybe that was the problem, especially given the nature of the header errors.
When I run ./blogs/index.php everything displays correctly, but when I run ./blogs/blogs.php or i try to include_once(./blogs/blogs.php) on my existing page i get the fatal error.
|
|
| Back to top |
|
 |
aboyd Site Admin

Joined: 10 Jan 2004 Posts: 519 Location: USA
|
Posted: Monday, 09 August 2004, 13:08 Post subject: docs |
|
|
You need to read the help.txt file. You aren't including the settings.php file correctly. It gives the exact error you first quoted.
_________________ Publisher Database - tools & forums for writers
|
|
| Back to top |
|
 |
Mumblee Drive-By Poster
Joined: 09 Aug 2004 Posts: 8
|
Posted: Monday, 09 August 2004, 15:28 Post subject: |
|
|
Alright, but I still get the fatal error when I include blog.php.
Nothing displays after that point.
When I do view source from I.E., here's what appears starting at the point where I include_once(blog/blog.php)
| Code: |
<script language="JavaScript">
function trackbackPopup(topic) {
eval("trackback" + topic + " = window.open('http://192.168.1.254:1950/blog/trackback.php/" + topic + "','trackback" + topic + "','menubar,scrollbars,resizable,width=450,height=300')")
return false
}
</script>
<br />
<b>Fatal error</b>: Call to a member function on a non-object in <b>c:\program files\apache group\apache\htdocs\blog\blog.php</b> on line <b>104</b><br />
|
|
|
| Back to top |
|
 |
aboyd Site Admin

Joined: 10 Jan 2004 Posts: 519 Location: USA
|
Posted: Monday, 09 August 2004, 19:28 Post subject: OK |
|
|
Hmm. That's a good error message. Let me look it up. If it's my error, I'll issue a patch. Otherwise, I can probably at least give you a hint as to what's wrong. Give me 30 minutes or so....
_________________ Publisher Database - tools & forums for writers
|
|
| Back to top |
|
 |
aboyd Site Admin

Joined: 10 Jan 2004 Posts: 519 Location: USA
|
Posted: Monday, 09 August 2004, 20:09 Post subject: possibly the SQL? |
|
|
Well, your earlier post correctly narrowed it down. It's this part of the code:
| Code: | | $db->sql_query($sql) |
It looks like it's saying that "sql_query" isn't a method of $db. I suspect it's the blog path in the settings file, or some path that is going haywire. I'll try it myself. One sec....
Hmm. So I've played with the paths in the settings.php file. If I get the paths wrong, I can create error messages, but not the one you're getting.
You could always open up blog.php, go to line 103 (right before the bad line), and add this:
That should give you a printout of the SQL that it is trying to execute, at least if you view source. Copy & paste it here. It might help. Also, it would be good to know what platform, web server, and database you're using. A phpBB forum version number would be good to know, too.
_________________ Publisher Database - tools & forums for writers
|
|
| Back to top |
|
 |
Mumblee Drive-By Poster
Joined: 09 Aug 2004 Posts: 8
|
Posted: Friday, 13 August 2004, 02:21 Post subject: |
|
|
Here's what I get:
| Quote: |
SELECT t.topic_id, t.topic_poster, t.topic_time, t.topic_replies, u.username, p.bbcode_uid, p.post_subject, p.post_text FROM phpbb_topics as t, phpbb_users as u, phpbb_posts_text as p WHERE t.forum_id=3 AND t.topic_poster=u.user_id AND t.topic_first_post_id=p.post_id AND t.topic_type=0 ORDER BY t.topic_time DESC LIMIT 10
|
I'm running Apache on winXP, with mysql. phpBB is version 2.0.8
|
|
| Back to top |
|
 |
ijasont Drive-By Poster
Joined: 14 Aug 2004 Posts: 7
|
Posted: Saturday, 14 August 2004, 06:39 Post subject: |
|
|
I am also having this same problem.
|
|
| Back to top |
|
 |
Mumblee Drive-By Poster
Joined: 09 Aug 2004 Posts: 8
|
Posted: Saturday, 14 August 2004, 06:44 Post subject: |
|
|
I think I figured out what is causing it (although i have no idea how to solve it).
Like I said before, I have another php/sql script (easily simple calendar, www.easilysimplecalendar.com ) running on the same page. When i comment out the php require statement that starts the calendar script, phpbb blog works fine, i don't get the fatal error.
My guess is that sql_query is defined as a function of some other variable in escal, which is why when it is called on $db, php doesn't know what to do.
Last edited by Mumblee on Saturday, 14 August 2004, 07:02; edited 1 time in total |
|
| Back to top |
|
 |
ijasont Drive-By Poster
Joined: 14 Aug 2004 Posts: 7
|
Posted: Saturday, 14 August 2004, 06:47 Post subject: |
|
|
yes, I also have my index.php full of other PHP code. I will have to go through it and find where the issue is.
I may just try and change the phpbb Blog query info but I fear crary errors.
|
|
| Back to top |
|
 |
ijasont Drive-By Poster
Joined: 14 Aug 2004 Posts: 7
|
Posted: Saturday, 14 August 2004, 06:58 Post subject: |
|
|
yep that was it!
Easy to fix:
In the help.txt file it says to place require_once('blog/settings.php') at the top of the page.
But if you have other PHP on that page just place the settings require line just above the require_once('blog.php') file and all will be well.
|
|
| Back to top |
|
 |
|