Topic: Pun portall problem!

Go to: http://pokemonfireforum1.hotserv.dk/ Then you se the problem! What is the problem? Plz help smile

PunBB, the FluxBB of tomorrow - today!

2 (edited by quaker 2007-03-04 15:41)

Re: Pun portall problem!

ummm... im looking at ur main.tpl and i dont see the tag for the portalnews.
but i know that is not the issue.

this is my portalnews.php

<?php
$newsid = '1'; // Forum id to fetch the news from ( only supports 1 forum id )
$newsdisplay = '2'; // Number of news to display.
?>
<?php
require_once PUN_ROOT.'include/parser.php';
?>
<?
$result = $db->query('SELECT t.id, t.subject, t.num_replies, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.forum_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, g.g_title, f.forum_name FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON p.topic_id=t.id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id WHERE t.forum_id='.$newsid.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY t.posted DESC LIMIT '.$newsdisplay) or error('Unable to fetch announcements', __FILE__, __LINE__, $db->error());

if ($db->num_rows($result))
                    {
                            while($cur_post = $db->fetch_assoc($result))
                            {
                                    $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
?>
<?
echo "\t\t\t\t\t\t\t".' <h2><span>'.pun_htmlspecialchars($cur_post['subject']).'</span></h2>'."\n";
?>
<ul>
<?php echo $cur_post['message']."\n" ?><br />
<?
echo "\t\t\t\t\t\t\t".'<a style="text-decoration: none" href="viewtopic.php?id='.$cur_post['id'].'" class="username">'.pun_htmlspecialchars($lang_portal['Visit_Topic']).'</a>'."\n";
?>
</ul>
<?
}
 }
else
{

 }    
?>

but i also switch between this script or lastest topics

main.tpl code

 <pun_include "latesttopics.php">

here is the lastesttopics.php



<div class="block">
            <h2><span>Lastest Topics</span></h2>
            <div class="box">
                <div class="inbox">
<?
$result = $db->query('SELECT subject, id FROM '.$db_prefix.'topics ORDER BY last_post DESC LIMIT 5') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

while($cur_topic = $db->fetch_assoc($result))
{
    
?>

<img src="images/arrow.gif" alt="" /> <a href="viewtopic.php?id=<?php echo $cur_topic['id']; ?>"><?php echo $cur_topic['subject']; ?></a>
<br />

<?
}
?>

   </div>
                    </div>
                    </div>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Pun portall problem!

Thanx smile Bott now stays it: An error was encountered
Error: Unable to fetch the portal news.  What is the problem? plz help smile

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

grudon66 wrote:

Thanx smile Bott now stays it: An error was encountered
Error: Unable to fetch the portal news.  What is the problem? plz help smile

Enable debug mode and paste the full error, please.

Looking for a certain modification for your forum? Please take a look here before posting.

5 (edited by grudon66 2007-04-21 09:11)

Re: Pun portall problem!

oftopic: How can i delete punportal?

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

New problem! File: /home/bzfiles/public_html/pokemonfireforum/header.php
Line: 237

PunBB reported: Unable to fetch the recent topics

Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY id DESC LIMIT 3' at line 1 (Errno: 1064)  What should i to??

PunBB, the FluxBB of tomorrow - today!

7

Re: Pun portall problem!

Using a Postgres DB by any chance?

Re: Pun portall problem!

grudon66: paste that line?

9 (edited by grudon66 2007-04-22 15:04)

Re: Pun portall problem!

I can say how i gett the problem... Thes is how i click to gett portal news in adminstation then i click sumbit then that hapened....

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

grudon: Go into the code and paste that line here wink

Re: Pun portall problem!

Smartys the code in the line is: // START SUBST - <pun_portal_forum_stats>

PunBB, the FluxBB of tomorrow - today!

12 (edited by grudon66 2007-04-28 09:17)

Re: Pun portall problem!

No have i cratet a new forum.
Bott a new problem sad The new problem is: An error was encountered
File: /home/www/pokemonfireforum.awardspace.com/index.php
Line: 38

PunBB reported: Unable to fetch the portal news

Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY t.posted DESC LIMIT 5' at line 1 (Errno: 1064)
Help plz!

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

Once again, unless you give us the line of code or the file generating this error, we can't help you

Re: Pun portall problem!

http://pokemonfireforum.awardspace.com/ smile

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

The source wink

Re: Pun portall problem!

The code is:  $result = $db->query('SELECT t.id, t.subject, t.num_replies, t.forum_id,  p.topic_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id WHERE t.forum_id='.$fid.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY t.posted DESC LIMIT '.$newslimit) or error('Unable to fetch the portal news', __FILE__, __LINE__, $db->error())

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

And where is $fid initialized?

Re: Pun portall problem!

it isent there yikes

PunBB, the FluxBB of tomorrow - today!

Re: Pun portall problem!

That's your issue: that query requires a value for $fid