Forum orta block

Portal eklentileri ile ilgili konular.

Forum orta block

İleti AlbayCo 13.11.2006, 23:05

Merhaba arkadaşlar www.phpbbdestek.com sitesindeki kurulmus Canverportal'i indirdim ve içindeki recent block'u phpbb İm portal'a kurmak istedim ama çalışmıyor bu konuda yardımcı olurmusunuz.
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09

İleti

Matmazella
13.11.2006, 23:43

phpbb3 portal, im portal ile %100 uyumsuzdur.
Kullanıcı avatarı
Matmazella
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08

İleti AlbayCo 13.11.2006, 23:46

ben dosyaları phpbb portalına göre uyarladım ama yine çalısmadı sağ blocklar kayboluyor
teşekkürler yinede biraz daha çalışayım üzerinde inşallah çözerim..
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09

İleti

Matmazella
14.11.2006, 00:07

Yan yana 3 kutu olan ortadaki "son konular" dan bahsediyorsan, im portal için yeni bir blok yaz.
Kullanıcı avatarı
Matmazella
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08

İleti AlbayCo 14.11.2006, 00:46

Resim

Onu halettim şimdi çalışıyor ama yapmak istediğim
Örnek birinci tabloda Forum [id] "1" deki son konular ikinci tabloda Forum [id] "2" diye böyle 6 tabloya yaymak istiyorum
Bu konud ayardım edebilirmisiniz rica etsem.
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09

İleti AlbayCo 15.11.2006, 00:37

Arkadaşlar bu konu hakkında bana yardım edebilirmisiniz
6 Tablodaki 1. tabloya istediğim herhangi bir foruma yazılan son mesajları nasal adapte edebilirim.
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09

Cvp: Forum orta block

İleti

Matmazella
15.11.2006, 01:17

Kod: Tümünü seç
$CFG[num_recent_topic]   = '10';
$CFG[forum_recent_topic] = '2'; // forum id

$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
   FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
   WHERE t.forum_id = $CFG[forum_recent_topic]
      AND t.topic_status <> 2
      AND p.post_id = t.topic_last_post_id
      AND p.poster_id = u.user_id
   ORDER BY p.post_id DESC
   LIMIT " . $CFG[num_recent_topic];

........


WHERE t.forum_id = $CFG[forum_recent_topic]
Kullanıcı avatarı
Matmazella
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08

İleti AlbayCo 15.11.2006, 01:37

Çok teşekkür ederim
Ellerinize sağlık
sağolun..
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09

Cvp: Forum orta block

İleti AlbayCo 15.11.2006, 12:55

Rahatsız ettiğim için özür dilerim.
Gereksiz mesajlar yazdığımın farkındayım lakin öyle bir sıkıntıdayım ki buna mecbur kaldım.
İki gündür üstünde çalıştığım sizlerin belki 2 dakikanızı almaycak blocktan artık bunaldım.
Uygun görürseniz aşağıda yaptığım blocka bir bakarak nerde hata yaptığımı söylerseniz beni bu dertten kurtarmış olursunuz.
Şimdiden teşekkürler.

Php page
Kod: Tümünü seç
<?php
/***************************************************************************
*                        blocks_imp_recents_topic.php
*                            -------------------
*   begin                : Saturday, March 20, 2004
*   copyright            : (C) 2004 masterdavid - Ronald John David
*   website              : http://www.integramod.com
*   email                : webmaster@integramod.com
*
*   note: removing the original copyright is illegal even you have modified
*         the code.  Just append yours if you have modified it.
***************************************************************************/

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

if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}

