Thread subject: pHpFusion Nederlands (BE|NL) » Ondersteuning, Themas, Infusies, Modificaties en Installatie :: Rechter panel verspringt op één pagina naar beneden

Posted by ivoht on 14 mei 2012, 18:44
#3

het woordje side zit helemaal niet in de code.
zowel in het aanpgepaste bestand als in de originele file.

terugzetten van origineel heb ik niks aan aangezien de aanpassing dan weg is.

de code waarin het mis gaat is;
Code



/*-------------------------------------------------------+

| PHP-Fusion Content Management System

| Copyright (C) 2002 - 2010 Nick Jones

| http://www.php-fusion.co.uk/

+--------------------------------------------------------+

| Filename: news_cats.php

| Author: Nick Jones (Digitanium)

+--------------------------------------------------------+

| This program is released as free software under the

| Affero GPL license. You can redistribute it and/or

| modify it under the terms of this license which you

| can read by viewing the included agpl.txt or online

| at www.gnu.org/licenses/agpl.html. Removal of this

| copyright header is strictly prohibited without

| written permission from the original author(s).

+--------------------------------------------------------*/

require_once "maincore.php";

require_once THEMES."templates/header.php";

include LOCALE.LOCALESET."news_cats.php";

add_to_title($locale['global_200'].$locale['400']);

opentable($locale['400']);

if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {

   $res = 0;

   $result = dbquery("SELECT news_cat_name FROM ".DB_NEWS_CATS." WHERE news_cat_id='".$_GET['cat_id']."'");

   if (dbrows($result) || $_GET['cat_id'] == 0) {

      $data = dbarray($result);

      $rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");

      if ($rows) {

         $res = 1;

         echo "\n";

         if ($_GET['cat_id'] != 0) {

/* echo "\n\n";

            /* echo "\n\n\n\n\n\n\n
'".$data['news_cat_name']."'

\n"; */

/* echo "".$locale['401']." ".$data['news_cat_name']."
\n".$locale['402']." $rows
\n"; */

         } else {

            echo "
".$locale['403']."
\n"; 

            echo "".$locale['401']." $rows
\n";

         }

//start new code//   

   $result2 = dbquery(

        "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn

        LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id

        LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id

        WHERE news_cat='".$_GET['cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC"

        );

//end new code//



while ($data2 = dbarray($result2)) {

         $news_news = $data2['news_breaks'] == "y" ? nl2br(stripslashes($data2['news_news'])) : stripslashes($data2['news_news']);

         opentable($data2['news_subject']);

         echo $news_news;



//Bottom Bar Begin

         $nfooter_info = array(

            "news_id" => $data2['news_id'],

            "user_id" => $data2['user_id'],

            "user_name" => $data2['user_name'],

            "user_status" => $data2['user_status'],

            "news_date" => $data2['news_datestamp'],

            "news_subject" => $data2['news_subject'],

            "news_ext" => $data2['news_extended'] ? "y" : "n",

            "news_reads" => $data2['news_reads'],


/* deze regel weggehaald
       "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data2['news_id']."' AND comment_hidden='0'"),
*/

       "news_allow_comments" => $data2['news_allow_comments'],

            "news_sticky" => $data2['news_sticky']

         );

         render_nfooter($nfooter_info);

//Bottom Bar End

         closetable();

         }



/* Ivo removed here:    echo "
".THEME_BULLET." ".$locale['406']."";*/

         echo "
\n";

      }

   }

   if (!$res) { redirect(FUSION_SELF); }

/* met de volgende code wordt de overzicht pagina van alle nieuws categorieen getoond */
} else {
   $res = 0;
   $result = dbquery("SELECT news_cat_id, news_cat_name FROM ".DB_NEWS_CATS." ORDER BY news_cat_id");
   if (dbrows($result)) {
      echo "\n";
      while ($data = dbarray($result)) {
         $rows = dbcount("(news_id)", DB_NEWS, "news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
          echo "\n\n";
         echo "\n\n";
      }
      $res = 1;
   }

/* vanaf hier wordt alle niet categoriseerd nieuws getoond */
   $result = dbquery("SELECT * FROM ".DB_NEWS." WHERE news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
   if (dbrows($result)) {
      if ($res == 0) { echo "
'".$data['news_cat_name']."'

\n";
          echo "".$locale['401']." ".$data['news_cat_name']."
\n".$locale['402']." $rows
\n";
         if ($rows) {
            $result2 = dbquery("SELECT news_id, news_subject,news_breaks,news_news FROM ".DB_NEWS." WHERE news_cat='".$data['news_cat_id']."' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0' ORDER BY news_datestamp DESC LIMIT 10");
            while ($data2 = dbarray($result2)) {
            $news_news = $data2['news_breaks'] == "y" ? nl2br(stripslashes($data2['news_news'])) : stripslashes($data2['news_news']);
            opentable("".$data2['news_subject']."");
/* blue is kleur van link naar nieuws in newcat overzicht van alle categorieen */
            echo $news_news;
            


            closetable();
            }
            if ($rows > 10) { echo "
".THEME_BULLET." ".$locale['405']."
\n"; }
         } else {
            echo THEME_BULLET." ".$locale['404']."\n";
         }
         echo "
\n"; }
      $nrows = dbcount("(news_id)", DB_NEWS, "news_cat='0' AND ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_draft='0'");
      echo "\n\n\n\n";
   }
   if ($res == 1) {
      echo "
".$locale['403']."
\n";
      echo "".$locale['402']." $nrows
\n";
      while ($data = dbarray($result)) {
      opentable("".$data['news_subject']."");
      $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
      echo $news_news;
      closetable();
      }
      $res = 1;
      if ($nrows > 10) { echo "
".THEME_BULLET." ".$locale['405']."
\n"; }
      echo "
\n";
   } else {
      echo "

\n".$locale['407']."

\n
\n";
   }
}
closetable();
require_once THEMES."templates/footer.php";
?>