Index
Forums
Annuaire
Référencement
Télécharger
  phpBB SEO : Référencement Google, MSN, Yahoo, Annuaires, Forums  
phpBB SEO
Boards
Directory  
SEO  
Downloads
 
  Rechercher Search
    S'enregistrer
Pseudo :  Passe :  Auto  
Register  
 
   
[mixed] MAJ 0.2.0 -> 0.2.2
Aller à la page Précédente  1, 2, 3  Suivante
 
Poster un nouveau sujet   Répondre au sujet    phpBB SEO » Forum Référencement  » mod Rewrite phpBB  » mod Rewrite Intermédiaire
::  
Auteur Message
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 15135

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 8:58 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

Code:
$phpbb_seo->seo_url['cat'][$cat_id]


vs
Code:

$phpbb_seo->seo_url['forum'][$forum_id]


Pas tout à fait la même chose Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Revenir en haut de page
Visiter le site web de l'utilisateur
Personne
PR4
PR4


Inscrit le: 30 Oct 2006
Messages: 485

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 9:12 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

Bon je dois avoir un souci :

j'ai fais les modifs et depuis je n'accède plus à mon forum du tout Rolling Eyes
page blanche Confused

_________________
Personnellement...
Le Forum photo ll Le Blog
Revenir en haut de page
Visiter le site web de l'utilisateur
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Inscrit le: 28 Avr 2006
Messages: 15135

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 9:17 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

Il y a deux changement de code pour index.php avec ce mod.

Il faut que tu ais :

Code:
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $phpbb_seo->seo_url['cat'][$cat_id] = $phpbb_seo->format_url($category_rows[$i]['cat_title'], $phpbb_seo->seo_static['cat']);
         // www.phpBB-SEO.com SEO TOOLKIT END


après :

