Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Solved: Post Not Found.

 
Reply to topic    Forum Index » Help View previous topic
View next topic
Solved: Post Not Found.
Author Message
robp07



Joined: 15 Jun 2008
Posts: 21

Post Solved: Post Not Found. Reply with quote
Hi,

Im getting a message 'Posts Not Found'.

Code:

<?php
    define("IN_MYBB",1);
    chdir('forum'); // path to MyBB
    require './global.php';
?>
<?
include '/home/***/public_html/***/news/head.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<?php include 'header.php'; ?>
</head>

<body>
.............................
<h2>Latest News</h2>
<table cellspacing="0" cellpadding="0" class="news">
<tr>
<td>
<?
include '/home/***/public_html/***/news/show_news.php';
?>
</td>
</tr>
</table>      


<?php

if($mybb->user['uid'] > 0)
{ // The user is logged in, say Hi
 echo "<u>Hey, ". $mybb->user['username']." ;</u>;
}
else
{
//Please log in
}
?>
..............................
</body>
</html>
   


Any ideas why it wont show the news?

If I go directly to news/show_news.php I can see the news items.

Thanks!


Last edited by robp07 on Fri Jul 11, 2008 10:21 pm; edited 1 time in total
Thu Jun 19, 2008 3:22 pm View user's profile Send private message
Guest








Please login to hide the ads.

Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
1. Are your system settings (in the CNR control panel) correct?
2. What happens if you use
Quote:
<? include $cutepath.'news/show_news.php'; ?>


_________________
Mini-me
Thu Jun 19, 2008 8:47 pm View user's profile Send private message
robp07



Joined: 15 Jun 2008
Posts: 21

Post Reply with quote
1. Every thing seems correct as far as I can see.
2. Tried that and get the same error.

Edit: It seems that myBB may be messing it up somehow.

When I remove

Code:
    
<?php
    define("IN_MYBB",1);
    chdir('forum'); // path to MyBB
    require './global.php';
?>


and

Code:
<?php

if($mybb->user['uid'] > 0)
{ // The user is logged in, say Hi
 echo "<u>Hey, ". $mybb->user['username']." ;</u>;
}
else
{
//Please log in
}
?>


It works. So why should this be messing up the news :S
Fri Jun 20, 2008 12:28 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
MyBB might use a variable which is named the same as a CNR variable. Most likely it's the $id variable.
Fri Jun 20, 2008 2:13 pm View user's profile Send private message
robp07



Joined: 15 Jun 2008
Posts: 21

Post Reply with quote
So would it work if I found all the uses of $id in CNR and renamed them to $cnrid ?
Sat Jun 21, 2008 12:21 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Exactly. Before you do that I suggest you make sure that it is the $id variable by either checking yourself the myBB code or by asking in the myBB forum.
Sat Jun 21, 2008 1:38 pm View user's profile Send private message
robp07



Joined: 15 Jun 2008
Posts: 21

Post Reply with quote
There isnt a variable called id, but some like pid, tid, fid, cid, pmid, uid, aid.

Wonder what it could be :S
Mon Jun 23, 2008 11:36 pm View user's profile Send private message
smegleg



Joined: 24 Jun 2008
Posts: 2

Post Reply with quote
I've been struggling with this for a few months off and on and haven't worked it out yet, so I would be delighted if you manage to figure it out!
Tue Jun 24, 2008 12:01 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
robp07 wrote:
There isnt a variable called id, but some like pid, tid, fid, cid, pmid, uid, aid.

Those variables aren't used in CNR. Confused
Thu Jun 26, 2008 5:46 pm View user's profile Send private message
smegleg



Joined: 24 Jun 2008
Posts: 2

Post Reply with quote
FI-DD do you have a list of variables that CNR uses? I did try to find them out but got very confused. Also which files contain them? If you know this then it would be much easier for me to find and change them to work out if that is the problem.

Thanks.
Tue Jul 01, 2008 1:47 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
No, unfortunately there's no list. The variables are pretty much everywhere in the inc/ folder and the plugins/folder and in the root folder.
Fri Jul 04, 2008 1:55 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.