Topic: Pun portall problem!
Go to: http://pokemonfireforum1.hotserv.dk/ Then you se the problem! What is the problem? Plz help
You are not logged in. Please login or register.
PunBB Forums → General discussion → Pun portall problem!
Go to: http://pokemonfireforum1.hotserv.dk/ Then you se the problem! What is the problem? Plz help
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>
Thanx Bott now stays it: An error was encountered
Error: Unable to fetch the portal news. What is the problem? plz help
Thanx Bott now stays it: An error was encountered
Error: Unable to fetch the portal news. What is the problem? plz help
Enable debug mode and paste the full error, please.
oftopic: How can i delete punportal?
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??
grudon66: paste that line?
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....
grudon: Go into the code and paste that line here
Smartys the code in the line is: // START SUBST - <pun_portal_forum_stats>
No have i cratet a new forum.
Bott a new problem 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!
Once again, unless you give us the line of code or the file generating this error, we can't help you
http://pokemonfireforum.awardspace.com/
The source
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())
And where is $fid initialized?
it isent there
That's your issue: that query requires a value for $fid
PunBB Forums → General discussion → Pun portall problem!
Powered by PunBB, supported by Informer Technologies, Inc.