phpBB Türkiye - phpBB3 Türkçe destek ve geliştirme

İçeriği atla

profesyonel phpBB3 hizmetleri

Sitemiz sadece phpBB 3.0 sürümüne destek vermektedir. Konu açmadan, ileti yazmadan önce lütfen site kuralları sayfamıza göz atınız.

[3.0.1] - Who Visited Last 24 hours [1.0.1B]

Re: [RC4] who visited last 24h [1.0.1B]

İleti seito 27 Eyl 2007 16:33

kardeş bu kod dışında hepsini yaptım hiçbir değişiklik olmadığı gibi

bu koduda nereye yerleştireceğimi bulamadım:(

***reklam***
En son Simuzer tarafından, 27 Eyl 2007 18:04 tarihinde değiştirildi, toplamda 1 değişiklik yapıldı.
Sebep: Reklam olarak algıladım ve reklamı sildim.
seito
kullanıcı
kullanıcı

İleti: 77
Kayıt: 20 Eyl 2007 23:25
HTML: Başlangıç
CSS: Başlangıç
PHP: Başlangıç
phpBB3: Başlangıç
Sürüm: Simuzer Premod 3.0.2

 

Re: [RC4] who visited last 24h [1.0.1B]

İleti Simuzer 27 Eyl 2007 18:03

Senin o kodla ne işin var ki ?

Konunun ilk mesajını oku diyorum :) Orda ne var aşağıdaki kodlar var, neler yapılması gerektiği...

Kod: Tümünü seç
##############################################################
## MOD Title: who visited last 24h
## MOD Author: angelside < n/a > (Sevdin Filiz) http://www.phpbbturkiye.net
## MOD Description: show who visited users today, showing how many users visited and visited dates.
## MOD Version: Beta: 1.0.1B
##
## Installation Level: Easy
## Installation Time: 3 minutes
##
## Files To Edit: 3
## -- includes/functions.php
## -- styles/prosilver/template/index_body.html
## -- language/en/common.php
##
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
## 2007-08-05 - Version 1.0.1b
## add sql_layer for sqlite
##
## 2007-08-03 - Version 1.0.0b
## fully rewrite and clean code for RC4
##
## 2007-05-29 - Version 0.3.0
## Added multi language support
##
## 2007-05-08 - Version 0.2.0
## Added date format from board config default date format...
##
## MOD History:
## 2007-04-24 - Version 0.1.0
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#

// Which timezone?
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));

#
#-----[ AFTER ADD ]------------------------------------------
#
//--- [ + ] --- who viseted last 24h ------------------------------------------
// added
//

/* ALEXIS
listeye girmesi için bir üyenin oturum kapaması gerek :S
bunu session tablosundan takip edebilir miyiz ?
*/

   $last_24 = strtotime('-1 day');

   if ($db->sql_layer === 'sqlite')
   {
      $sql = 'SELECT COUNT(user_id) as total_visits
        FROM (
          SELECT DISTINCT user_id
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
               AND user_lastvisit >=' . $last_24 .
        ')';
   }
   else
   {
      $sql = 'SELECT COUNT(DISTINCT user_id) as total_visits
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
               AND user_lastvisit >=' . $last_24;
   }
   
   $result = $db->sql_query($sql);
   $total_visits = (int) $db->sql_fetchfield('total_visits');
   $db->sql_freeresult($result);
   
   $template->assign_vars(array(
      'S_DISPLAY_LAST24H_USERLIST'   => ($total_visits) ? true : false, // if not have any visits hide complete block
      'LAST24H_WISITED_USER_COUNT'    => $total_visits,
      'WHO_WISITED_TODAY'            => $user->lang['WHO_WISITED_TODAY'],
   ));
   
   if ($total_visits)
   {
      $sql = 'SELECT user_id, username, user_type, user_colour, user_lastvisit
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE .'
               AND user_lastvisit >=' . $last_24 . '
            ORDER BY user_colour DESC';
      $result = $db->sql_query($sql);
      
      $last24h_userlist = '';
      while ( $row = $db->sql_fetchrow($result) )
      {
         // + get user info
         $username   = $row['username'];
         $user_id   = (int) $row['user_id'];
         $colour      = $row['user_colour'];

         $last24h_user      = get_username_string('username', $user_id, $username, $colour);
         $last24h_color      = get_username_string('colour', $user_id, $username, $colour);
         $last24h_profile   = get_username_string('profile', $user_id, $username, $colour);
         // + get user info
         
         $last_visit = $user->format_date($row['user_lastvisit']);
         
         $last24h_link = "<a href=\"$last24h_profile\"><span style=\"color:$last24h_color;\"><strong>$last24h_user</strong></span></a>  ($last_visit)";
         $last24h_userlist = ($last24h_userlist) ? ', ' . $last24h_link : $last24h_link;

         $template->assign_block_vars('last24h', array(
            'LAST24H_USERLIST'    => $last24h_userlist,
         ));
      }
      $db->sql_freeresult($result);
   }
//
//--- [ - ] --- who viseted last 24h ------------------------------------------

#
#-----[ OPEN ]------------------------------------------
#

styles/prosilver/template/index_body.html

#
#-----[ FIND ]------------------------------------------
#

<!-- IF S_DISPLAY_ONLINE_LIST -->

#
#-----[ BEFORE, ADD ]------------------------------------------
#

<!-- IF S_DISPLAY_LAST24H_USERLIST -->
   <h3>{WHO_WISITED_TODAY} : {LAST24H_WISITED_USER_COUNT}</h3>
   <!-- BEGIN last24h -->{last24h.LAST24H_USERLIST}<!-- END last24h -->
<!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
#

language/en/common.php

#
#-----[ FIND ]------------------------------------------
# page end

));

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

   'WHO_WISITED_TODAY' => 'Who wisited last 24h',

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Gelişmiş phpBB3 Premod Sistemi | Simuzer Premod
http://www.simuzer.com
Simuzer
kullanıcı
kullanıcı

