changed
<?php echo parse_message($cur_post['message']) ?>
to
<?php echo parse_message($cur_post['message'], $cur_post['hide_smilies']) ?>
and it works !!!
thanks a lot elbekko
You are not logged in. Please login or register.
PunBB Forums → Posts by betty clark
Pages 1
changed
<?php echo parse_message($cur_post['message']) ?>
to
<?php echo parse_message($cur_post['message'], $cur_post['hide_smilies']) ?>
and it works !!!
thanks a lot elbekko
i think ive find an answer here :
http://punbb.org/forums/viewtopic.php?id=12352
dingin it...
wao ! i guess ur my new god
stupid blinding error of eyes of mine after too much time trying decodin things i dont understand a word of...
the correct html is now displayed (thx A LOT)
but ive got now that mess :
Warning: Missing argument 2 for parse_message() in (...)/forum/include/parser.php on line 375
between the title & the message body
i guess the error is here:
<?php echo parse_message($cur_post['message']) ?>
ive tried with both with & without "()" (openin AND closin this time) but the error remains the same
can u help me with that too?
i'm trying to generate html on the server for displayin on client browsner using php (with no knowledge of it ...).
my code is build with 'viewtopic.php', 'AP_News_Generator.php' and 'AP_News_Generator\news.tpl' extracts (PunBB v1.2.12)
when running my 'viewtopicnews.php' i get that error mess :
"Parse error: syntax error, unexpected ';' in (...)/forum/viewtopicnews.php on line 59"
does anyone with php knowledge can xplain me where is my mistake and eventually help me fix it?
heres the code:
<?php
/***********************************************************************
Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
This file is part of PunBB.
PunBB is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
PunBB is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
************************************************************************/
// The forum from which we'll pull the news bits
$forum_id = 5;
// Number of news posts to include in the index
$num_posts_index = 10;
// Path to news item template
$template_path = PUN_ROOT.'plugins/AP_News_Generator/news.tpl';
/***********************************************************************
DO NOT EDIT BELOW THIS LINE
/***********************************************************************/
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
// Generate front page news
$result = $db->query('SELECT id, subject FROM '.$db->prefix.'topics WHERE forum_id='.$forum_id.' ORDER BY sticky DESC, posted DESC LIMIT 0, '.$num_posts_index) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
message('There are no topics to generate news based on in forum with ID = '.$forum_id.'.');
while ($cur_topic = $db->fetch_assoc($result))
{
$result2 = $db->query('SELECT posted, poster, message, hide_smilies FROM '.$db->prefix.'posts WHERE topic_id='.$cur_topic['id'].' ORDER BY posted ASC LIMIT 1') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
$cur_post = $db->fetch_assoc($result2);
?>
<div class="newsbox">
<h3><?php echo (pun_htmlspecialchars($cur_topic['subject']) ?></h3>
<div class="item">
<?php echo (parse_message($cur_post['message']) ?>
<p class="newsinfo">Posted by <?php echo (pun_htmlspecialchars($cur_post['poster'])) ?> on <?php echo date('Y-m-d H:i', $cur_post['posted']) ?> | <a href="<?php echo $pun_config['o_base_url']?>/viewtopic.php?id=<?php echo $cur_topic['id']?>">Comments</a></p>
</div>
</div>
<?php
}
require PUN_ROOT.'footer.php';
to the makers of punbb.
its easy to install
i hope it'll be hard to hack... lol
for me its a very good start for having interaction with visitors without knowin php, instead of learnin before havin it done. customization will help learnin.
thanks a lot
and bonne continuation
Pages 1
PunBB Forums → Posts by betty clark
Powered by PunBB, supported by Informer Technologies, Inc.