PHP Nuke Nederland
 
•   Home  •  Downloads  •  Your Account  •  Forums  •
PHP-Nuke Nederland: Forums

PHP-Nuke Nederland :: View topic - [OPGELOST] Hoe zit het nou met Topics????
 Forum FAQ  •   Search   •  Memberlist  •  Usergroups   •  Register   •    •  Profile  •  Log in to check your private messages  •  Log in

 
Post new topicReply to topic
View previous topic Log in to check your private messages View next topic
Author Message
welrob
Helper
Helper


Joined: Aug 02, 2005
Posts: 425
Location: Naarden - Vesting

PostPosted: Fri 11 May 2007 3:34 Reply with quoteBack to top

PM is Prive Bericht te vinden bovenaan deze berichten bij FAQ * Zoeken* enz

_________________
Te Lezen: Forum Regels Te Gebruiken:Forum Zoeken
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Fri 11 May 2007 7:08 Reply with quoteBack to top

Vreemd verhaal dat met die topics.
Op een een of anderemanier haalt de topicsmodule nilks uit de database.

Inmiddels geprobeerd :
Andere theme (mijn Deepblue) -> geen effect
Database gecontr. -> staan vanalles in
Andere Topics module geprobeerd -> geen effect

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Fri 11 May 2007 7:31 Reply with quoteBack to top

stop dr mee Laughing

wat een ellende zeg.
krijk de kriebels van. Cool

Ga hier later nog eens mee verder.

Ga de complete site downloaden en eens testen met mn eigen database.

Wordt vervolgd.

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Sun 13 May 2007 23:10 Reply with quoteBack to top

Update :

Gehele site op locale testserver gezet.

Geen topics probleem met eigen locale database.

Probleem : Database
Oorzaak : ???? deze is wel gevuld nl.

wordt vervolgd.

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Sun 13 May 2007 23:15 Reply with quoteBack to top

Update 2 :

Gehele databasedump gedaan.

Teste op eigen server geeft geen enkel probleem.

wordt vervolgd

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Sun 13 May 2007 23:49 Reply with quoteBack to top

Update 3:

Server draait op MySQL versie 5.0.22

Mijn locale Server draait op 4.0.19

Andere phpnuke site (7.6pl3.1) die draait op de zelfde site geeft dit zelfde probleem.

Een oude PHPnuke versie op diezelfde server heeft dit probleem niet.

Server probleem lijkt mij.
Eerder scriptcode die niet compatible is met de server.

Wordt vervolgd.

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2833

PostPosted: Mon 14 May 2007 0:12 Reply with quoteBack to top

Inhoud root/modules/Topics/index.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 checking code 2003 by chatserv                   */
/* http://www.nukefixes.com -- http://www.nukeresources.com             */
/************************************************************************/

