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
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
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
bende zaten yuklu bende yuklu olanı nasıl türkçe yapacagımı sormuştum
bu dosyaları üzerine yüklemenizi isteyecekdim.
çevirmek istediğin isimleri notepat++ bulup kur ve bu dosyaları onun ile editle.
onları zaten bi bulsam ben yapacağımı biliyorumda gözükmüyorlar o kadarını ben de biliyorum
arkadaşım kod zaten türkçe sen bence tabloları sil dbden eski değerleride aklında tut onlarıda koyarsın
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 \"
//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']);
}
?>
$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');
?>
function wpoc_counter_page() {
global $wpdb;
global $wpoc_tablename;
global $table_prefix;
global $max;
global $total;
?>
//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', '
bir temanız acaba en ayarlı olabilirmi?
iki bir şey değiştirmiyoruz zaten türkçe?
üç db tabloyu silip denediniz mi?
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 ?
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 ?
Mesaj göndermek için giriş yapmalısınız.