Błąd
Wyniki 1 do 7 z 7

Temat: Błąd

  1. #1
    Przeglądacz
    Dołączył
    26-04-2008
    Wpisy
    68
    Punkty
    10

    Domyślny Błąd

    Błąd w miejscu wyswietlania sie modulu ...

    Kod:
    Notice:  Undefined variable: mosConfig_user in /home/kolektyw/aoc/www/modules/mod_latest_topics_ext.php on line 48
                                    setQuery($query);           echo $db->getErrorMsg();           $rows = $db->loadObjectList();                      //check if there is result           if(count($rows) > 0){                            for($i=0,$n=count($rows);$i<$n;$i++){               $row = &$rows[$i];                $topic_title = $row->topic_title;               if(strlen($topic_title) > $titlelenght){                       $topic_title = substr($topic_title, 0, ($titlelenght - 2)) . "...";               }                $topic_id = $row->topic_id;                              echo '+ ';               echo ''.$topic_title."";               if($display_time == 1){                 if(!empty($title_time_separator)){                   echo " " . $title_time_separator;                 }                 echo " " . strftime($time_format, $row->topic_time);               }               if($display_user == 1){                 if(!empty($time_user_separator)){                   echo " " . $time_user_separator;                 }                 echo ' '.$row->poster."";               }               echo "
    \n";             }           }           else {              echo '+ No topics found
    ';           }           ?>                                               
    Notice:  Undefined variable: mosConfig_db in /home/kolektyw/aoc/www/modules/mod_latest_topics_ext.php on line 121
    Ostanio edytowane przez Vesmir : 22-12-2008 08:00

  2. Pani Reklamowa
    Pani Reklamowa jest aktywna
    Avatar Panny Google

    Dołączył
    19-08-2010
    Skąd
    Internet
    Postów
    milion
    Pochwał
    setki
  3. #2
    Bywalec
    Dołączył
    22-10-2008
    Wpisy
    168
    Punkty
    10

    Domyślny

    Błąd w miejscu wyświetlania się modułu ...
    Określ się modułów jest dużo....

    jaka joomla skąd modul...



    Jesli sie nie myle to latst_topics wiec:

    1. znajdz plik mod_latest_topics_ext.php i wyedytuj go

    2. w lini 66 pewnie znajduje się

    Kod PHP:
    <?
    więc

    popraw to na to:

    Kod PHP:
    <?php

    Jeśli to moduł którego się domyślam to powinno zadziałać
    Ostanio edytowane przez wisnia80 : 23-12-2008 11:24

  4. #3
    Przeglądacz
    Dołączył
    26-04-2008
    Wpisy
    68
    Punkty
    10

    Domyślny

    .....

  5. #4
    Przeglądacz
    Dołączył
    26-04-2008
    Wpisy
    68
    Punkty
    10

    Domyślny

    Tak chodzi dokładnie o ten mod, dopisałem php jak zaleciłeś i

    Kod:
    Notice:  Undefined variable: mosConfig_user in /home/kolektyw/aoc/www/modules/mod_latest_topics_ext.php on line 48
     	 		 		         
    Notice:  Undefined variable: component in /home/kolektyw/aoc/www/modules/mod_latest_topics_ext.php on line 69
    
    ( tutaj wyświetlają sie tematy z forum )
                                			 	  
    Notice:  Undefined variable: mosConfig_db in /home/kolektyw/aoc/www/modules/mod_latest_topics_ext.php on line 121

    Kod PHP:
    <?php
    // $Id: mod_latest_posts.php,v 1.0 2003/09/15 08:02:54 avandongen Exp $
    //
    // Copyright (C) 2004 TIM_online
    // All rights reserved.
    //
    // 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, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    //
    // The "GNU General Public License" (GPL) is available at
    // http://www.gnu.org/copyleft/gpl.html.

    defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

    $titlelenght = ($params->get'titlelenght' )) ? $params->get'titlelenght' ) : 15;
    $moduleclass_sfx $params->get'moduleclass_sfx' );
    $forum_access = ($params->get'forum_access' )) ? $params->get'forum_access' ) : 0;
    $number = ($params->get'number' )) ? $params->get'number' ) : 10;
    $linktarget = ($params->get'linktarget' )) ? $params->get'linktarget' ) : '_self';

    $display_time = ($params->get'display_time' )) ? $params->get'display_time' ) : 0;
    $title_time_separator = ($params->get'title_time_separator' )) ? $params->get'title_time_separator' ) : " @ ";
    $time_format = ($params->get'time_format' )) ? $params->get'time_format' ) : "%d-%m-%Y %H:%M";

    $display_user = ($params->get'display_user' )) ? $params->get'display_user' ) : 0;
    $time_user_separator = ($params->get'time_user_separator' )) ? $params->get'time_user_separator' ) : " by ";

    $dbhost = ($params->get'dbhost' )) ? $params->get'dbhost' ) : "localhost";
    $dbuser = ($params->get'dbuser' )) ? $params->get'dbuser' ) : "";
    $dbpass = ($params->get'dbpass' )) ? $params->get'dbpass' ) : "";
    $dbname = ($params->get'dbname' )) ? $params->get'dbname' ) : "";

    $phpbb_prefix = ($params->get'phpbb_prefix' )) ? $params->get'phpbb_prefix' ) : "phpbb_";

    $phpbb_url = ($params->get'phpbb_url' )) ? $params->get'phpbb_url' ) : "";

    if((
    $mosConfig_user == $dbuser) && ($mosConfig_password == $dbpass)){
      
    $db = &$database;
      
      
    //same username and password, no extra connection needed...
      
    if($mosConfig_db != $dbname){
        
    //switch db
        
    mysql_select_db($dbname);
      }
    }
    else {
      
    //connect to phpbb database
      
    $db = new database($dbhost$dbuser$dbpass$dbname$phpbb_prefix);
    }

    mod_latest_topics_ext.php

    ?>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="<?php echo $moduleclass_sfx?>content" align="center">
        <tr>
            <td>
              <!-- begin topic content -->
          <?php
          
          $link 
    = ($component == 1) ? '' '2';
          
              
    $query="SELECT topic_title, topic_id, t.topic_time, t.topic_poster, t.topic_last_post_id AS topic_poster_id, u.username AS topic_poster
              FROM " 
    .$phpbb_prefix "topics t
              LEFT JOIN " 
    .$phpbb_prefix "forums f ON f.forum_id = t.forum_id
              LEFT JOIN " 
    .$phpbb_prefix "users u ON t.topic_poster = u.user_id
              WHERE f.auth_read <= 
    $forum_access AND t.topic_views != 0 
              ORDER BY t.topic_last_post_id DESC LIMIT 0, 
    $number";

              
    $db->setQuery($query);
              echo 
    $db->getErrorMsg();
              
    $rows $db->loadObjectList();
              
              
    //check if there is result
              
    if(count($rows) > 0){
                  
                for(
    $i=0,$n=count($rows);$i<$n;$i++){
                  
    $row = &$rows[$i];

                  
    $topic_title $row->topic_title;
                  if(
    strlen($topic_title) > $titlelenght){
                          
    $topic_title substr($topic_title0, ($titlelenght 2)) . "...";
                  }

                  
    $topic_id $row->topic_id;
                  
                  echo 
    '<font class="cross">+</font> ';
                  echo 
    '<a target="'.$linktarget.'" href="'.$phpbb_url 'viewtopic.php?t=' $row->topic_id '" title="'.$row->topic_title.'">'.$topic_title."</a>";
                  if(
    $display_time == 1){
                    if(!empty(
    $title_time_separator)){
                      echo 
    " " $title_time_separator;
                    }
                    echo 
    " " strftime($time_format$row->topic_time);
                  }
                  if(
    $display_user == 1){
                    if(!empty(
    $time_user_separator)){
                      echo 
    " " $time_user_separator;
                    }
                    echo 
    ' <a target="'.$linktarget.'" href="'.$phpbb_url 'profile?mode=viewprofile&u=' $row->poster_id '" title="'.$row->poster.'">'.$row->poster."</a>";
                  }
                  echo 
    "<br />\n";
                }
              }
              else {
                 echo 
    '<font class="cross">+</font> <a target="'.$linktarget.'" href="'.$phpbb_url 'index.php">No topics found</a><br>';
              }
              
    ?>                           
                
        </tr>
    </table>
    <?php
    //restore database
    mysql_select_db($mosConfig_db);
    ?>

  6. #5
    Senior zwiastun awatar
    Dołączył
    20-09-2005
    Wpisy
    27 315
    Punkty
    1142

    Domyślny

    Zmień poziom raportowania błędów. To nie są błędy tylko uwagi.
    Korzystaj i ciesz się!
    ===============
    Zwiastun
    Biblioteka Elektronicznej Dokumentacji Joomla!

  7. #6
    Przeglądacz
    Dołączył
    26-04-2008
    Wpisy
    68
    Punkty
    10

    Domyślny

    Wszystko działa dzięki bardzo.

    Powiedzcie jeszcze o co chodzi z tym ze na jednym serwerze działa
    Kod PHP:
    <?
    a na innym musi byc
    Kod PHP:
    <?php
    różne wersje php ?

  8. #7
    Senior zwiastun awatar
    Dołączył
    20-09-2005
    Wpisy
    27 315
    Punkty
    1142

    Domyślny

    Ustawienie short_open_tag - krótkie znaczniki. Ale dla Joomla! powinno być wyłączone, a krótkie znaczniki pozostawione w kodzie Joomla i rozszerzeń to usterka;
    Korzystaj i ciesz się!
    ===============
    Zwiastun
    Biblioteka Elektronicznej Dokumentacji Joomla!

Reguły pisania

  • Nie możesz zakładać nowych tematów
  • Nie możesz dodawać wypowiedzi
  • Nie możesz dodawać załączników
  • Nie możesz poprawiać swoich postów
  •