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

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 212 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 - Phpraid Block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Nilaihah
Nuke Cadet
Nuke Cadet


Joined: May 17, 2007
Posts: 4


PostPosted: Thu May 17, 2007 2:16 am Reply with quoteBack to top

Hey guys,

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.

You can see it here:
http://www.bandofhawks.net/

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?
Find all posts by NilaihahView user's profileSend private message
hue
Support Mod
Support Mod


Joined: Apr 18, 2003
Posts: 368

Location: Ohio

PostPosted: Thu May 17, 2007 5:33 am Reply with quoteBack to top

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;
}

$result = $db->sql_query("SELECT * FROM ".$prefix."_config");
$row = $db->sql_fetchrow($result);
$language = $row['language'];

include("./modules/phpnukeraid/language/lang_".$language."/lang_inst.php");
include("./modules/phpnukeraid/language/lang_".$language."/lang_main.php");

$content .="<center>";

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");
}

if (mysql_num_rows($result)==0)
{        $content .= $lang_pr['monopoly'];
}
else
{        while ($row = $db->sql_fetchrow($result))
        {        $name = stripslashes($row['choice_inst']);
            $date = stripslashes($row['date']);
            $event_id = stripslashes($row['event_id']);
            $realm = stripslashes($row['realm']);
            $content .= "<a href=./modules.php?name=phpnukeraid&inst=".$event_id.">".$lang_pr[$name]." | ".$realm." | ".$date."</a><BR>";
        }
}
$content .="<BR>";
$content .="<a href='./modules.php?name=phpnukeraid&inst=new'>".$lang_pr['new']."</a>\n";
$content .="</center>";

?>

_________________
Go Go Buckeyes!!
Find all posts by hueView user's profileSend private messageICQ Number
Nilaihah
Nuke Cadet
Nuke Cadet


Joined: May 17, 2007
Posts: 4


PostPosted: Thu May 17, 2007 6:32 am Reply with quoteBack to top

First and foremost thanks for the help!

Now, for the juicy bits...

Using it as following:

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;
}

$result = $db->sql_query("SELECT * FROM ".$prefix."_config");
$row = $db->sql_fetchrow($result);
$language = $row['language'];

include("./modules/phpnukeraid/language/lang_".$language."/lang_inst.php");
include("./modules/phpnukeraid/language/lang_".$language."/lang_main.php");

$content .="<center>";

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");
}

if (mysql_num_rows($result)==0)
{        $content .= $lang_pr['monopoly'];
}
else
{        while ($row = $db->sql_fetchrow($result))
        {        $name = stripslashes($row['choice_inst']);
            $date = stripslashes($row['date']);
            $event_id = stripslashes($row['event_id']);
            $realm = stripslashes($row['realm']);
            $content .= "<a href=./modules.php?name=phpnukeraid&inst=".$event_id.">".$lang_pr[$name]." | ".$realm." | ".$date."</a><BR>";
        }
}
$content .="<BR>";
$content .="<a href='./modules.php?name=phpnukeraid&inst=new'>".$lang_pr['new']."</a>\n";
$content .="</center>";

?>


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?
Find all posts by NilaihahView user's profileSend private message
hue
Support Mod
Support Mod


Joined: Apr 18, 2003
Posts: 368

Location: Ohio

PostPosted: Thu May 17, 2007 7:01 am Reply with quoteBack to top

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!!
Find all posts by hueView user's profileSend private messageICQ Number
Nilaihah
Nuke Cadet
Nuke Cadet


Joined: May 17, 2007
Posts: 4


PostPosted: Thu May 17, 2007 7:16 am Reply with quoteBack to top

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!
Find all posts by NilaihahView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
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.186 Seconds - 141 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::