Kullanıcı avatarı

İleti: 1043
Kayıt: 28 Mar 2007 20:19
HTML: İyi
CSS: Orta
PHP: Başlangıç
phpBB3: Orta
Sürüm: 3.0.2

Re: [RC4] who visited last 24h [1.0.1B]

İleti Dinçer 29 Eyl 2007 12:56

Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4158: Undefined index: WHO_WISITED_TODAY
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3712)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4289: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3712)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4290: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3712)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4291: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3712)


Bu header info medifiyesi probleminden iyice bezginlik geldi. Ne yapacak olsam bu çıkıyor. Ne yapmalıyım sizce arkadaşlar?
Dinçer
kullanıcı
kullanıcı

İleti: 141
Kayıt: 13 Nis 2007 20:26
İsim: Dinçer
HTML: Çok iyi
CSS: Başlangıç
PHP: Başlangıç
phpBB3: Orta
Sürüm: phpBB3

Re: [RC4] who visited last 24h [1.0.1B]

İleti Simuzer 29 Eyl 2007 13:02

language/tr/common.php dosyasında gerekli değişikliği yapmamışsın.
Gelişmiş phpBB3 Premod Sistemi | Simuzer Premod
http://www.simuzer.com
Simuzer
kullanıcı
kullanıcı

Kullanıcı avatarı

İleti: 1043
Kayıt: 28 Mar 2007 20:19
HTML: İyi
CSS: Orta
PHP: Başlangıç
phpBB3: Orta
Sürüm: 3.0.2

Re: [RC4] who visited last 24h [1.0.1B]

İleti seito 29 Eyl 2007 20:17

kardeş onu yapınca forum tamamen açılmıyor beyaz bir sayfa geliyor
seito
kullanıcı
kullanıcı

İleti: 77
Kayıt: 20 Eyl 2007 23:25
HTML: Başlangıç
CSS: Başlangıç
PHP: Başlangıç
phpBB3: Başlangıç
Sürüm: Simuzer Premod 3.0.2

Re: [RC4] who visited last 24h [1.0.1B]

İleti Simuzer 29 Eyl 2007 21:14

Dil dosyasında eklenilecek olanı, bundan önce ekle..

Kod: Tümünü seç
));

?>
Gelişmiş phpBB3 Premod Sistemi | Simuzer Premod
http://www.simuzer.com
Simuzer
kullanıcı
kullanıcı

Kullanıcı avatarı

İleti: 1043
Kayıt: 28 Mar 2007 20:19
HTML: İyi
CSS: Orta
PHP: Başlangıç
phpBB3: Orta
Sürüm: 3.0.2

Re: [RC4] who visited last 24h [1.0.1B]

İleti sabri ünal 29 Eyl 2007 23:37

aaaa, biri benim forumdaki hatayı da çözdü :) inanın ben yakusha denemelerinde beyaz ekrana takılmıştım, demek ki kaynağı bu hata imiş :) sağolun hatayı bulduğunuz içni.
sabri ünal
kullanıcı
kullanıcı

İleti: 577
Kayıt: 06 Nis 2007 11:08
İsim: sabri ünal
HTML: İyi
CSS: Başlangıç
PHP: Başlangıç
phpBB3: Başlangıç
Sürüm: phpbb3 CVS

Re: [RC4] who visited last 24h [1.0.1B]

İleti Simuzer 30 Eyl 2007 00:22

Alemsin yav :mrgreen:
Gelişmiş phpBB3 Premod Sistemi | Simuzer Premod
http://www.simuzer.com
Simuzer
kullanıcı
kullanıcı

Kullanıcı avatarı

İleti: 1043
Kayıt: 28 Mar 2007 20:19
HTML: İyi
CSS: Orta
PHP: Başlangıç
phpBB3: Orta
Sürüm: 3.0.2

Re: [RC4] who visited last 24h [1.0.1B]

İleti Mu®tazA 04 Ekm 2007 21:29

peki bu isimlerin yanında yazan tarihleri nasıl kadırabilirim ?



deneme (18:08 04-Ekim-2007), Mu®tazA (18:52 04-Ekim-2007), TheDjKaaNuS (19:27 04-Ekim-2007), GoLpA (18:59 04-Ekim-2007)


gibi
Mu®tazA
kullanıcı
kullanıcı

İleti: 16
Kayıt: 28 May 2007 18:48
HTML: Orta
CSS: Başlangıç
PHP: Başlangıç
phpBB3: Orta
Sürüm: phpBB3 gold

Re: [RC4] who visited last 24h [1.0.1B]

İleti Simuzer 04 Ekm 2007 23:23


includes/functions.php

BUL

Kod: Tümünü seç
$last24h_link = "<a href=\"$last24h_profile\"><span style=\"color:$last24h_color;\"><strong>$last24h_user</strong></span></a>  ($last_visit)";


BUNUNLA DEĞİŞTİR

Kod: Tümünü seç
$last24h_link = "<a href=\"$last24h_profile\"><span style=\"color:$last24h_color;\"><strong>$last24h_user</strong></span></a>";
Gelişmiş phpBB3 Premod Sistemi | Simuzer Premod
http://www.simuzer.com
Simuzer
kullanıcı
kullanıcı

Kullanıcı avatarı

İleti: 1043
Kayıt: 28 Mar 2007 20:19
HTML: İyi
CSS: Orta
PHP: Başlangıç
phpBB3: Orta
Sürüm: 3.0.2

ÖncekiSonraki

Eklenti Tanıtımları, Duyurular, Güncellemeler


Kimler çevrimiçi

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