| Author |
Message |
robp07
Joined: 15 Jun 2008 Posts: 21
|
|
Solved: Post Not Found. |
|
Hi,
Im getting a message 'Posts Not Found'.
 |  |
<?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 |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Syrion

Joined: 02 Aug 2006 Posts: 172
|
|
|
|
1. Are your system settings (in the CNR control panel) correct?
2. What happens if you use  |  | <? include $cutepath.'news/show_news.php'; ?> |
_________________
Mini-me |
|
| Thu Jun 19, 2008 8:47 pm |
|
 |
robp07
Joined: 15 Jun 2008 Posts: 21
|
|
|
|
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
 |  |
<?php
define("IN_MYBB",1);
chdir('forum'); // path to MyBB
require './global.php';
?> |
and
 |  | <?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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
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 |
|
 |
robp07
Joined: 15 Jun 2008 Posts: 21
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
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 |
|
 |
robp07
Joined: 15 Jun 2008 Posts: 21
|
|
|
|
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 |
|
 |
smegleg
Joined: 24 Jun 2008 Posts: 2
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
 |  | There isnt a variable called id, but some like pid, tid, fid, cid, pmid, uid, aid. |
Those variables aren't used in CNR. 
|
|
| Thu Jun 26, 2008 5:46 pm |
|
 |
smegleg
Joined: 24 Jun 2008 Posts: 2
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
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 |
|
 |
|