if ( !defined('MODULE_FILE') )
{
    die("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._ACTIVETOPICS."";
include("header.php");
OpenTable();
global $db, $prefix, $tipath;
$ThemeSel = get_theme();
$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";
$result = $db->sql_query($sql);
$test = $db->sql_numrows($result);
if ($db->sql_numrows($result) > 0) {
    $output = "<center><font class=\"title\"><b>"._ACTIVETOPICS."</b></font><br>\n";
    $output .= "<font class=\"content\">"._CLICK2LIST."</font><br><br>\n";
    $output .= "<form action=\"search.html\" method=\"post\">";
    $output .= "<input type=\"name\" name=\"query\" size=\"30\">  ";
    $output .= "<input type=\"submit\" value=\""._SEARCH."\">";
    $output .= "</form></center><br><br>";
    echo $output;
    while ($row = $db->sql_fetchrow($result)) {
        $topicid = intval($row['topicid']);
        $topicimage = stripslashes($row['topicimage']);
        $topictext = stripslashes(check_html($row['topictext'], "nohtml"));
        if(file_exists("themes/".$ThemeSel."/images/topics/".$topicimage)) {
          $t_image = "themes/".$ThemeSel."/";
        } else {
          $t_image = "";
        }
        $t_image = $t_image.$tipath.$topicimage;
        title($topictext);
        $output = "<table border=\"1\" width=\"100%\" align=\"center\" cellpadding=\"2\">\n";
        $output .= "<tr><td valign=\"top\" width=\"25%\">";
        $output .= "<a href=news.html&amp;topic=$topicid><img src=\"$t_image\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" hspace='5' vspace='5'></a><br><br>\n";
        $output .= "<font class=\"content\">";
        $output .= "<big><strong>·</strong></big> <b>"._TOPIC.":</b> $topictext<br>\n";
        $output .= "<big><strong>·</strong></big> <b>"._TOTNEWS.":</b> ".$row['stories']."<br>\n";
        $output .= "<big><strong>·</strong></big> <b>"._TOTREADS.":</b> ".(isset($row['reads']) ? $row['reads'] : 0)."</font>";
        $output .= "</td><td valign=\"top\">";
        echo $output;
       
        if ($row['stories'] > 0) {
            $sql2 = "SELECT s.sid, s.catid, s.title, c.title AS cat_title FROM ".$prefix."_stories s LEFT JOIN ".$prefix."_stories_cat c ON s.catid=c.catid WHERE s.topic='$topicid' ORDER BY s.sid DESC LIMIT 0,10";
            $result2 = $db->sql_query($sql2);
            while ($row2 = $db->sql_fetchrow($result2)) {
                $cat_link = (intval($row2['catid']) > 0) ? "<a href=\"news.html&amp;catid=".intval($row2['catid'])."\"><strong>".stripslashes(check_html($row2['cat_title'], "nohtml"))."</strong></a>: " : "";
                echo "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" /> $cat_link<a href=\"news.html&amp;file=article&amp;sid=".intval($row2['sid'])."\">".htmlentities($row2['title'])."</a><br>";
            }
            if ($row['stories'] > 10) {
                echo "<div align=\"right\"><strong>·</strong> <a href=\"news.html&amp;topic=".$topicid."\"><strong>"._MORE." --&gt;</strong></a></div>";
            }
        } else {
            echo "<i>"._NONEWSYET."XXX</i>";
        }
        echo "</td></tr></table><br><br>";
    }
} else {
  echo "<i>"._NONEWSYET."X$test</i>";
}

CloseTable();
include("footer.php");

?>


Wat hierin opvalt is dit gedeelte:

Code:

$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";


MySQL zal deze query niet uitvoeren, en dus geen resultaat en geven, en dus altijd het laatste statement uitvoeren:

Code:

} else {
  echo "<i>"._NONEWSYET."X$test</i>";
}


Wat is er dan verkeerd aan die query?
Dit gedeelte: AS reads
READS is een MySQL command.
In onderstaande vervanging van de index.php heb ik reads vervangen door readcounter:

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 checking code 2003 by chatserv                   */
/* http://www.nukefixes.com -- http://www.nukeresources.com             */
/************************************************************************/

if ( !defined('MODULE_FILE') )
{
    die("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._ACTIVETOPICS."";
include("header.php");
OpenTable();

global $db, $prefix, $tipath;
$ThemeSel = get_theme();
$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS readcounter FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) > 0) {
    $output = "<center><font class=\"title\"><b>"._ACTIVETOPICS."</b></font><br>\n";
    $output .= "<font class=\"content\">"._CLICK2LIST."</font><br><br>\n";
    $output .= "<form action=\"search.html\" method=\"post\">";
    $output .= "<input type=\"name\" name=\"query\" size=\"30\">  ";
    $output .= "<input type=\"submit\" value=\""._SEARCH."\">";
    $output .= "</form></center><br><br>";
    echo $output;
    while ($row = $db->sql_fetchrow($result)) {
        $topicid = intval($row['topicid']);
        $topicimage = stripslashes($row['topicimage']);
        $topictext = stripslashes(check_html($row['topictext'], "nohtml"));
        if(file_exists("themes/".$ThemeSel."/images/topics/".$topicimage)) {
          $t_image = "themes/".$ThemeSel."/";
        } else {
          $t_image = "";
        }
        $t_image = $t_image.$tipath.$topicimage;
        title($topictext);
        $output = "<table border=\"1\" width=\"100%\" align=\"center\" cellpadding=\"2\">\n";
        $output .= "<tr><td valign=\"top\" width=\"25%\">";
        $output .= "<a href=news.html&amp;topic=$topicid><img src=\"$t_image\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" hspace='5' vspace='5'></a><br><br>\n";
        $output .= "<font class=\"content\">";
        $output .= "<big><strong>·</strong></big> <b>"._TOPIC.":</b> $topictext<br>\n";
        $output .= "<big><strong>·</strong></big> <b>"._TOTNEWS.":</b> ".$row['stories']."<br>\n";
        $output .= "<big><strong>·</strong></big> <b>"._TOTREADS.":</b> ".(isset($row['readcounter']) ? $row['readcounter'] : 0)."</font>";
        $output .= "</td><td valign=\"top\">";
        echo $output;
       
        if ($row['stories'] > 0) {
            $sql2 = "SELECT s.sid, s.catid, s.title, c.title AS cat_title FROM ".$prefix."_stories s LEFT JOIN ".$prefix."_stories_cat c ON s.catid=c.catid WHERE s.topic='$topicid' ORDER BY s.sid DESC LIMIT 0,10";
            $result2 = $db->sql_query($sql2);
            while ($row2 = $db->sql_fetchrow($result2)) {
                $cat_link = (intval($row2['catid']) > 0) ? "<a href=\"news.html&amp;catid=".intval($row2['catid'])."\"><strong>".stripslashes(check_html($row2['cat_title'], "nohtml"))."</strong></a>: " : "";
                echo "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" /> $cat_link<a href=\"news.html&amp;file=article&amp;sid=".intval($row2['sid'])."\">".htmlentities($row2['title'])."</a><br>";
            }
            if ($row['stories'] > 10) {
                echo "<div align=\"right\"><strong>·</strong> <a href=\"news.html&amp;topic=".$topicid."\"><strong>"._MORE." --&gt;</strong></a></div>";
            }
        } else {
            echo "<i>"._NONEWSYET."</i>";
        }
        echo "</td></tr></table><br><br>";
    }
} else {
  echo "<i>"._NONEWSYET."</i>";
}

CloseTable();
include("footer.php");

?>


Een andere oplossing is om de query te wijzigen:

Code:

$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS 'stories', SUM(s.counter) AS 'reads' FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";


Hier wordt AS reads tussen aanhalingstekens gezet als AS 'reads'.

De vervanging van 'reads' in 'readcounter' in de index.php op annedien haar website is inmiddels doorgevoerd.


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
zeromechanic
Administrator
Administrator


Joined: Oct 01, 2004
Posts: 1463
Location: Emmeloord

PostPosted: Mon 14 May 2007 5:41 Reply with quoteBack to top

okee dan,
Ik zat hier dus ook al naar te kijken.
Daarom had ik ook een andere Topics module geupload, die ik bij mij lokaal heb staan, maar de zelfde "error"

Maar dan blijft nog het volgende staan:

Bij mij op de site (hier dus) werkt de Topics module wel, ZONDER deze edit.
Bij annedien dus niet.

Bij een volledige overzet naar mijn lokale server werkt de site zoals die is ZONDER deze aanpassing.

Het enige verschil wat ik kan opmerken is het verschil in versie van de mySQL server.

daar versie 5, hier en lokaal versie 4

Is dus een compatabiliteits probleem in de versies.
En dan in 7.6pl3.1 + , gezien dat 7.5(ORG) WEL werkt onder mysql 5

Geeft deze edit dan geen reverse problemen met de versie 4 van MySQL?
Moeten we dit niet in de gaten gaan houden, vooral gezien versie 6 op komst is.

Maar het probleem is in iedergeval opgelost.


-Topic OPGELOST

_________________
Te Lezen: Forum Regels | Te Gebruiken
View user's profileSend private messageVisit poster's website
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2833

PostPosted: Tue 15 May 2007 1:46 Reply with quoteBack to top

zeromechanic wrote:

Het enige verschil wat ik kan opmerken is het verschil in versie van de mySQL server.

daar versie 5, hier en lokaal versie 4

Is dus een compatabiliteits probleem in de versies.
En dan in 7.6pl3.1 + , gezien dat 7.5(ORG) WEL werkt onder mysql 5

Geeft deze edit dan geen reverse problemen met de versie 4 van MySQL?
Moeten we dit niet in de gaten gaan houden, vooral gezien versie 6 op komst is.


Ja, het verschil zit in de versie van MySQL.
En reverse problemen? Nee, met AS geef je het veld een naam i.p.v. een expressie als resultaat voor het ophalen van de gegevens uit de tabel voor het specifieke veld.
Dit is in 4 en 5 hetzelfde. Dus of je nu in versie 4 de output kolom de naam readcounter geeft of in versie 5, het resultaat blijft hetzelfde.


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
 Donaties   Adverteren 
Wilt u het forum steunen, dan kunt u nu eenvoudig doneren met PayPal.
Post new topicReply to topic
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

Web site powered by PHP-Nuke

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004-2008 by BlueLion.
SEO enhanced with the Sitemapper script
You can syndicate our news using the file backend.php or ultramode.txt
Powered by PHP Powered by MySQL Apache Webserver Valid robots.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Pagina rendering: 0.10 seconden


[Valid News RSS]

RSS Feeds:
[RSS 2.0 News Feed]
[RSS 2.0 Download Feed]
[RSS 2.0 Forum Feed]
[RSS 2.0 Link Feed]
:: fisubsilver shadow phpbb2 style by Daz :: PHP-Nuke theme by BlueLion ::