Hi, Oliver,
Long time, no see...
I got some more spare time this period and I remembered that I would like to finish installing and start administering, occasionally, my nb-core game...
Well, I installed a new module from DP, respectively the Pop-up Chat module.
It gets an error when trying to click the link and open the pop-up chat window...
It says:
Fatal error: Call to a member function rawoutput() on a non-object in /mounted-storage/home113a/sub007/sc41001-XJFO/alchemion.net/lib/output.php on line 394
The 394 lib/output.php line is:
$output->rawoutput($indata);
I put up a question to the author, on DP, yet, he asked about the version I use and updated the module, but the same error ocurs...
The code of the popupcr.php module is:
<?php
/*
version 1.5
- Added section control setting.
- Added Min and Max refresh time setting.
- Replaced [DEL] links from commentary for SUs.
*/
function popupcr_getmoduleinfo(){
$info = array(
"name"=>"PopUp Chat Room",
"version"=>"1.5",
"author"=>"`2Shane`0, for `#C`&on`#t`&ess`#a",
"category"=>"General",
"settings"=>array(
"PopUp Chat Room Settings,title",
"section"=>"Section:,enum,popupcr,PopUp Chat Room,village,Village,gardens,Gardens",
"minref"=>"Min refresh time(in seconds; best not to set under 30):,int|60",
"maxref"=>"Max refresh time(in seconds; best not to set over 900):,int|240",
),
"prefs"=>array(
"PopUp Chat,title",
// thanks to maZice
"user_refresh"=>"Automatically refresh the chat?,bool|1",
"user_refreshtime"=>"Seconds to automatically refresh:,int|120",
"Do not set this to too low as you will then be unable to type anything.,note",
),
"override_forced_nav"=>true,
);
return $info;
}
function popupcr_install(){
module_addhook("charstats");
return true;
}
function popupcr_uninstall(){
return true;
}
function popupcr_dohook($hookname,$args){
global $session;
switch($hookname){
case "charstats":
$display.="<a href='runmodule.php?module=popupcr' onClick=\"".popup("runmodule.php?module=popupcr").";return false;\" target='_blank' align='center' class=\"charinfo\" style=\"font-size:10px\">Open</a>";
addcharstat("Popup Chats");
addcharstat("PopUp Chat Room", $display);
addnav("","runmodule.php?module=popupcr");
break;
}
return $args;
}
function popupcr_run(){
global $session;
popup_header("PopUp Chat Room");
$op=httpget('op');
if ($op==""){
output("`n`n");
require_once("lib/commentary.php");
addcommentary();
output("`@Speak with others:`n`n");
$section = get_module_setting("section");
viewcommentary($section,"Speak",20,"says");
modulehook("mod_popupcr");
global $output;
$output = preg_replace("/<a href='bio\.php(.*?)'>(.*?)<\/a>/i", '$2', $output);
$output = preg_replace("/<a href='runmodule\.php(.*?)'>(.*?)<\/a>/i", '$2', $output);
// refresh code
if (get_module_pref("user_refresh")==1){
$time = get_module_pref("user_refreshtime");
if ($time > get_module_setting("maxref")) $time = get_module_setting("maxref");
if ($time < get_module_setting("minref")) $time = get_module_setting("minref");
rawoutput("<meta http-equiv='refresh' content='$time'>");
}
}
if ($op=="clear"){
output("`n`n`nAll commentary has been cleared for this section. Close this window and refresh for the effects to take place.");
db_query("DELETE FROM commentary WHERE section = 'popupcr'");
}
popup_footer();
}
Obviously it may be a conflict with the new nb-core lib/output.php ... and the coder does not know your lotgd version...
Please, point out where is the issue...
Edit: I cut out some/all $output code from the module and it works... but not as intended... with the output/pregreplace cut out, the bio.php link sticks to the user name... where is the error and how can we get rid of bio.php ?...Thank you very much.
Emanuel C.