if(!function_exists(imp_recent_topics_block_func))
{
   function imp_recent_topics_block_func()
   {
      global $user, $template, $portal_config, $userdata, $board_config, $db, $phpEx;

      $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
      if (!$result1 = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
      }
      $forum_data = array();
      while( $row1 = $db->sql_fetchrow($result1) )
      {
         $forum_data[] = $row1;
      }

      $is_auth_ary = array();
      $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);

      if( $portal_config['md_except_forum_id'] == '' )
      {
         $except_forum_id = '\'start\'';
      }
      else
      {
         $except_forum_id = $portal_config['md_except_forum_id'];
      }

      for ($i = 0; $i < count($forum_data); $i++)
      {
         if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
         {
            if ($except_forum_id == '\'start\'')
            {
               $except_forum_id = $forum_data[$i]['forum_id'];
            }
            else
            {
               $except_forum_id .= ',' . $forum_data[$i]['forum_id'];
            }
         }
      }

      if ($portal_config['md_approve_mod_installed'])
      {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
            FROM " . TOPICS_TABLE . " AS t LEFT OUTER JOIN " . APPROVE_POSTS_TABLE . " AS a ON (t.topic_first_post_id = a.post_id), " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
            WHERE t.forum_id NOT IN (" . $except_forum_id . ")
               AND t.topic_status <> 2
               AND p.post_id = t.topic_last_post_id
               AND p.poster_id = u.user_id
               AND a.post_id is NULL
            ORDER BY p.post_id DESC
            LIMIT " . $portal_config['md_num_recent_topics'];
      }
      else
      {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
            FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
            WHERE t.forum_id NOT IN (" . $except_forum_id . ")
               AND t.topic_status <> 2
               AND p.post_id = t.topic_last_post_id
               AND p.poster_id = u.user_id
            ORDER BY p.post_id DESC
            LIMIT " . $portal_config['md_num_recent_topics'];
      }

      if (!$result1 = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
      }
      $number_recent_topics = $db->sql_numrows($result1);
      $recent_topic_row = array();
      while ($row1 = $db->sql_fetchrow($result1))
      {
         $recent_topic_row[] = $row1;
      }

      if ($portal_config['md_recent_topics_style'])
      {
         $style_row = 'scroll';
      }
      else
      {
         $style_row = 'static';
      }

      $template->assign_block_vars($style_row,"");

      for ($i = 0; $i < $number_recent_topics; $i++)
      {
         $topic_author = ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $recent_topic_row[$i]['user_id']) . '" class="gensmall">' : '';
         $topic_author .= ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? $recent_topic_row[$i]['username'] : ( ( $recent_topic_row[$i]['post_username'] != '' ) ? $recent_topic_row[$i]['post_username'] : $user->lang('Guest') );
         $topic_author .= ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

         $template->assign_block_vars($style_row . '.recent_topic_row', array(
            'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
            'L_TITLE' => $recent_topic_row[$i]['topic_title'],
            'POSTER' => $topic_author,
            'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
            )
         );
      }
