Saw a post before that made mention to it (ancient thread though), and been crawling around trying to find the code for a block so I can see the raids announced on the phpraid for php without having to go to the signup section.
Name of the block there is Raid Events, on the left side.
I have phpRaid already set up an running meshed with my phpNuke - The only thing I need is the block.
SpiffyJr's site is down, and I just really can't find this code anywhere.
Anyone able to point me to the right direction?
hue Support Mod
Joined: Apr 18, 2003
Posts: 368
Location: Ohio
Posted:
Thu May 17, 2007 5:33 am
Maybe try this . Save the code as block-events.php
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program 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. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
// Uncomment following for PHP nuke 7.6
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
// Uncomment following for PHP nuke 7.8
// if (eregi("block-Survey.php", $_SERVER['PHP_SELF'])) {
// Header("Location: index.php");
// die();
// }
global $prefix, $db, $lang, $HTTP_COOKIE_VARS;
function quote_smart($value)
{ // Stripslashes
if (get_magic_quotes_gpc())
{ $value = stripslashes($value);
}
// Quote if not integer
if (!is_numeric($value))
{ $value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;
}
if (!isset($_COOKIE['PhpNukeRaid_P_realm']))
{ $result = $db->sql_query("SELECT * FROM nuke_raid_events where date >= now() ORDER BY date ASC LIMIT 0,10");
}
else
{ $content .= $lang_pr['monitored'].urldecode($HTTP_COOKIE_VARS["PhpNukeRaid_P_realm"])."<BR>";
$result = $db->sql_query("SELECT * FROM nuke_raid_events where date >= now() and realm = ".quote_smart(urldecode($HTTP_COOKIE_VARS["PhpNukeRaid_P_realm"]))." order by date desc, event_id desc");
}
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program 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. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
// Uncomment following for PHP nuke 7.6
// if ( !defined('BLOCK_FILE') ) {
// Header("Location: ../index.php");
// die();
// }
// Uncomment following for PHP nuke 7.8
if (eregi("block-Survey.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $prefix, $db, $lang, $HTTP_COOKIE_VARS;
function quote_smart($value)
{ // Stripslashes
if (get_magic_quotes_gpc())
{ $value = stripslashes($value);
}
// Quote if not integer
if (!is_numeric($value))
{ $value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;
}
if (!isset($_COOKIE['PhpNukeRaid_P_realm']))
{ $result = $db->sql_query("SELECT * FROM nuke_raid_events where date >= now() ORDER BY date ASC LIMIT 0,10");
}
else
{ $content .= $lang_pr['monitored'].urldecode($HTTP_COOKIE_VARS["PhpNukeRaid_P_realm"])."<BR>";
$result = $db->sql_query("SELECT * FROM nuke_raid_events where date >= now() and realm = ".quote_smart(urldecode($HTTP_COOKIE_VARS["PhpNukeRaid_P_realm"]))." order by date desc, event_id desc");
}
Uncommented the 7.8 part and commented the 7.6 part from the code you gave me - Using PHP7.9, but was hoping it'd work with the 7.8 code.
Doesn't work though, creates the block but its empty. Also, while its active, I can't go to the normal phpraid for php page. It shows blank. If I deactivate the block, my phpRaid module starts working normally again.
Almost forgot to mention:
Tried it exactly like you posted it and it doesn't work either, does exactly the same.
Another thing I noticed:
My phpRaid module's name is phpraid, not phpnukeraid. So changed all references to phpnukeraid to phpraid. Still not working though. Exact same issue.
Anything else I should have changed perhaps?
hue Support Mod
Joined: Apr 18, 2003
Posts: 368
Location: Ohio
Posted:
Thu May 17, 2007 7:01 am
I am not at all familar with this addon , I just simply did a search for it and thats what came up. However, I do have the complete package that this block came from so maybe you could try it? If so , download it here
--> Click Me
_________________ Go Go Buckeyes!!
Nilaihah Nuke Cadet
Joined: May 17, 2007
Posts: 4
Posted:
Thu May 17, 2007 7:16 am
Looks to be a different mod altogether but made for the same purpose. I'll give it a go and see how it works.
In the mean time, if anyone knows how to make a block for Spiffyjr's version of this mod... help would be very much appreciated!
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