1. Who Read 1.0/1.2 ENG

Who Read 1.0/1.2 ENG

  |   8
Who Read 1.0/1.2 ENG

This module is designed to display the article unique views. The module will display data such as IP address, Date view, username if user logged in. For easy access and save space - a viewers list was displayed using a modal popup window.

Who Read 1.0/1.2 ENG

INSTALLATION

1) Upload views.php from the attached file to your server location /engine/modules/

2) Login to phpMyAdmin or your database server and run sql query:
DROP TABLE IF EXISTS `dle_read_log`;
CREATE TABLE `dle_read_log` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default 'guest',
`news_id` int(121) NOT NULL default '0',
`date` varchar(255) NOT NULL default '',
`ip` varchar(255) NOT NULL default '',
`is_guest` tinyint(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 PACK_KEYS=0 AUTO_INCREMENT=1;

Note:
- If you use different database prefix other than default "dle", then change "dle_read_log" to your correct prefix, for example if you are using "mysite" as prefix, then change it to "mysite_read_log"
- If you are using database collation as "utf8" then change "CHARSET=cp1251" to "CHARSET=utf8"

3) Open file engine/modules/show.full.php and find:
else $db->query( "UPDATE " . PREFIX . "_post_extras SET news_read=news_read+1 where news_id='{$row['id']}'" );
}

Add After
$_IP = $db->safesql($_SERVER['REMOTE_ADDR']);
$added_time = time()+($config['date_adjust']*60);
$date = date( "Y-m-d H:i:s", $_TIME );
if ($is_logged) {
$read_log = $db->query("SELECT * FROM " . PREFIX ."_read_log WHERE name = '" . $member_id['name'] ."' and news_id = '" .$row['id'] ."' and is_guest='0'");
if ($db->num_rows($read_log) < 1) $db->query("INSERT INTO ". PREFIX . "_read_log (date,name,news_id,ip,is_guest) values('$date','" . $member_id['name'] ."','". $row['id'] ."','". $_IP ."','0');");
}
else
{
$read_log_2 = $db->query("SELECT * FROM " . PREFIX ."_read_log WHERE ip = '{$_IP}' and news_id = '{$row['id']}'");
if ($db->num_rows($read_log_2) < 1) $into_sql = $db->query("INSERT INTO ". PREFIX . "_read_log (date,name,news_id,ip,is_guest) values('$date', 'guest_".rand(0,15786)."','{$row['id']}','{$_IP}', '1');");
}

Find:
} else
$tpl->set_block( "'\\[edit\\](.*?)\\[/edit\\]'si", "" );

Add AFTER:
require_once(ENGINE_DIR.'/modules/views.php');


4) Templates: In the file templates/your template/fullstory.tpl

Add the following code anywhere you want the view statistic to display:
<script type="text/javascript">
function showreaders() {
$(function(){
$('#whoreader').dialog({
autoOpen: true,
show: 'fade',
hide: 'fade',
width: 400,
height: 300,
buttons: {
"Close" : function() {
$(this).dialog("close");
}
}
});
if ($('#whoreader-content').height() > 400 ) {
$('#whoreader-content').height(400);
$('#whoreader').dialog( "option", "height", $('#whoreader-content').height() + 60 );
$('#whoreader').dialog( "option", "position", 'center' );
} else {
$('#whoreader').dialog( "option", "height", $('#whoreader-content').height() + 60 );
$('#whoreader').dialog( "option", "position", 'center' );
}
});
}
</script>

<div style="cursor:pointer;font-weight:bold;font-size:12px;" onclick="showreaders(); return false;">Who read this article:({all_num})</div>

<div id='whoreader' title='Who read this article' style='display:none;overflow:auto;'>
<div id='whoreader-content'>
Members :({users_num})<br />
{readed}<br />
<br />
Guests :({guest_num})
</div>
</div>

Module by: Dmitry Dark5ider
Translated by: Dark22
Login Required!Only registered users can download files. Please register or Login

WhoRead 1.2 by Dmitry Dark5ider (Tested on DLE 10.3/10.2/10.1/10.0)

Who Read 1.2Who Read 1.2

Login Required!Only registered users can download files. Please register or Login

Last updated by Yorismith - added WhoRead 1.2 - 1018-2014
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+5

Comments 8

Commented By hiroshimamovies on April 5, 2013 (12:27 pm)
I installed on the version 9.8 but you can not read the names of those who have read the article you can chek here http://ddlinkz.com
3 49Forum topics : 111Forum replies : 338Forum likes : 2
noobos
noobos
DLE TEAM
Commented By noobos on April 6, 2013 (1:17 am)
I have modified your jQuery size in your site...

For those who have problem, remove the following lines:
height: 300,
and
                if ($('#whoreader-content').height() > 400 ) {
                $('#whoreader-content').height(400);
                $('#whoreader').dialog( "option", "height", $('#whoreader-content').height() + 60 );
                $('#whoreader').dialog( "option", "position", 'center' );
        } else {
                $('#whoreader').dialog( "option", "height", $('#whoreader-content').height() + 60 );
                $('#whoreader').dialog( "option", "position", 'center' );
        }
This will use popup windows size automatically depending on content...the newer version of Query library will set gui content area automatically which no need for 9.6 and newer version of DLE
16 302Forum topics : 12Forum replies : 1036Forum likes : 170
Commented By hiroshimamovies on April 7, 2013 (3:55 pm)
noobos,
thanks, great job

There must be something wrong, when you click on a user name the link brings you here: http://ddlinkz.com/user/ . This page does not exist
3 49Forum topics : 111Forum replies : 338Forum likes : 2
noobos
noobos
DLE TEAM
Commented By noobos on April 7, 2013 (7:53 pm)
I made some changes there in engine/modules/views.php but can\'t see it because your cache and cloudflare are enabled...so I can't see and effects yet...will check back tomorrow...
16 302Forum topics : 12Forum replies : 1036Forum likes : 170
CEduard
CEduard
Members
Commented By CEduard on October 18, 2014 (1:40 pm)
don`t work on my website... :( can check on http://www.scriptclerk.com
N/A 3Forum topics : 0Forum replies : 0Forum likes : 0
yorismith
yorismith
Moderators
Commented By yorismith on October 18, 2014 (2:56 pm)
I don't check on your site because I can tell you that the version 1.0 is working perfectly on DLE 10.x including 10.3.

I also updated version 1.2 and fully tested on all DLE 10.x, screenshot is also added from DLE 10.3 on last test version.
32 288Forum topics : 2Forum replies : 699Forum likes : 117

- Nothing comes free...
- A generous heart, kind speech, and compassion are the things which renew humanity
phuongdzu
phuongdzu
Members
Commented By phuongdzu on January 21, 2015 (7:05 am)
It is only write log within 24 hours (1 days)
How to set 1 week?

Thanks
N/A 13Forum topics : 6Forum replies : 29Forum likes : 1
DLEStarter
DLEStarter
DLE TEAM
Commented By DLEStarter on January 21, 2015 (7:58 am)
Quote: phuongdzu
It is only write log within 24 hours (1 days)
How to set 1 week?

You can't, the module only use that data as it is, you can't set 1 week or 1 month or 1 year...the module only give you record of 24 hours. please use developer website for supports if you want the module modifications.
29 225Forum topics : 9Forum replies : 558Forum likes : 116
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.