//
// Recent Forum 1
//
      $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
      if (!$result1 = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
      }
      $forum_data = array();
      while( $row1 = $db->sql_fetchrow($result1) )
      {
         $forum_data[] = $row1;
      }

      $is_auth_ary = array();
      $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);

      if( $portal_config['md_siir_forum_id'] == '' )
      {
         $siir_forum_id = '35'';
      }
      else
      {
         $siir_forum_id = $portal_config['md_siir_forum_id'];
      }

      for ($i = 0; $i < count($forum_data); $i++)
      {
         if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
         {
            if ($siir_forum_id == '\'start\'')
            {
               $siir_forum_id = $forum_data[$i]['forum_id'];
            }
            else
            {
               $siir_forum_id .= ',' . $forum_data[$i]['forum_id'];
            }
         }
      }

      if ($portal_config['md_siir_approve_mod_installed'])
      {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
            FROM " . TOPICS_TABLE . " AS t LEFT OUTER JOIN " . APPROVE_POSTS_TABLE . " AS a ON (t.topic_first_post_id = a.post_id), " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
            WHERE t.forum_id NOT IN (" . $siir_forum_id . ")
               AND t.topic_status <> 2
               AND p.post_id = t.topic_last_post_id
               AND p.poster_id = u.user_id
               AND a.post_id is NULL
            ORDER BY p.post_id DESC
            LIMIT " . $portal_config['md_num_siir_recent_topics'];
      }
      else
      {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
            FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
            WHERE t.forum_id NOT IN (" . $siir_forum_id . ")
               AND t.topic_status <> 2
               AND p.post_id = t.topic_last_post_id
               AND p.poster_id = u.user_id
            ORDER BY p.post_id DESC
            LIMIT " . $portal_config['md_num_siir_recent_topics'];
      }

      if (!$result1 = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
      }
      $number_recent_topics = $db->sql_numrows($result1);
      $recent_topic_row = array();
      while ($row1 = $db->sql_fetchrow($result1))
      {
         $recent_topic_row[] = $row1;
      }

      if ($portal_config['md_recent_topics_style'])
      {
         $style_row = 'scroll';
      }
      else
      {
         $style_row = 'static';
      }

      $template->assign_block_vars($style_row,"");

      for ($i = 0; $i < $number_recent_topics; $i++)
      {
         $topic_author = ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $recent_topic_row[$i]['user_id']) . '" class="gensmall">' : '';
         $topic_author .= ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? $recent_topic_row[$i]['username'] : ( ( $recent_topic_row[$i]['post_username'] != '' ) ? $recent_topic_row[$i]['post_username'] : $user->lang('Guest') );
         $topic_author .= ( $recent_topic_row[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

         $template->assign_block_vars($style_row . '.siir_recent_topic_row', array(
            'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
            'L_TITLE' => $recent_topic_row[$i]['topic_title'],
            'POSTER' => $topic_author,
            'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
            )
         );
      }
   }
}

imp_recent_topics_block_func();

?>



Tpl Page
Kod: Tümünü seç
<table class="tablebg" cellspacing="1" width="100%">
<tr>
</tr>

<tr>
   <td class="row1"><strong>Son Duyurular</strong></td>
   <td class="row1"><strong>Son Popüler Konular</strong></td>
   <td class="row1"><strong>Son Konular</strong></td>
   </tr>
<tr>
   <td class="row1" width="33%" valign="top">
<!-- BEGIN scroll -->
<script language="javascript" type="text/javascript" src="./includes/js_portalMarquee.js"></script>
<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">
   <div id="vmarquee" style="position: absolute; width: 100%;">
      <!-- BEGIN recent_topic_row -->
      &raquo; <a href="{scroll.recent_topic_row.U_TITLE}" class="gensmall"><b>{scroll.recent_topic_row.L_TITLE}</b></a>&nbsp; &rsaquo; Yazar : {scroll.recent_topic_row.POSTER} <br />
      &nbsp; &rsaquo; by {scroll.recent_topic_row.POSTER} on {scroll.recent_topic_row.S_POSTTIME}<br /><hr />
      <!-- END recent_topic_row -->
   </div>
</div>
<!-- END scroll -->
<!-- BEGIN static -->
<!-- BEGIN recent_topic_row -->
&raquo; <a href="{static.recent_topic_row.U_TITLE}" class="gensmall"><b>{static.recent_topic_row.L_TITLE}</b></a>&nbsp; &rsaquo; Yazar : {static.recent_topic_row.POSTER} <br /><hr />
<!-- END recent_topic_row -->
<!-- END static -->
   </td>

   <td class="row1" width="33%" valign="top">
<!-- BEGIN scroll -->
<script language="javascript" type="text/javascript" src="./includes/js_portalMarquee.js"></script>
<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">
   <div id="vmarquee" style="position: absolute; width: 100%;">
      <!-- BEGIN siir_recent_topic_row -->
      &raquo; <a href="{scroll.siir_recent_topic_row.U_TITLE}" class="gensmall"><b>{scroll.siir_recent_topic_row.L_TITLE}</b></a>&nbsp; &rsaquo; Yazar : {scroll.siir_recent_topic_row.POSTER} <br />
      &nbsp; &rsaquo; by {scroll.siir_recent_topic_row.POSTER} on {scroll.siir_recent_topic_row.S_POSTTIME}<br /><hr />
      <!-- END siir_recent_topic_row -->
   </div>
