You are missing our premiere tool bar navigation system! Register and use it for FREE!

Author: meetzahPostPosted: Tue Aug 21, 2007 11:14 am    Post subject:

I forgot about this post.. I managed to create this hack. Here is my code. It may not be nice but it works Wink

•  Home •  Downloads •  Gallery •  Your Account •  Forums • 

Author: stingLocation: Apparently ALWAYS Online. . .PostPosted: Tue Aug 21, 2007 10:59 am    Post subject:

Is it giving you any kind of error message?

And also, I am admittedly a little rusty with my block code, but doesn't the variable have to be separated from the quotes?

Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
· Home
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 189 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - block to display news sent by online members block to display news sent by online members

Nuke Cops -> Blocks

Author: meetzah PostPosted: Tue Jun 26, 2007 2:46 pm    Post subject: block to display news sent by online members


I try to create a block to display the stories submitted by the members that are online on the website on that moment. So, if there is logged in user1, user2, and user3 this module has to display all the stories submitted by user1, user2 and userr3.

Here is what I did, but is not working... cand you please give me a tip:


if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");

$content = "";

global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey, $gfx_chk, $locale;
$sql3 = "SELECT uname, guest FROM ".$prefix."_session WHERE guest='0'";
$result = $db->sql_query($sql3);

    $sql7 = "SELECT sid, title FROM ".$prefix."_stories WHERE informant='$uname' ORDER BY sid DESC LIMIT 0,10";
    $result7 = $db->sql_query($sql7);
    while($row7 = $db->sql_fetchrow($result7)) {
   $sid = intval($row7['sid']);
   $title = stripslashes(check_html($row7['title'], "nohtml"));
        $content .= "<li><a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">$title</a><br>";


$content .= "<li><a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">$title</a><br>";

Would be


$content .= "<li><a href=\"modules.php?name=News&amp;file=article&amp;sid=$sid\">" . $title . "</a><br>";

similar to the sql calls where the $prefix variable is separated by the period....

if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");

$content = "";

global $user, $cookie, $db, $locale;
$sql = "SELECT nuke_session.uname, nuke_session.guest, nuke_stories.sid, nuke_stories.title FROM nuke_session INNER JOIN nuke_stories ON nuke_session.uname = nuke_stories.informant WHERE nuke_session.guest ='0'";
$result = $db->sql_query($sql);
$numrows = $db->sql_numrows($sql);
$numrows = intval($numrows);
while ($row = mysql_fetch_array ($result)) {
  $content .= " <a href=".$row[sid].".html>".$row[title]."</a><br>\n";

Please be carefull how you format the link. I use mod_rewrite and that is the reason I linked directly to the rewrited pages.

Nuke Cops -> Blocks

All times are GMT - 8 Hours

Page 1 of 1

Powered by phpBB © 2001,2002 phpBB Group
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.036 Seconds - 241 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
added by Evaders - DO NOT REMOVE
:: FI Theme :: PHP-Nuke theme by coldblooded ( ::