SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
moods Corporal
Joined: Dec 13, 2005
Posts: 72
Posted:
Thu Feb 28, 2008 2:26 am
i am sorry to let u know that the block still did not work. i copied the code exactly as you posted and changed the X with the id of the newsreporter
still it did not work.
i am using phpnuke 8. what could be wrong?
spottedhog Captain
Joined: Apr 30, 2004
Posts: 566
Posted:
Thu Feb 28, 2008 4:36 am
when you replaced X, did you leave in the single quote marks?
for example: 'X' and not X
If that does not work, then I am not sure what is wrong. I use a modified version of 7.6, but there should not be much difference.
As far as I know, the only difference to the current PHP Nuke 8.0 and my 7.6 version is that I have made the field "aid" an integer field, while I am sure 8.0 still uses a varchar field.
Replace the aid='1'
with:
aid='username'
...where username is the author username.
Code:
<?php
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $db, $prefix;
$content = "";
$content .= "<table width=\"100%\" border=\"0\"><tr><td class=\"content\">";
$result = $db->sql_query("
SELECT sid, title
FROM {$prefix}_stories
WHERE aid='1'
ORDER BY sid
DESC LIMIT 5");
while ($row = $db->sql_fetchrow($result))
{
$row['sid']= intval($row['sid']);
$row['title']= check_words(check_html($row['title'], "nohtml"));
$content .= "<strong>·</strong> <a href=\"modules.php?name=News&file=article&sid=$row[sid]\">$row[title]</a><br />";
}
$content .= "</td></tr></table>";
$content .= "<br /><center>[ <a href=\"modules.php?name=News\">"._MORENEWS."</a> ]</center>";
?>
If this still does not work, please copy/paste the error line here. You may need to enable errors in the config.php file.
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