Code:
      if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
      {


et :

Code:
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                     if ( !isset($phpbb_seo->seo_url['forum'][$forum_id]) ) {
                        $phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->format_url($forum_data[$j]['forum_name'], $phpbb_seo->seo_static['forum']);
                     }
                     // www.phpBB-SEO.com SEO TOOLKIT END


après :

Code:

                  if ( $is_auth_ary[$forum_id]['auth_view'] )
                  {


Ce montrait ton antépénultième post Wink

Rien de plus. Normalement, pour une maj, cela passe par effacer :


Code:
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                     if ( !isset($phpbb_seo->seo_url['forum'][$forum_id]) ) {
                        $phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->format_url($forum_data[$j]['forum_name'], $phpbb_seo->seo_static['forum']);
                     }
                     // www.phpBB-SEO.com SEO TOOLKIT END


Un peu plus bas dans le code.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Revenir en haut de page
Visiter le site web de l'utilisateur
Personne
PR4
PR4


Inscrit le: 30 Oct 2006
Messages: 485

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 9:32 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

oui c'est bien ce que j'ai et... page blanche Confused

mon index modifié est celui ci (désolé mais je patauge là) :

Code:
<?php

//-- MOD : Last Topic Title on Index -------------------

/***************************************************************************
 *                                index.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: index.php,v 1.99.2.7 2006/01/28 11:13:39 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
   $mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
   $mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
   if( $userdata['session_logged_in'] )
   {
      setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
   }

   $template->assign_vars(array(
      "META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')
   );

   $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

   message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
   $l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
   $l_total_post_s = $lang['Posted_article_total'];
}
else
{
   $l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
   $l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
   $l_total_user_s = $lang['Registered_user_total'];
}
else
{
   $l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
   FROM " . CATEGORIES_TABLE . " c
   ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$category_rows = array();
while ($row = $db->sql_fetchrow($result))
{
   $category_rows[] = $row;
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   if ( $row['cat_id'] == $viewcat ) { $this_cat_title = $row['cat_title']; }
   // www.phpBB-SEO.com SEO TOOLKIT END
}
$db->sql_freeresult($result);
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $phpbb_seo->seo_req_uri();
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && (strpos($uri, "sid=" ) !== FALSE ));
if ( $viewcat > 0 ) {
   $phpbb_seo->page_url = $phpbb_seo->format_url($this_cat_title, $phpbb_seo->seo_static['cat']) . $phpbb_seo->seo_delim['cat'] . $viewcat . $phpbb_seo->seo_ext['cat'];
   if ( $phpbb_seo->do_redir || strpos($uri, $phpbb_seo->page_url) === FALSE) {
      $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->page_url);
   }
} elseif ($viewcat == -1) {
   $mark_use = ($userdata['session_logged_in']) ? $mark_read : '';
   if (!empty($phpbb_seo->seo_static['index'])) {
      $phpbb_seo->seo_cond(( $mark_use == '' &&  strpos($uri, $phpbb_seo->seo_static['index']) === FALSE ), TRUE);
   } else {
      $phpbb_seo->seo_cond(( $mark_use == '' &&  strpos($uri, "index.$phpEx") !== FALSE ), TRUE);
   }
   if ( $phpbb_seo->do_redir) {
      $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->seo_static['index']);
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END
if( ( $total_categories = count($category_rows) ) )
{
   //
   // Define appropriate SQL
   //
   switch(SQL_LAYER)
   {
      case 'postgresql':
         $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
            FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
            WHERE p.post_id = f.forum_last_post_id
               AND u.user_id = p.poster_id 
               UNION (
                  SELECT f.*, NULL, NULL, NULL, NULL
                  FROM " . FORUMS_TABLE . " f
                  WHERE NOT EXISTS (
                     SELECT p.post_time
                     FROM " . POSTS_TABLE . " p
                     WHERE p.post_id = f.forum_last_post_id 
                  )
               )
               ORDER BY cat_id, forum_order";
         break;

      case 'oracle':
         $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
            FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
            WHERE p.post_id = f.forum_last_post_id(+)
               AND u.user_id = p.poster_id(+)
            ORDER BY f.cat_id, f.forum_order";
         break;

      default:
//-- MOD BEGIN: Last Topic Title on Index -------------------
         $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_id, t.topic_title, t.topic_last_post_id
            FROM ((( " . FORUMS_TABLE . " f
            LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
            LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = p.post_id )
            LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
            ORDER BY f.cat_id, f.forum_order";
//-- MOD END: Last Topic Title on Index -------------------
         break;

   }
   if ( !($result = $db->sql_query($sql, false, 'posts_')) )
   {
      message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
   }

   $forum_data = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $forum_data[] = $row;
   }
   $db->sql_freeresult($result);

   if ( !($total_forums = count($forum_data)) )
   {
      message_die(GENERAL_MESSAGE, $lang['No_forums']);
   }
//-- MOD BEGIN: Last Topic Title on Index -------------------
   //
   // Define censored word matches
   //
   $orig_word = array();
   $replacement_word = array();
   obtain_word_list($orig_word, $replacement_word);
//-- MOD END: Last Topic Title on Index -------------------
   //
   // Obtain a list of topic ids which contain
   // posts made since user last visited
   //
   if ($userdata['session_logged_in'])
   {
      // 60 days limit
      if ($userdata['user_lastvisit'] < (time() - 5184000))
      {
         $userdata['user_lastvisit'] = time() - 5184000;
      }

      $sql = "SELECT t.forum_id, t.topic_id, p.post_time
         FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
         WHERE p.post_id = t.topic_last_post_id
            AND p.post_time > " . $userdata['user_lastvisit'] . "
            AND t.topic_moved_id = 0";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
      }

      $new_topic_data = array();
      while( $topic_data = $db->sql_fetchrow($result) )
      {
         $new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
      }
      $db->sql_freeresult($result);
   }

   //
   // Obtain list of moderators of each forum
   // First users, then groups ... broken into two queries
   //
   $sql = "SELECT aa.forum_id, u.user_id, u.username
      FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
      WHERE aa.auth_mod = " . TRUE . "
         AND g.group_single_user = 1
         AND ug.group_id = aa.group_id
         AND g.group_id = aa.group_id
         AND u.user_id = ug.user_id
      GROUP BY u.user_id, u.username, aa.forum_id
      ORDER BY aa.forum_id, u.user_id";
   if ( !($result = $db->sql_query($sql, false, true)) )
   {
      message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
   }

   $forum_moderators = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
   }
   $db->sql_freeresult($result);

   $sql = "SELECT aa.forum_id, g.group_id, g.group_name
      FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
      WHERE aa.auth_mod = " . TRUE . "
         AND g.group_single_user = 0
         AND g.group_type <> " . GROUP_HIDDEN . "
         AND ug.group_id = aa.group_id
         AND g.group_id = aa.group_id
      GROUP BY g.group_id, g.group_name, aa.forum_id
      ORDER BY aa.forum_id, g.group_id";
   if ( !($result = $db->sql_query($sql, false, true)) )
   {
      message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
   }

   while( $row = $db->sql_fetchrow($result) )
   {
      $forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
   }
   $db->sql_freeresult($result);

   //
   // Find which forums are visible for this user
   //
   $is_auth_ary = array();
   $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
//-- MOD BEGIN: Last Topic Title on Index -------------------
   //
   // Find which forums are readable for this user
   //
   $auth_read_ary = array();
   $auth_read_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data);
//-- MOD END: Last Topic Title on Index -------------------
   //
   // Start output of page
   //
   define('SHOW_ONLINE', true);
   $page_title = $lang['Index'];
   include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//-- mod : today userlist ------------------------------------------------------
//-- add
   include($phpbb_root_path . 'includes/class_userlist.' . $phpEx);
   $today_userlist = new today_userlist();
   $today_userlist->display();
   unset($today_userlist);
//-- fin mod : today userlist --------------------------------------------------

//-- mod : Avatar on index -------------------------------------------------------------------------
//-- add
   if( $userdata['session_logged_in'] )
   {
      $sql = "SELECT u.user_avatar, u.user_avatar_type, u.user_id, u.user_allowavatar, u.username
         FROM " . USERS_TABLE . " u
         WHERE u.user_id = " . $userdata['user_id'] ;
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not query user information', '', __LINE__, __FILE__, $sql);
      }
         $avatarrow = $db->sql_fetchrow($result);

      if ( $avatarrow['user_avatar_type'] && $userdata['user_id'] != ANONYMOUS && $avatarrow['user_allowavatar'] )
      {
         switch( $avatarrow['user_avatar_type'] )
         {
            case USER_AVATAR_UPLOAD:
               $user_avatar = ( $board_config['allow_avatar_upload'] ) ? $board_config['avatar_path'] . '/' . $avatarrow['user_avatar'] : '';
               break;
            case USER_AVATAR_REMOTE:
               $user_avatar = ( $board_config['allow_avatar_remote'] ) ? $avatarrow['user_avatar'] : '';
               break;
            case USER_AVATAR_GALLERY:
               $user_avatar = ( $board_config['allow_avatar_local'] ) ? $board_config['avatar_gallery_path'] . '/' . $avatarrow['user_avatar'] : '';
               break;
         }
         $user_avatar = '<a href="' . append_sid('search.'.$phpEx.'?search_id=egosearch') .
               '"><img src="' . $user_avatar . '" alt="' . $avatarrow['username'] . '" border="0" /></a><br>';
      }
      $user_name = '<a href="' . append_sid('profile.'.$phpEx.'?mode=editprofile') .
            '"><b>' . $avatarrow['username'] . '</b></a>';

      $sql = "SELECT COUNT(post_id) as tot
         FROM " . POSTS_TABLE . "
         WHERE post_time >= " . $userdata['user_lastvisit'] . "
         AND poster_id != " . $userdata['user_id'];

      $result = $db->sql_query($sql);

      if( $result )
      {
         $row = $db->sql_fetchrow($result);
         $user_newposts = '<a href="' . append_sid('search.'.$phpEx.'?search_id=newposts') .
                  '" class="gensmall">' . $lang['Search_new'] . ' (' . $row['tot'] .')</a>';
      }
   }
   else
   {
      $user_avatar = '';
   }
//-- end : Avatar on index -------------------------------------------------------------------------

   $template->set_filenames(array(
      'body' => 'index_body.tpl')
   );
// Start add  - Photo Album Block
$album_root_path = $phpbb_root_path . 'album_mod/';
include_once($album_root_path . 'album_common.'.$phpEx);

// Build Categories Index
$sql = "SELECT *
      FROM ". ALBUM_CAT_TABLE ."
      WHERE cat_id <> 0
      GROUP BY cat_id
      ORDER BY cat_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
$catrows = array();

while( $row = $db->sql_fetchrow($result) )
{
   $album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW
   if ($album_user_access['view'] == 1)
   {
      $catrows[] = $row;
   }
}
if ( $album_config['pics_all'] == '1' )
{
   $allowed_cat = '0'; // For Recent Public Pics below
}
else
{
   $allowed_cat = '';
}

//
// $catrows now stores all categories which this user can view. Dump them out!
//
for ($i = 0; $i < count($catrows); $i++)
{
   // Build allowed category-list (for recent pics after here)
   $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id'];

   // Check Pic Approval
   if ( ($catrows[$i]['cat_approval'] == ALBUM_ADMIN) || ($catrows[$i]['cat_approval'] == ALBUM_MOD) )
   {
      $pic_approval_sql = 'AND p.pic_approval = 1'; // Pic Approval ON
   }
   else
   {
      $pic_approval_sql = ''; // Pic Approval OFF
   }
}

// Recent Public Pics
if ( $album_config['pics_all'] == '1' )
{
   $pics_allowed = '0';
}
else
{
   $pics_allowed = '';
}

if ( $allowed_cat != $pics_allowed )
{
   $category_id = $album_config['cat_id'];

   if ( $album_config['pics_sort'] == '1' )
   {
      if ( $category_id != 0 )
      {
         $sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, u.user_level, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, p.pic_filename AS picfilename
            FROM ". ALBUM_TABLE ." AS p
               LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
               LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
               LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
               LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
            WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 ) AND pic_cat_id IN ($category_id)
            GROUP BY p.pic_id
            ORDER BY RAND()
            LIMIT ". $album_config['pics_number'];
      }
      else
      {
         $sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, u.user_level, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, p.pic_filename AS picfilename
            FROM ". ALBUM_TABLE ." AS p
               LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
               LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
               LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
               LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
            WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )
            GROUP BY p.pic_id
            ORDER BY RAND()
            LIMIT ". $album_config['pics_number'];
         }
   }
   else if ( $album_config['pics_sort'] == '0' )
   {
      if ( $category_id != 0 )
      {
         $sql = "SELECT p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, u.user_level, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, p.pic_filename AS picfilename
            FROM ". ALBUM_TABLE ." AS p
               LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
               LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
               LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
               LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
            WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 ) AND pic_cat_id IN ($category_id)
            GROUP BY p.pic_id
            ORDER BY p.pic_time DESC
            LIMIT ". $album_config['pics_number'];
      }
      else
      {
         $sql = "SELECT u.user_level, p.pic_id, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, u.user_level, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, p.pic_filename AS picfilename
            FROM ". ALBUM_TABLE ." AS p
               LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
               LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
               LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
               LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
            WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )
            GROUP BY p.pic_id
            ORDER BY pic_time DESC
            LIMIT ". $album_config['pics_number'];
      }
   }
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not query recent pics information', '', __LINE__, __FILE__, $sql);
   }
   $recentrow = array();

   while( $row = $db->sql_fetchrow($result) )
   {
      $recentrow[] = $row;
   }

   if (count($recentrow) > 0)
   {
      for ($i = 0; $i < count($recentrow); $i += $album_config['cols_per_page'])
      {
         $template->assign_block_vars('recent_pics', array());

         for ($j = $i; $j < ($i + $album_config['cols_per_page']); $j++)
         {
            if ( $j >= count($recentrow) )
            {
               break;
            }

            if (!$recentrow[$j]['rating'])
            {
               $recentrow[$j]['rating'] = $lang['Not_rated'];
            }
            else
            {
               $recentrow[$j]['rating'] = round($recentrow[$j]['rating'], 2);
            }

            // Display pics horizontally
            $template->assign_block_vars('recent_pics.recent_col', array(
               'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $recentrow[$j]['pic_id']) : append_sid("album_page.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
               'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
               'DESC' => $recentrow[$j]['pic_desc'])
            );

            if ( ($recentrow[$j]['user_id'] == ALBUM_GUEST) or ($recentrow[$j]['username'] == '') )
            {
               $recent_poster = ($recentrow[$j]['pic_username'] == '') ? $lang['Guest'] : $recentrow[$j]['pic_username'];
            }
            else
            {
               // Start add - Username Color Mod
               switch ( $recentrow[$j]['user_level'] )
               {
                  case ADMIN:
                     $poster_name = '<b>' . $recentrow[$j]['username'] . '</b>';
                     $style_color = ' style="color:#' . $theme['fontcolor3'] . '"';
                     break;
                  case MOD:
                     $poster_name = '<b>' . $recentrow[$j]['username'] . '</b>';
                     $style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
                     break;
                  default:
                     $poster_name = $recentrow[$j]['username'];
                     $style_color = '';
                     break;
               }
               // End add - Username Color Mod
               $recent_poster = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;". POST_USERS_URL .'='. $recentrow[$j]['user_id']) . '"' . $style_color . '>' . $poster_name . '</a>';
            }

            // Start add - Pics Dimension/Size Add-on
            $pic_dimension = getimagesize(ALBUM_UPLOAD_PATH . $recentrow[$j]['picfilename']);
            $pic_width = $pic_dimension[0];
            $pic_height = $pic_dimension[1];

            $pic_size = round(((filesize(ALBUM_UPLOAD_PATH . $recentrow[$j]['picfilename'])) / 1024), 2) . ' ' . $lang['Kb'];
            // End add - Pics Dimension/Size Add-on

            // Display pics vertically
            $template->assign_block_vars('recent_pics.recent_detail', array(
               'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $recentrow[$j]['pic_id']) : append_sid("album_page.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
               'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
               'DESC' => $recentrow[$j]['pic_desc'],
               'TITLE' => $recentrow[$j]['pic_title'],
               'POSTER' => $recent_poster,
               'TIME' => create_date($board_config['default_dateformat'], $recentrow[$j]['pic_time'], $board_config['board_timezone']),
               // New entries - Pics Dimension/Size Add-on
               'DIMENSION' => $pic_width . ' x ' . $pic_height,
               'SIZE' => $pic_size,
               'VIEW' => $recentrow[$j]['pic_view_count'],
               'RATING' => ($album_config['rate'] == 1) ? ( $lang['Rating'] . ': <a href="' . append_sid("album_rate.$phpEx?pic_id=". $recentrow[$j]['pic_id']) . '">' . $recentrow[$j]['rating'] . '</a><br />') : '',
               'COMMENTS' => ($album_config['comment'] == 1) ? ( $lang['Comments'] . ': <a href="' . append_sid("album_comment.$phpEx?pic_id=". $recentrow[$j]['pic_id']) . '">' . $recentrow[$j]['comments'] . '</a>') : '')
            );
         }
      }
   }
   else
   {
      // No Pics Found
      $template->assign_block_vars('no_pics', array());
   }
}
else
{
   // No Cats Found
   $template->assign_block_vars('no_pics', array());
}
// End add  - Photo Album Block
   $template->assign_vars(array(
// Start add - Photo Album Block
   'S_COLS' => $album_config['cols_per_page'],
   'S_COL_WIDTH' => ($album_config['cols_per_page'/100] ) . '%',
   'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? ' target="_blank"' : '',
   'U_ALBUM' => append_sid('album.'.$phpEx),
   'L_ALBUM' => $lang['Album'],
   'L_NEWEST_PICS' => ( $album_config['pics_sort'] == '0' ) ? $lang['Newest_pics'] : $lang['Random_pics'],
   'L_NO_PICS' => $lang['No_Pics'],
   'L_PIC_TITLE' => $lang['Pic_Title'],
   'L_POSTER' => $lang['Poster'],
   'L_POSTED' => $lang['Posted'],
   'L_DIMENSION' => $lang['Dimension'],
   'L_SIZE' => $lang['Size'],
   'L_VIEW' => $lang['View'],
   // End add - Photo Album Block

      'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
      'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
      'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),

      'FORUM_IMG' => $images['forum'],
      'FORUM_NEW_IMG' => $images['forum_new'],
      'FORUM_LOCKED_IMG' => $images['forum_locked'],
//-- mod : Avatar on index -------------------------------------------------------------------------
//-- add
      'USER_AVATAR' => $user_avatar,
      'USER_NAME' => $user_name,
      'USER_NEWPOSTS' => $user_newposts,
//-- end : Avatar on index -------------------------------------------------------------------------
// Start add - Fully integrated shoutbox MOD
'U_SHOUTBOX' => append_sid("shoutbox.$phpEx"),
'L_SHOUTBOX' => $lang['Shoutbox'],
'U_SHOUTBOX_MAX' => append_sid("shoutbox_max.$phpEx"),
// End add - Fully integrated shoutbox MOD
      'L_FORUM' => $lang['Forum'],
      'L_TOPICS' => $lang['Topics'],
      'L_REPLIES' => $lang['Replies'],
      'L_VIEWS' => $lang['Views'],
      'L_POSTS' => $lang['Posts'],
      'L_LASTPOST' => $lang['Last_Post'],
      'L_NO_NEW_POSTS' => $lang['No_new_posts'],
      'L_NEW_POSTS' => $lang['New_posts'],
      'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
      'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
      'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
      'L_RECOMMEND_FORUM' => $lang['Recommend_Forum'],
      'U_RECOMMEND_FORUM' => append_sid("recommend.$phpEx"),

      'L_MODERATOR' => $lang['Moderators'],
      'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
      'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],

      'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
   );

   //
   // Let's decide which categories we should display
   //
   $display_categories = array();

   for ($i = 0; $i < $total_forums; $i++ )
   {
      if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'])
      {
         $display_categories[$forum_data[$i]['cat_id']] = true;
      }
   }

   //
   // Okay, let's build the index
   //
   for($i = 0; $i < $total_categories; $i++)
   {
      $cat_id = $category_rows[$i]['cat_id'];

      //
      // Yes, we should, so first dump out the category
      // title, then, if appropriate the forum list
      //
      if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
      {
      
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         $phpbb_seo->seo_url['cat'][$cat_id] = $phpbb_seo->format_url($category_rows[$i]['cat_title'], $phpbb_seo->seo_static['cat']);
         // www.phpBB-SEO.com SEO TOOLKIT END

        $template->assign_block_vars('catrow', array(
            'CAT_ID' => $cat_id,
            'CAT_DESC' => $category_rows[$i]['cat_title'],
            'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
         );

         if ( $viewcat == $cat_id || $viewcat == -1 )
         {
            for($j = 0; $j < $total_forums; $j++)
            {
               if ( $forum_data[$j]['cat_id'] == $cat_id )
               {
                  $forum_id = $forum_data[$j]['forum_id'];

                  if ( $is_auth_ary[$forum_id]['auth_view'] )
                  {
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                     if ( !isset($phpbb_seo->seo_url['forum'][$forum_id]) ) {
                        $phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->format_url($forum_data[$j]['forum_name'], $phpbb_seo->seo_static['forum']);
                     }
                     // www.phpBB-SEO.com SEO TOOLKIT END
                     if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
                     {
                        $folder_image = $images['forum_locked'];
                        $folder_alt = $lang['Forum_locked'];
                     }
                     else
                     {
                        $unread_topics = false;
                        if ( $userdata['session_logged_in'] )
                        {
                           if ( !empty($new_topic_data[$forum_id]) )
                           {
                              $forum_last_post_time = 0;

                              while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
                              {
                                 if ( empty($tracking_topics[$check_topic_id]) )
                                 {
                                    $unread_topics = true;
                                    $forum_last_post_time = max($check_post_time, $forum_last_post_time);

                                 }
                                 else
                                 {
                                    if ( $tracking_topics[$check_topic_id] < $check_post_time )
                                    {
                                       $unread_topics = true;
                                       $forum_last_post_time = max($check_post_time, $forum_last_post_time);
                                    }
                                 }
                              }

                              if ( !empty($tracking_forums[$forum_id]) )
                              {
                                 if ( $tracking_forums[$forum_id] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }

                              if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                              {
                                 if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }

                           }
                        }

                        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
                     }

                     $posts = $forum_data[$j]['forum_posts'];
                     $topics = $forum_data[$j]['forum_topics'];
                                                                                                                $icon = $forum_data[$j]['forum_icon'];   // Forum Icon Mod

                     if ( $forum_data[$j]['forum_last_post_id'] )
                     {
                        $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

                        // OLD
                        // $last_post = $last_post_time . '<br />';
                        //
                                         // MOD - TODAY AT - BEGIN
                        //
                        if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
                        {
                           $last_post = sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />';
                        }
                        else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
                        {
                           $last_post = sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />';
                        }
                        else
                        {
                           $last_post = $last_post_time . '<br />';
                        }
                                         // MOD - TODAY AT - END

               //-- MOD BEGIN: Last Topic Title on Index -------------------
                        $ltid = $forum_data[$j]['topic_id'];
                        $lttitle = $forum_data[$j]['topic_title'];

                  //
                  // Censor topic title
                  //
                        if ( count($orig_word) )
                        {
                           $lttitle = preg_replace($orig_word, $replacement_word, $lttitle);
                        }
                        $altlttitle = $lttitle;
                        $lang_in = $lang['in'];
                  // undo_htmlspecialchars();
                        $lttitle = preg_replace("/&gt;/i", ">", $lttitle);
                        $lttitle = preg_replace("/&lt;/i", "<", $lttitle);
                        $lttitle = preg_replace("/&quot;/i", "\"", $lttitle);
                        $lttitle = preg_replace("/&amp;/i", "&", $lttitle);

                  //
                  // Filter topic_title if not allowed to read
                  //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        if ($auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
                        {
                           $seo_topic_name = $lttitle;
                           // append first 25 characters of topic title to last topic data
                           $lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;

                           $last_post .= $lang_in . '&nbsp;' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
                            }
                        // www.phpBB-SEO.com SEO TOOLKIT END

                        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? $lang['by'] . '&nbsp;' . ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $lang['by'] . '&nbsp;' . '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

               //-- MOD END: Last Topic Title on Index -------------------
                        
                        $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
                     }
                     else
                     {
                        $last_post = $lang['No_Posts'];
                     }

                     if ( count($forum_moderators[$forum_id]) > 0 )
                     {
                        $l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
                        $moderator_list = implode(', ', $forum_moderators[$forum_id]);
                     }
                     else
                     {
                        $l_moderators = '&nbsp;';
                        $moderator_list = '&nbsp;';
                     }

                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                     $phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->format_url($forum_data[$j]['forum_name'], $phpbb_seo->seo_static['forum']);
                     // www.phpBB-SEO.com SEO TOOLKIT END

                     $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
                     $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

                     $template->assign_block_vars('catrow.forumrow',   array(
                        'ROW_COLOR' => '#' . $row_color,
                        'ROW_CLASS' => $row_class,
                        'FORUM_FOLDER_IMG' => $folder_image,
                                                                                                                                'FORUM_ICON_IMG' => ($icon) ? '<img src="' . $phpbb_root_path . $icon . '" alt="'.$forum_data[$j]['forum_name'].'" title="'.$forum_data[$j]['forum_name'].'" />' : '',   // Forum Icon Mod
                        'FORUM_NAME' => $forum_data[$j]['forum_name'],
                        'FORUM_DESC' => $forum_data[$j]['forum_desc'],
                        'POSTS' => $forum_data[$j]['forum_posts'],
                        'TOPICS' => $forum_data[$j]['forum_topics'],
                        'LAST_POST' => $last_post,
                        'MODERATORS' => $moderator_list,

                        'L_MODERATOR' => $l_moderators,
                        'L_FORUM_FOLDER_ALT' => $folder_alt,

                        'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
                     );
                  }
               }
            }
         }
      }
   } // for ... categories

}// if ... total_categories
else
{
   message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>

_________________
Personnellement...
Le Forum photo ll Le Blog
Revenir en haut de page
Visiter le site web de l'utilisateur
Arf
PR1
PR1


Inscrit le: 19 Jan 2007
Messages: 182

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 11:30 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

J'ai regardé et apparement la modif est bonne sur l'index donc à mon avis regarde sur les autres modifs à effectué, voir si tu ne t'es pas trompé sur d'autre fichier que l'index sinon je te file mon index si tu veux qui fonctionne mais je n'ai pas last topic title, peut être que ce dernier peut créé un petit conflit mais moi je n'en ai pas mais il ne ce trouve pas directement sur l'index de mon forum mais sur l'index de mon site.

_________________
Mes créations : voyance gratuite | tout gratuit | script php arfooo annuaire
Revenir en haut de page
Visiter le site web de l'utilisateur
Arf
PR1
PR1


Inscrit le: 19 Jan 2007
Messages: 182

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 11:34 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

Tu as quoi comme autres mods d'installés ? car il y'a bcp de modifs sur ton index

_________________
Mes créations : voyance gratuite | tout gratuit | script php arfooo annuaire
Revenir en haut de page
Visiter le site web de l'utilisateur
Personne
PR4
PR4


Inscrit le: 30 Oct 2006
Messages: 485

[mixed] MAJ 0.2.0 -> 0.2.2Posté le: Lun Fév 12, 2007 11:36 am    Sujet du message: Re: [mixed] MAJ 0.2.0 -> 0.2.2

J'ai revérifié le phpbb_seo_class.php je pense pas avoir d'erreur dedans.

ce qui est étonnant c'est que j'ai une page blanche comme si il manquait une instruction d'adresse url qq part Confused

_________________
Personnellement...
Le Forum photo ll Le Blog
Revenir en haut de page
Visiter le site web de l'utilisateur