</div>
<!-- END scroll -->
<!-- BEGIN static -->
<!-- BEGIN siir_recent_topic_row -->
&raquo; <a href="{static.siir_recent_topic_row.U_TITLE}" class="gensmall"><b>{static.siir_recent_topic_row.L_TITLE}</b></a>&nbsp; &rsaquo; Yazar : {static.siir_recent_topic_row.POSTER} <br /><hr />
<!-- END siir_recent_topic_row -->
<!-- END static -->
   </td>
   <td class="row1" width="33%" valign="top">
      <!-- BEGIN latest_topics -->
         <a href="{latest_topics.U_VIEW_TOPIC}">{latest_topics.TITLE}</a><br />
      <!-- END latest_topics 1 -->
   </td>
</tr>
<br />
   <tr>
   <td class="row1"><strong>Son Duyurular</strong></td>
   <td class="row1"><strong>Son Popüler Konular</strong></td>
   <td class="row1"><strong>Son Konular</strong></td>
   </tr>
   <td class="row1" width="33%" valign="top">
      <!-- BEGIN latest_topics -->
         <a href="{latest_topics.U_VIEW_TOPIC}">{latest_topics.TITLE}</a><br />
      <!-- END latest_topics 1 -->
   </td>
      <td class="row1" width="33%" valign="top">
      <!-- BEGIN latest_topics -->
         <a href="{latest_topics.U_VIEW_TOPIC}">{latest_topics.TITLE}</a><br />
      <!-- END latest_topics 1 -->
   </td>
      <td class="row1" width="33%" valign="top">
      <!-- BEGIN latest_topics -->
         <a href="{latest_topics.U_VIEW_TOPIC}">{latest_topics.TITLE}</a><br />
      <!-- END latest_topics 1 -->
   </td>
</table>
<br />



cfg page

Kod: Tümünü seç
<?php
/***************************************************************************
*                       blocks_imp_recent_topics.cfg
*                            -------------------
*   begin                : Tuesday, May 25, 2004
*   copyright            : (C) 2004 masterdavid - Ronald John David
*   website        : http://www.integramod.com
*   email                : webmaster@integramod.com
*
*   note: removing the original copyright is illegal even you have modified
*         the code.  Just append yours if you have modified it.
***************************************************************************/

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

if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}

$block_count_variables = 3;

// array( <Field label>, <Field Info>, <Config Name>, <Options>, <Field Values>, <Control Type>, <Block>, <Default Value>);

$block_variables = array(
   array('Number of recent topics', 'number of topics displayed', 'md_num_recent_topics', '', '', '1', 'recent_topics', '10'),
   array('Approve MOD installed?', 'tick if Approve MOD is installed', 'md_approve_mod_installed', '', '', '4', 'recent_topics', '0'),
   array('Recent Topics Style', 'choose static display or scrolling display', 'md_recent_topics_style', 'Scroll,Static', '1,0', '3', 'recent_topics', '1')
   array('Siir Number of recent topics', 'number of topics displayed', 'md_num_siir_recent_topics', '', '', '1', 'siir_recent_topics', '10'),
   array('Siir Approve MOD installed?', 'tick if Approve MOD is installed', 'md_siir_approve_mod_installed', '', '', '4', 'siir_recent_topics', '0'),
   array('Siir Recent Topics Style', 'choose static display or scrolling display', 'md_siir_recent_topics_style', 'Scroll,Static', '1,0', '3', 'siir_recent_topics', '1')
   );
?>


Tekrar özür dilerim..
[code]
AlbayCo
Üye
Üye
 
İleti: 17
Kayıt: 20.12.2005, 19:09


Portal



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir