WordPress Türkiye Forumları

WordPress Türkiye Forumları » Eklentiler

WP-OnlineCounter türkçeleştirme

(12 mesaj(lar))
  • 1 yıl önce mavinefes tarafından başlatıldı
  • gevv tarafından son cevap
  • Bu konu Destek sorusu değil

Etiketler:

  1. ben bu eklentiyi türkçe indirdim ve çoktandır kullanıyorum ve bi türlü türkçeleştiremedim konu hakkında yardıma ihtiaycaım var şimdiden teşekkür ederim herkese iyi bloglar

    1 yıl önce #
  2. WP-UserOnline 2.10 türkçeleştirmişdim ben isterseniz.. buraya yükledim şimdi bakabilirsiniz. eksiklikleri yada yanlışlıkları olabilir ama kullanıcıya gösteren taraf güzel :) eklenti gamerzindir benim wediğimin

    1 yıl önce #
  3. bende zaten yuklu bende yuklu olanı nasıl türkçe yapacagımı sormuştum

    1 yıl önce #
  4. bu dosyaları üzerine yüklemenizi isteyecekdim.

    1 yıl önce #
  5. ben buradan dedikleri gibi yaptım koduda ekledim ama halen ingilizce ana sayfada cıkan yerleri nereden türkçeleşireceğiz

    1 yıl önce #
  6. çevirmek istediğin isimleri notepat++ bulup kur ve bu dosyaları onun ile editle.

    1 yıl önce #
  7. onları zaten bi bulsam ben yapacağımı biliyorumda gözükmüyorlar o kadarını ben de biliyorum

    1 yıl önce #
  8. arkadaşım kod zaten türkçe sen bence tabloları sil dbden eski değerleride aklında tut onlarıda koyarsın

    1 yıl önce #
  9. aşagıdakı kodun neresine değiştiricem

    <?php
    /*
    Plugin Name: WP-OnlineCounter (tr)
    Version: 0.11
    Plugin URI: http://faked.org/blog/wp-onlinecounter/
    Description: Online and Total visitors counter. (Anlık ve toplam ziyaretçi sayacı.) Türkçe: www.dmry.net
    Author: Jan Grewe
    Author URI: http://faked.org
    */

    /*

    == Installation ==

    add this to your template where you want the counter to show up:
    ---
    <?php if(function_exists(wp_onlinecounter)) { wp_onlinecounter(); } ?>
    ---
    if you want to include the counter on a page but DON'T want to show
    the output put \"hide\" into the function's brackets.

    == ChangeLog ==

    v0.11: Added a page (Dashboard -> Manage) to show the last URIs visited by
    all online visitors, or all URIs in this session for a specific visitor.
    Moved the plugin's Settings page (Dashboard -> Options)
    Added a new column for URIs to the table (deactivate and re-activate
    the plugin to apply the changes!)

    v0.10: Added sidebar-compatible structure (list and title) and more options
    to configure the output.
    Added a little script that allows WP-OnlineCounter to be used as a widget,
    make sure you activate it, too!

    v0.9a: Fixed some typos which created unneeded option fields.
    Added some code to send a trackback to my site if you like the plugin.

    v0.9: Fixed the \"Duplicate key\" error, Primary key is now \"timestamp\" and \"ip\".
    Added an option to show currently online visitors only to registered users.
    Added options to set the labels from the dashboard.

    v0.8: Moved all configuration options to the \"Plugins\" page in the dashboard.

    v0.7a: Fixed a bug which stopped the total count from increasing.

    v0.7: Added a settings page to the dashboard, you can now set the count
    of maximum concurrent and total visitors to any value.

    v0.6: Added automatic table creation on plugin activation.

    v0.5: Thanks to Arno Simon (http://www.arno-simon.de/) for replacing
    mysql-handling with $wpdb-handling.
    Thanks to Marcus Kimpenhaus (http://blog.marcus-kimpenhaus.de/) for
    adding detection of the user's IP if he uses a non-anon proxy.

    v0.4: Added a config option to change the table name ($wpoc_tablename).

    v0.3a: Thanks to Lance (http://www.desire2design.com/) for pointing out an error
    in the documentation regarding hiding the counter.

    v.03: Thanks to Ara Pehlivanian (http://arapehlivanian.com/) for adding a
    parameter to hide the counter on certain pages.

    v0.2: Thanks to Tom Köhler (http://www.zappelfillip.de/) for adding the ability
    to exclude users with specific user-levels from being counted and keeping
    record of the highest concurrent visitor count so far.

    v0.1: initial release

    */

    //set the table name for the counter in your wordpress database
    //you normally should not have to use this, don't come crying if you mess up!
    $wpoc_tablename = 'onlinecounter';

    function wp_onlinecounter($visibility = \"show\") {

    global $wpdb;
    global $table_prefix;
    global $wpoc_tablename;
    global $user_level;

    $ignore_level = get_option('wpoc_ignore_level');
    $timeout = get_option('wpoc_timeout');

    if(!isset($wpdb->wp_onlinecounter)){
    $wpdb->wp_onlinecounter = $table_prefix.$wpoc_tablename; }

    //get user's IP if he uses a non-anon proxy
    function get_user_ipaddress() {
    if(empty($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {
    $ip_address = $_SERVER[\"REMOTE_ADDR\"];
    }else{
    $ip_address = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];
    }
    if(strpos($ip_address, ',') !== false) {
    $ip_address = explode(',', $ip_address);
    $ip_address = $ip_address[0];
    }
    return $ip_address;
    }
    $user_ip = get_user_ipaddress();

    //get the time
    $timestamp = time();
    $timeout = $timestamp-$timeout;

    //grab current total count
    $count = $wpdb->get_var(\"SELECT count FROM $wpdb->wp_onlinecounter ORDER BY count DESC LIMIT 1\");

    //get timestamp from last visit
    $visitor = $wpdb->get_var(\"SELECT timestamp FROM $wpdb->wp_onlinecounter WHERE ip = '$user_ip' ORDER BY timestamp DESC LIMIT 1\");
    if(empty($visitor)) $visitor = 0;

    //get max. online visitors
    $maxon = $wpdb->get_var(\"SELECT maxon FROM $wpdb->wp_onlinecounter ORDER BY maxon DESC LIMIT 1\");
    $maxontime = $wpdb->get_var(\"SELECT maxontime FROM $wpdb->wp_onlinecounter ORDER BY maxon DESC LIMIT 1\");

    //increase count only if visitor is under $ignore_level
    //get_currentuserinfo();
    if(($visitor < $timeout) && ($user_level < $ignore_level)) {
    //increase count
    $count++;
    }

    //insert the values
    $insert = $wpdb->query(\"INSERT INTO $wpdb->wp_onlinecounter VALUES ('$timestamp', '$user_ip', '$count', '0', '0', '$_SERVER[REQUEST_URI]')\");

    //delete values when they leave
    $delete = $wpdb->query(\"DELETE FROM $wpdb->wp_onlinecounter WHERE timestamp < $timeout\");

    //grab the results
    $online = $wpdb->query(\"SELECT DISTINCT ip FROM $wpdb->wp_onlinecounter\");

    //decrease displayed online-count if user-level is not lower then $ignore_level
    if ($user_level >= $ignore_level) --$online;

    if ($online > $maxon) {
    $maxon = $online;
    $maxontime = $timestamp;
    }

    $update = $wpdb->query(\"UPDATE $wpdb->wp_onlinecounter SET maxon='$maxon', maxontime='$maxontime' WHERE timestamp='$timestamp'\");

    //output the results
    if($visibility == 'show') {
    $wpoc_header = get_option('wpoc_header');
    $wpoc_footer = get_option('wpoc_footer');
    $wpoc_show_current = get_option('wpoc_show_current');
    $wpoc_show_current_users_only = get_option('wpoc_show_current_users_only');
    $wpoc_show_maxon = get_option('wpoc_show_maxon');
    $wpoc_show_total = get_option('wpoc_show_total');
    $wpoc_label_current = get_option('wpoc_label_current');
    $wpoc_label_maxon = get_option('wpoc_label_maxon');
    $wpoc_label_total = get_option('wpoc_label_total');
    echo $wpoc_header;
    if ($wpoc_show_current == 'on')
    if ($wpoc_show_current_users_only !== 'on' || $user_level > 0)
    echo \"

  10. $online $wpoc_label_current
  11. \";
    if ($wpoc_show_maxon == 'on')
    echo \"
  12. $maxon $wpoc_label_maxon
  13. \";
    if ($wpoc_show_total == 'on')
    echo \"
  14. $count $wpoc_label_total
  15. \";
    echo $wpoc_footer;
    }
    }

    //functions to add a page to the options in the dashboard
    add_action('admin_menu', 'wpoc_add_page');
    function wpoc_add_page() {
    add_submenu_page('options-general.php', 'WP-OnlineCounter', 'WP-OnlineCounter', 10, __FILE__, 'wpoc_options_page');
    add_submenu_page('edit.php', 'WP-OnlineCounter', 'WP-OnlineCounter', 10, __FILE__, 'wpoc_counter_page');
    }

    function wpoc_options_page() {
    global $wpdb;
    global $wpoc_tablename;
    global $table_prefix;
    global $max;
    global $total;

    if(!isset($wpdb->wp_onlinecounter)){
    $wpdb->wp_onlinecounter = $table_prefix.$wpoc_tablename; }

    if(isset($_POST['submitted'])){
    $wpdb->query(\"UPDATE $wpdb->wp_onlinecounter SET maxon='$_POST[wpoc_maxon]'\");
    $wpdb->query(\"UPDATE $wpdb->wp_onlinecounter SET count='$_POST[wpoc_total]'\");
    update_option('wpoc_header', $_POST['wpoc_header']);
    update_option('wpoc_footer', $_POST['wpoc_footer']);
    update_option('wpoc_show_current', $_POST['wpoc_show_current']);
    update_option('wpoc_show_current_users_only', $_POST['wpoc_show_current_users_only']);
    update_option('wpoc_show_maxon', $_POST['wpoc_show_maxon']);
    update_option('wpoc_show_total', $_POST['wpoc_show_total']);
    update_option('wpoc_ignore_level', $_POST['wpoc_ignore_level']);
    update_option('wpoc_timeout', $_POST['wpoc_timeout']);
    update_option('wpoc_label_current', $_POST['wpoc_label_current']);
    update_option('wpoc_label_maxon', $_POST['wpoc_label_maxon']);
    update_option('wpoc_label_total', $_POST['wpoc_label_total']);

    if ($_POST['wpoc_trackback'] == \"sent\") {
    $trackback_body = \"at my site \\"\".get_option(blogname).\"\\"\";
    $last_post = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts ORDER BY ID DESC LIMIT 1\");
    trackback(\"http://faked.org/blog/wp-onlinecounter/trackback/\", \"I installed your plugin\", $trackback_body, $last_post);
    update_option('wpoc_trackback', $_POST['wpoc_trackback']);
    }
    ?>

    <p>Ayarlar güncellendi.</p>

    <?
    }

    $wpoc_max = $wpdb->get_var(\"SELECT maxon FROM $wpdb->wp_onlinecounter ORDER BY maxon DESC LIMIT 1\");
    $wpoc_total = $wpdb->get_var(\"SELECT count FROM $wpdb->wp_onlinecounter ORDER BY count DESC LIMIT 1\");
    $wpoc_header = get_option('wpoc_header');
    $wpoc_footer = get_option('wpoc_footer');
    $wpoc_show_current = get_option('wpoc_show_current');
    $wpoc_show_current_users_only = get_option('wpoc_show_current_users_only');
    $wpoc_show_maxon = get_option('wpoc_show_maxon');
    $wpoc_show_total = get_option('wpoc_show_total');
    $wpoc_ignore_level = get_option('wpoc_ignore_level');
    $wpoc_timeout = get_option('wpoc_timeout');
    $wpoc_label_current = get_option('wpoc_label_current');
    $wpoc_label_maxon = get_option('wpoc_label_maxon');
    $wpoc_label_total = get_option('wpoc_label_total');
    $wpoc_trackback = get_option('wpoc_trackback');

    ?>


    <h2>WP-OnlineCounter Ayarları</h2>
    <form name=\"wpoc-settings\" action=\"\" method=\"post\">
    <table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\" summary=\"WP-OnlineCounter Settings\">
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_structure\">Yapı:</label></th>
    <td>
    <input name=\"wpoc_header\" type=\"text\" size=\"25\" value=\"<?php echo $wpoc_header; ?>\"/> Üst kısım için (varsayılan:
      )
      <input name=\"wpoc_footer\" type=\"text\" size=\"25\" value=\"<?php echo $wpoc_footer; ?>\"/> Alt kısım için (varsayılan:
    )
    (Sayaç
  16. ) kodlarını kendi ekleyecektir.
    (<b>K2:</b> Header =
      , Footer =
    )
    (<b>Widget:</b> Header =
  17. <h2>Site Sayaç</h2>
      , Footer =
  18. )
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_labels\">Etiketler:</label></th>
    <td>
    <input name=\"wpoc_label_current\" type=\"text\" size=\"20\" value=\"<?php echo $wpoc_label_current; ?>\"/> (Varsayılan: Şu anki çevrimiçi kişi sayısı)
    <input name=\"wpoc_label_maxon\" type=\"text\" size=\"20\" value=\"<?php echo $wpoc_label_maxon; ?>\"/> (Varsayılan: Aynı anda maksimum çevrimiçi kişi sayısı)
    <input name=\"wpoc_label_total\" type=\"text\" size=\"20\" value=\"<?php echo $wpoc_label_total; ?>\"/> (Varsayılan: Toplam ziyaretçi)
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_show_current\">Görüntüle:</label></th>
    <td>
    <input name=\"wpoc_show_current\" type=\"checkbox\" value=\"on\" <?php if($wpoc_show_current == 'on') { echo \"checked=\\"checked\\"\"; } ?> /> \"<?php echo $wpoc_label_current; ?>\" satırını
    <input name=\"wpoc_show_maxon\" type=\"checkbox\" value=\"on\" <?php if($wpoc_show_maxon == 'on') { echo \"checked=\\"checked\\"\"; } ?> /> \"<?php echo $wpoc_label_maxon; ?>\" satırını
    <input name=\"wpoc_show_total\" type=\"checkbox\" value=\"on\" <?php if($wpoc_show_total == 'on') { echo \"checked=\\"checked\\"\"; } ?> /> \"<?php echo $wpoc_label_total; ?>\" satırını
    <input name=\"wpoc_show_current_users_only\" type=\"checkbox\" value=\"on\" <?php if($wpoc_show_current_users_only == 'on') { echo \"checked=\\"checked\\"\"; } ?> /> \"<?php echo $wpoc_label_current; ?>\" 'nı sadece kayıtlı üyelere göster.
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_timeout\">Zamanaşımı:</label></th>
    <td><input name=\"wpoc_timeout\" type=\"text\" size=\"10\" value=\"<?php echo $wpoc_timeout; ?>\"/> saniye

    Kullanıcını ziyaretinin zaman aşımına uğrama süresi.
    (varsayılan: 600 = 10 dakika)
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_ignore_level\">Kayıt dışı seviye:</label></th>
    <td><input name=\"wpoc_ignore_level\" type=\"text\" size=\"10\" value=\"<?php echo $wpoc_ignore_level; ?>\"/>

    Ziyaretleri sayılmayacak kullanıcı seviyesini giriniz.
    Herkesi saymak için 10 dışında birşey girmeyin.
    (varsayılan: 10 = Yönetici)
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_total\">Toplam ziyaretçi:</label></th>
    <td><input name=\"wpoc_total\" type=\"text\" size=\"10\" value=\"<?php echo $wpoc_total; ?>\"/>

    Toplam ziyaretçi sayınızı giriniz.
    </td>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_maxon\">Aynı anda çevirimiçi maksimum ziyaretçi:</label></th>
    <td><input name=\"wpoc_maxon\" type=\"text\" size=\"10\" value=\"<?php echo $wpoc_max; ?>\"/>

    Aynı anda çevrimiçi olan maksimum ziyaretçi sayınızı giriniz.
    </td>
    </tr>
    <? if ($wpoc_trackback !== 'sent') { ?>
    <tr valign=\"top\">
    <th scope=\"row\" width=\"33%\"><label for=\"wpoc_trackback\">Geri izleme yolla:</label></th>
    <td><input name=\"wpoc_trackback\" type=\"checkbox\" value=\"sent\" <?php if($wpoc_trackback == 'sent') { echo \"disabled=\\"disabled\\"\"; } ?> />

    Eklentiyi kurduğuma dair bir seferliğine yazılımcıya uyarı yolla.
    </td>
    </tr>
    <? } ?>
    </table>
    <p class=\"submit\"><input type=\"hidden\" name=\"submitted\" /><input type=\"submit\" name=\"Submit\" value=\"<?php _e($rev_action);?> Ayarları Güncelle &raquo;\" /></p>
    </form>

  19. <?
    }

    function wpoc_counter_page() {
    global $wpdb;
    global $wpoc_tablename;
    global $table_prefix;
    global $max;
    global $total;
    ?>


    <h2>WP-OnlineCounter İstatistikler</h2>
    <?php
    if(isset($_GET['ip'])) {
    ?>
    <table cellspacing=\"2\" cellpadding=\"5\" summary=\"WP-OnlineCounter Count Info\">
    <tr valign=\"top\">
    <th scope=\"row\" colspan=\"2\"><?=$_GET['ip']?> tarafından ziyaret edilen adresler</th>
    </tr>
    <tr valign=\"top\">
    <th scope=\"row\">Zaman</th>
    <th scope=\"row\">URL</th>
    </tr>
    <?php
    $count_uris = $wpdb->get_results(\"SELECT uri,timestamp FROM \".$table_prefix.$wpoc_tablename.\" WHERE ip = '$_GET[ip]' ORDER BY timestamp ASC\");
    if($count_uris)
    foreach ($count_uris as $count_uri) {
    ?>
    <tr valign=\"top\">
    <td align=\"center\"><?=date(\" H:i:s\", $count_uri->timestamp)?></td>
    <td><?=$count_uri->uri?></td>
    </tr>
    <?php } ?>
    </table>

    <?php
    }
    ?>
    <table cellspacing=\"2\" cellpadding=\"5\" summary=\"WP-OnlineCounter Counts\">
    <tr valign=\"top\">
    <th scope=\"row\">Zaman</th>
    <th scope=\"row\">IP Adresi</th>
    <th scope=\"row\">URL</th>
    </tr>
    <?php
    $counts = $wpdb->get_results(\"SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp\");
    if($counts)
    foreach ($counts as $count) {
    ?>
    <tr valign=\"top\">
    <td align=\"center\"><?=date(\" H:i:s\", $count->timestamp)?></td>
    <?php $this_page = explode('&',$_SERVER['REQUEST_URI']); ?>
    <td>&ip=<?=$count->ip?>\"><?=$count->ip?></td>
    <td><?=$count->uri?></td>
    </tr>
    <?php } ?>
    </table>

    <?
    }

    //function to create the table on plugin activation
    add_action('activate_wp-onlinecounter.php','wpoc_install');
    function wpoc_install () {
    global $table_prefix, $wpoc_tablename, $wpdb;

    $table = $table_prefix . $wpoc_tablename;
    if($wpdb->get_var(\"show tables like '$table'\") != $table) {

    $sql = \"CREATE TABLE \".$table.\" (
    timestamp int(15) NOT NULL default '0',
    ip varchar(15) NOT NULL default '',
    count int(15) NOT NULL default '0',
    maxon int(25) NOT NULL default '0',
    maxontime int(15) NOT NULL default '0',
    uri text NOT NULL default '',
    PRIMARY KEY (timestamp, ip)
    );\";

    require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
    dbDelta($sql);
    }elseif($wpdb->get_var(\"SHOW COLUMNS FROM \".$table.\" LIKE 'uri'\") != 'uri') {
    $wpdb->query(\"ALTER TABLE wp_onlinecounter ADD uri TEXT NOT NULL\");
    }

    add_option('wpoc_header', '

      ', 'WPOC: output before counter');
      add_option('wpoc_footer', '
    ', 'WPOC: output after counter');
    add_option('wpoc_show_current', 'on', 'WPOC: show online count');
    add_option('wpoc_show_current_users_only', '', 'WPOC: show online count only to registered users');
    add_option('wpoc_show_maxon', 'on', 'WPOC: show max online count');
    add_option('wpoc_show_total', 'on', 'WPOC: show total count');
    add_option('wpoc_label_current', 'Şu anki çevrimiçi kişi sayısı', 'WPOC: label for currently online');
    add_option('wpoc_label_maxon', 'Aynı anda maksimum çevrimiçi kişi sayısı', 'WPOC: label for maximum concurrent');
    add_option('wpoc_label_total', 'Toplam ziyaretçi', 'WPOC: label for total visitors');
    add_option('wpoc_ignore_level', '10', 'WPOC: ignore users with or above this level');
    add_option('wpoc_timeout', '600', 'WPOC: how long until a visit timeouts');
    add_option('wpoc_trackback', '', 'WPOC: did we send a trackback');
    }
    ?>

1 yıl önce #
  • eylultoprak
    Editör

    bir temanız acaba en ayarlı olabilirmi?
    iki bir şey değiştirmiyoruz zaten türkçe?
    üç db tabloyu silip denediniz mi?

    1 yıl önce #
  • gevv
    Üye

    yönet bölümünden eklentinin ayarlarına bakma istedim böyle bir hata veriyor wp

    WordPress veritabanı hatası: [Table 'hyper.wp_onlinecounter' doesn't exist]
    SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp

    daha önce boyle bir sorun yoktu çözümü varmıdır acaba ? gerci eklenti çalışıyor ama ilerde sorun yaratmasın ?

    1 yıl önce #
  • gevv
    Üye

    sidebarda kullanıyorum ama bilgi yazıları solda ortalamak istiyorum
    <p align="center"> </p> kodları arasına eklentinin kodunu yerlerştirdim olmadı nasıl yapabilirim ? birde yazı boyutunu degiştirebilirmiyiz ?

    1 yıl önce #

  • Bu konu için RSS beslemesi

    Cevapla

    Mesaj göndermek için giriş yapmalısınız.