#1: Indy News Autor: Gast, Verfasst am: 12.05.2004 16:05 ---- Das Cpg Nuke gefällt mir sehr gut, jedoch bekomme ich das Modul Indy News nicht Installiert.
Fatal error: Call to undefined function: sql_query() in /opt/web1/html/html/modules/IndyNews/index.php on line 60
In der Index von Indy News steht folgendes in zeile 60
$result = sql_query("SELECT admUpSize, usrUpSize, anmUpSize, UnpFType, enablThumb, numNewsImg, posNewsImg, imgIndDefW, imgIndDefH, imgArtDefW, imgArtDefH, tmplArt from ".$prefix."_media_config where id='1'", $dbi);
Ohne das Modul bekomme ich halt leider auch meine alten News nicht Imprtiert
ich bin mir nicht sicher aber hier steht das mann einige Sachen
ändern muss von nuke -> cpg
#3: Re: Indy News Autor: Gast, Verfasst am: 14.05.2004 02:07 ---- danke für die Antwort,
da wirst du wohl recht haben, aber da alle umzustricken ist bei Indy News wohl heftig viel Arbeit. Na ja ich werde es mal probieren
$result = $db->sql_query("SELECT admUpSize, usrUpSize, anmUpSize, UnpFType, enablThumb, numNewsImg, posNewsImg, imgIndDefW, imgIndDefH, imgArtDefW, imgArtDefH, tmplArt from ".$prefix."_media_config where id='1'");
und oben in der funktion
global $db; statt global $dbi
#5: Re: Indy News Autor: Reha, Wohnort: StuttgartVerfasst am: 14.05.2004 15:55 ---- na dann viel Spaß
Naja es wird sich auf jedenfall lohnen
#6: Re: Indy News Autor: Gast, Verfasst am: 14.05.2004 20:28 ---- Danke das habe ich auch schon gefunden nur sin diese Parameter und andere in sovielen Dateien von Indy News das ich das ganze schon aufgegeben habe.
Trotzdem
vielen dank für eure Hilfe
#7: Re: Indy News Autor: spoddig, Verfasst am: 18.05.2004 13:27 ---- Nun habe ich mich doch an die Arbeit gemacht und mit den Änderungen begonnen. Sind bei dem Modul halt gleich mal ein paar hundert Änderungen,wenn ich zum laufen bekomme dann stelle ich es gerne als Download zur Verfügung.
#8: Re: Indy News Autor: Gast, Verfasst am: 18.05.2004 15:07 ---- Nun komme ich leider alleine nicht weiter, ich habe alle Dateien abgeändert und fehlende Tabellen in der Datenbank angelget. Soweit so gut nur mit der Version block-modules habe ich Probleme. Die geht so leider nicht und mit der Original von cpg gehts halt auch nicht. Vieleicht hat ja jemand ne Idee worans liegt.
<?php
######################################################################
# [Indy]News hacking
#-------------------------
# Version: 0.8b
#
# By : JoyDivision (Kolja)
# (http://www.bergamoblog.it)
# (gava@bergamoblog.it)
#
# Tech support on www.bergamoblog.it/forum.php
######################################################################
# This hack 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.
######################################################################
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* 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. */
/************************************************************************/
if (eregi("block-Modules.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $db, $admin, $Version_Num;
$result = $db->sql_query("select main_module from ".$prefix."_main");
list($main_module) = $db->sql_fetchrow($result, $db);
/* If the module doesn't exist, it will be removed from the database automaticaly */
$result = $db->sql_query("select title from ".$prefix."_modules");
while (list($title) = $db->sql_fetchrow($result, $db)) {
$a = 0;
$handle=opendir('modules');
while ($file = readdir($handle)) {
if ($file == $title) {
$a = 1;
}
}
closedir($handle);
if ($a == 0) {
$db->sql_query("delete from ".$prefix."_modules where title='$title'");
}
}
/* Now we make the Modules block with the correspondent links */
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"index.php\">"._HOME."</a><br>\n";
//JD Start
if($Version_Num*1 < 5.6){
$result = $db->sql_query("select title, custom_title from ".$prefix."_modules where active='1' ORDER BY title ASC");
}else{
$result = $db->sql_query("select title, custom_title from ".$prefix."_modules where active='1' ORDER BY custom_title ASC");
}
//JD End
while(list($m_title, $custom_title) = $db->sql_fetchrow($result, $db)) {
$m_title2 = ereg_replace("_", " ", $m_title);
if ($custom_title != "") {
$m_title2 = $custom_title;
}
//JD Start
#if ($m_title != $main_module) {
if ($m_title != $main_module && $m_title != "IndyNews") {
//JD End
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=$m_title\">$m_title2</a><br>\n";
}
}
/* If you're Admin you and only you can see Inactive modules and test it */
/* If you copied a new module is the /modules/ directory, it will be added to the database */
if (is_admin($admin)) {
$handle=opendir('modules');
while ($file = readdir($handle)) {
if ( (!ereg("[.]",$file)) ) {
$modlist .= "$file ";
}
}
closedir($handle);
$modlist = explode(" ", $modlist);
sort($modlist);
for ($i=0; $i < sizeof($modlist); $i++) {
if($modlist[$i] != "") {
$result = $db->sql_query("select mid from ".$prefix."_modules where title='$modlist[$i]'");
list ($mid) = $db->sql_fetchrow($result, $db);
if ($mid == "") {
//JD Start
if($Version_Num*1 < 5.6){
$db->sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '', '0', '0')");
}else{
$db->sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0')");
}
//JD end
}
}
}
$content .= "<br><center><b>"._NOACTIVEMODULES."</b><br>";
$content .= "<font class=\"tiny\">"._FORADMINTESTS."</font></center><br>";
$result = $db->sql_query("select title, custom_title from ".$prefix."_modules where active='0' ORDER BY title ASC");
while(list($mn_title, $custom_title) = $db->sql_fetchrow($result, $db)) {
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
$a = 1;
}
if ($a != 1) {
$content .= "<strong><big>&middot;</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
}
}
?>
$result = $db->sql_query("select main_module from ".$prefix."_main"); list($main_module) = $db->sql_fetchrow($result, $db);
".$prefix."_main gibt es nicht mehr bei cpg
und in obigen code ist noch vieles zu verbessern !!!!
und du solltest die fehlermeldungen mit posten
#12: Re: Indy News Autor: spoddig, Verfasst am: 19.05.2004 13:59 ---- Erstmal ein Danke für die Antwort.
Ich habe alle Dateien geändert aber noch imme Fehler.
Frage:
Welche der beiden Änderungen ist die richtige?
Folgende Fehlermeldung bekomme ich zur Zeit beim Aufruf des Moduls:
Fatal error: Call to undefined function: gettopics() in /opt/web1/html/modules/News/index.php on line 115
Das hier ist die betreffende Zeile:
115> getTopics($s_sid);
Ich hoffe ich krieg das Modul noch zum laufen inzwischen sitz ich da schon zig Stunden dran.
#14: Re: Indy News Autor: Ertan, Wohnort: GermanyVerfasst am: 19.05.2004 14:06 ---- ps warum meldest du dich hier nicht an
wäre doch persönlicher
#15: Re: Indy News Autor: spoddig, Verfasst am: 19.05.2004 14:16 ---- Aber Hallo das ging ja flott mit der Antwort.
Habe mich auch schon angemeldet, allerdings habt ihr da nen kleinen Bug,
Nach dem klick auf den Aktivierung link funktieoniert der Login Link nicht kommt die fehlerseite. Der normale Login geht dann aber.