3.1.x SnippetsWho is where

Snippets
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Who is where

Post by martin »

Who is where you can change some settings in the who is where.php file look for the config section.
This is now for phpbb 3.1.7
12.png
Demo Here

Open: index.php
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

$user->setup('viewforum');
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

// JQ Who is where / 4seven / 2013
$who_base = $config['cookie_name'] . '_base';	
setcookie("$who_base", 'base', time()+3600*24);
// JQ Who is where / 4seven / 2013
Open: viewtopic.php
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

		'U_EDIT'			=> ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '',
		'U_QUOTE'			=> ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
Replace with Replace the preceding lines with the following

Code: Select all

		// 'U_EDIT'			=> ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '',
		'U_EDIT'			=> ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&t=$topic_id&p={$row['post_id']}") : '',
		// 'U_QUOTE'			=> ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
		'U_QUOTE'			=> ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&t=$topic_id&p={$row['post_id']}") : '',
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

		'U_DELETE'         => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=' . (($softdelete_allowed) ? 'soft_delete' : 'delete') . "&f=$forum_id&p={$row['post_id']}") : '',
Replace with Replace the preceding lines with the following

Code: Select all

//'U_DELETE'         => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=' . (($softdelete_allowed) ? 'soft_delete' : 'delete') . "&f=$forum_id&p={$row['post_id']}") : '',
        'U_DELETE'         => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=' . (($softdelete_allowed) ? 'soft_delete' : 'delete') . "&f=$forum_id&t=$topic_id&p={$row['post_id']}") : '',
Open: language/en/common.php
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

$lang = array_merge($lang, array(
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

	// JQ Who is where / 4seven / 2013
	'WIW_SZ_1_E'         => 'Set max-height to 280px (default)',
	'WIW_SZ_1'           => '280', // next value -10 
	'WIW_SZ_1M1'         => '270',

	'WIW_SZ_2_E'         => 'Set max-height to 360px',			
	'WIW_SZ_2'           => '360', // next value -10
	'WIW_SZ_2M1'         => '350',	

	'WIW_SZ_3_E'         => 'Set max-height to 440px',
	'WIW_SZ_3'           => '440', // next value -10
	'WIW_SZ_3M1'         => '430',

	'WIW_SZ_N_E'         => 'No Limit, no max-height',
	'WIW_SZ_N'           => '0',
	'WIW_SZ_NS'          => 'FULL SIZE',	

	'CITY'               => 'City',	
	'UCITY'              => 'Unknown',	
	'NO_ACCESS'          => 'No access',

	'WIW_COUNTRY'        => 'Country',
	'WIW_ARRIVED'        => 'Arrived',
	'WIW_BROWSER'        => 'Browser',
	'WIW_NO_COOKIE'      => 'You must accept cookies, to use this function.<br /> Reload this site after activating.',
	'WIW_FF'             => 'Firefox',
	'WIW_IE'             => 'Internet Explorer',
	'WIW_OPERA'          => 'Opera',	
	'WIW_CHROME'         => 'Chrome',
	'WIW_SAFARI'         => 'Safari',
	'WIW_OPERA'          => 'Opera',	
	'WIW_NO_BROWSER'     => 'Another Browser/Bot',

	'READING_IN_TOPIC'   => 'Reading topic: %s',
	'READING_IN_FORUM'   => ' in forum: %s',	
	'READING_IN_POST'    => 'Reading post: %s',
	'READING_IN_POSTS'   => ' in post: %s',

	'DOWNLOAD_FILE'      => 'Downloading file: %s',

	'EDIT_MESSAGE'       => 'Edit message in %s',	
	'QUOTE_MESSAGE'      => 'Quote message in %s',
	'DELETE_MESSAGE'     => 'Delete message in %s',	

	'SEARCH_EGOSEARCH'   => 'Viewing own posts',	
	'SEARCH_NEWPOSTS'    => 'View new posts',
	'SEARCH_ACTIVE'      => 'View active posts',

	'POSTING_MESSAGE_JQ' => 'Ajax or jQuery present: Replying, quoting or editing message',	

	// Real user page 1.1.0 / Senky / 2009
	'VO_VIEWING_SUBSCRIBED'  => 'UCP: Viewing subscribtions',
	'VO_VIEWING_BOOKMARKS'   => 'UCP: Viewing bookmarks',
	'VO_VIEWING_DRAFTS'      => 'UCP: Viewing drafts',
	'VO_VIEWING_ATTACHMENTS' => 'UCP: Viewing attachments',
	'VO_EDITING_PROFILE'     => 'UCP: Editing profile',
	'VO_EDITING_SIGNATURE'   => 'UCP: Editing signature',
	'VO_EDITING_AVATAR'      => 'UCP: Editing avatar',
	'VO_EDITING_AS'          => 'UCP: Editing account settings',
	'VO_EDITING_GS'          => 'UCP: Editing global settings',
	'VO_EDITING_PD'          => 'UCP: Editing posting defaults',
	'VO_EDITING_DO'          => 'UCP: Editing display options',
	'VO_MANAGE_PM_DRAFTS'    => 'UCP: Manage private messages drafts',
	'VO_PM_INBOX'            => 'UCP: Viewing PM inbox',
	'VO_PM_OUTBOX'           => 'UCP: Viewing PM outbox',
	'VO_PM_SENTBOX'          => 'UCP: Viewing PM sentbox',
	'VO_PM_OPTIONS'          => 'UCP: Editing PM options',
	'VO_EDITING_MEMBERSHIP'  => 'UCP: Editing memberships',
	'VO_EDITING_GROUP'       => 'UCP: Editing group',
	'VO_EDITING_FRIENDS'     => 'UCP: Editing friends',
	'VO_EDITING_FOES'        => 'UCP: Editing foes',
	'VIEWING_HANGMAN'			=> 'Is playing hangman',
        'VIEWING_KNUFFEL'                       => 'Is playing knuffel',
        'VIEWING_DOWNLOADSYSTEM'                => ' Is viewing downloads page',
        'VIEWING_QUOTESCOLLECTION'              => 'Is reading quotes',
        'VIEWING_PARTNER'                       => 'Is in the parnter pages',
        'VIEWING_ADD'                           => 'Is viewing partner add page', 
        'VIEWING_PUZZLE'                        => 'is playing a puzzle',
        'VIEWING_CHAT_LOGS'                     => 'Is viewing mchat logs',
        'VIEWING_CHAT_ARCHIVE'                  => 'Is viewing mchat archive',
	'VIEWING_VIDEO_INDEX'                   => 'Watching in the gallery',
        'VIEWING_EMAILLIST'                     => 'Is trying to view emails', 
        'VIEWING_DONOR_LIST'                     => 'Is viewing the donors list',
	'VISIT_WEBSITE'				=> 'Visit website',
	
	// Real user page 1.1.0 / Senky / 2009

	// JQ WIW Addition #1 / 4seven / 2012
	'VIEWING_PROFILE_VIEWS'  => 'Viewing Profile Views',	
	'VIEWING_ANNUAIRE'       => 'Viewing Annuaire',	
	'VIEWING_ANNUAIRE_CAT_1' => 'Viewing Annuaire Cat 1',
	'VIEWING_ANNUAIRE_CAT_2' => 'Viewing Annuaire Cat 2',
	'VIEWING_ANNUAIRE_CAT_3' => 'Viewing Annuaire Cat 3',
	// JQ WIW Addition #1 / 4seven / 2012
	
	// JQ WIW Addition #2 / 4seven / 2012
	'VIEWING_PROFILE_VIEWS'  => 'Viewing Profile Views',    
	// JQ WIW Addition #2 / 4seven / 2012  	

	'GEO_CREDIT_LINE'        => ' | Geolocation by <a href="http://www.geoplugin.com/">geoPlugin</a>',	
	// JQ Who is where / 4seven / 2013
Open: styles/prosilver/template/index_body.html
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

<!-- IF S_DISPLAY_ONLINE_LIST -->
	<div class="stat-block online-list">
		<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
		<p>
			<!-- EVENT index_body_block_online_prepend -->
			{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
			<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
			<!-- EVENT index_body_block_online_append -->
		</p>
	</div>
<!-- ENDIF -->
Replace with Replace the preceding lines with the following

Code: Select all

<!-- IF S_DISPLAY_ONLINE_LIST || U_VIEWONLINE -->

<script type="text/javascript">
// <![CDATA[ 
!window.jQuery && document.write('<script type="text\/javascript" src="https:\/\/code.jquery.com\/jquery-latest.min.js"><\/script>');
// ]]> 
</script> 

<script type="text/javascript">
// <![CDATA[
function set_{L_WIW_SZ_1}(){
$('.navbar11').css({
'max-height' : '{L_WIW_SZ_1}px'
});
$('.navbar22').css({
'max-height' : '{L_WIW_SZ_1M1}px',
'overflow-x' : 'hidden',
'overflow-y' : 'auto'  
});}

function set_{L_WIW_SZ_2}(){
$('.navbar11').css({
'max-height' : '{L_WIW_SZ_2}px'
});
$('.navbar22').css({
'max-height' : '{L_WIW_SZ_2M1}px',
'overflow-x' : 'hidden',
'overflow-y' : 'auto'  
});}

function set_{L_WIW_SZ_3}(){
$('.navbar11').css({
'max-height' : '{L_WIW_SZ_3}px'
});
$('.navbar22').css({
'max-height' : '{L_WIW_SZ_3M1}px',
'overflow-x' : 'hidden',
'overflow-y' : 'auto'  
});}

function set_{L_WIW_SZ_N}(){
$('.navbar11').css({
'max-height' : '100%'
});
$('.navbar22').css({
'max-height' : '100%',
'overflow'   : 'visible' 
});}

 $(document).ready(function() {
    <!-- IF S_DISPLAY_ONLINE_LIST -->
    $('#who_is_online_total').load('{ROOT_PATH}who_is_online_total.php?sid={SESSION_ID}', {dol : '{S_DISPLAY_ONLINE_LIST}'});
    $('#who_is_online_reg').load('{ROOT_PATH}who_is_online_reg.php?sid={SESSION_ID}', {dol : '{S_DISPLAY_ONLINE_LIST}'});
    <!-- ENDIF -->
     <!-- IF U_VIEWONLINE -->
    $('#who_is_where').load('{ROOT_PATH}who_is_where.php?sid={SESSION_ID}');
    <!-- ENDIF -->

    var refreshId = setInterval(function() {
    <!-- IF S_DISPLAY_ONLINE_LIST -->
    $('#who_is_online_total').load('{ROOT_PATH}who_is_online_total.php?sid={SESSION_ID}', {dol : '{S_DISPLAY_ONLINE_LIST}'});
    $('#who_is_online_reg').load('{ROOT_PATH}who_is_online_reg.php?sid={SESSION_ID}', {dol : '{S_DISPLAY_ONLINE_LIST}'});
    <!-- ENDIF -->    
    <!-- IF U_VIEWONLINE -->
    $('#who_is_where').load('{ROOT_PATH}who_is_where.php?sid={SESSION_ID}');
    <!-- ENDIF -->
    }, 5000);
   $.ajaxSetup({ cache: false });
 });
// ]]>
</script>
<!-- ENDIF -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
<div style="padding-top:3px;"> </div>

<div class="navbar">
<div class="inner"><span class="corners-top"><span></span></span>
   <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
   <p>
   <!-- {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})-->{RECORD_USERS}<br /><!-- {LOGGED_IN_USER_LIST} -->
   <!-- IF LEGEND --><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF -->
   </p>
   <span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

<!-- IF U_VIEWONLINE -->

   <div style="padding-top:5px;"> </div>
   <!-- 40er steps -->
   <div class="navbar navbar11" style="max-height:{L_WIW_SZ_1}px;"><span class="corners-top"><span></span></span>   
   <div class="inner navbar22" style="max-height:{L_WIW_SZ_1M1}px; overflow-x:hidden; overflow-y:auto;">

   <span style="cursor:pointer; color:white;" title="{L_WIW_SZ_1_E}" onclick="set_{L_WIW_SZ_1}()">{L_WIW_SZ_1}</span> 
   <span style="cursor:pointer; color:white;" title="{L_WIW_SZ_2_E}" onclick="set_{L_WIW_SZ_2}()">{L_WIW_SZ_2}</span> 
   <span style="cursor:pointer; color:white;" title="{L_WIW_SZ_3_E}" onclick="set_{L_WIW_SZ_3}()">{L_WIW_SZ_3}</span>
   <span style="cursor:pointer; color:white;" title="{L_WIW_SZ_N_E}" onclick="set_{L_WIW_SZ_N}()">{L_WIW_SZ_NS}</span>

   <h3 style="position:relative; top:-10px;">Who is where</h3>
   <table class="table1">
   
   <thead>
   <tr style="font-size:11px;">
   <th class="name"   style="width:15%; padding-left:5px; color:#536482;">{L_USERNAME}</th>
   <th class="name"   style="width:5%; padding-left:5px; color:#536482; text-align:center;">{L_WIW_COUNTRY}</th>
   <th class="info"   style="width:40%; padding-left:5px; color:#536482;">{L_LOCATION}</th>
   <th class="active" style="width:15%; padding-left:5px; color:#536482;">{L_WIW_ARRIVED}</th>
   <th class="active" style="width:25%; padding-left:5px; color:#536482;">{L_WIW_BROWSER}</th>
   </tr>
   </thead>
   <tbody id="who_is_where" style="font-size:10px; color:grey;"><tr style="display:none;"><td style="display:none;"></td></tr></tbody>
   </table>
   </div><span class="corners-bottom"><span></span></span>
   </div>
   <span class="corners-bottom"><span></span></span>
   
<!-- ELSE -->   

   <div style="padding-top:3px;"> </div>
   
   <div class="navbar">
   <div class="inner"><span class="corners-top"><span></span></span>
   <h3>Who is where</h3>
   <table class="table1">
   <thead>
   <tr style="font-size:11px;">
   <th class="name"   style="width:15%; padding-left:5px; color:#536482;">{L_USERNAME}</th>
   <th class="name"   style="width:5%; padding-left:5px; color:#536482; text-align:center;">{L_WIW_COUNTRY}</th>
   <th class="info"   style="width:40%; padding-left:5px; color:#536482;">{L_LOCATION}</th>
   <th class="active" style="width:15%; padding-left:5px; color:#536482;">{L_WIW_ARRIVED}</th>
   <th class="active" style="width:25%; padding-left:5px; color:#536482;">{L_WIW_BROWSER}</th>
   </tr>   
   </thead>
   <tbody style="font-size:10px; color:grey;">
<tr class="bg1">
   <td class="name" style="width:10%;">{L_NO_ONLINE_USERS}</td>
   <td class="name" style="width:5%; text-align:center;"><img src="images/74t.gif" style="margin-bottom:3px; width:8px;" alt="" /></td>
   <td class="info" style="width:45%; text-align:center;"><img src="images/74t.gif" style="margin-bottom:3px; width:8px;" alt="" /></td>
   <td class="active" style="width:15%;"><img src="images/74t.gif" style="margin-bottom:3px; margin-left:3px; width:8px;" alt="" /></td>
   <td class="active" style="width:25%;"><img src="images/74t.gif" style="margin-bottom:3px; margin-left:3px; width:8px;" alt="" /></td>
</tr>      
   </tbody>
   </table>
   <span class="corners-bottom"><span></span></span></div>
    </div>
   
   <div style="padding-top:3px;"> </div>   

<!-- ENDIF -->
Open styles/prosilver/theme/colours.css
add at the bottom of the file

Code: Select all

table1 {
     display: table;
     margin-top:10px;
    margin-bottom:5px;
     border-spacing: 1px;
     
}
extract and upload the contents of the root folder
root.zip
You can change the refresh rate in the index_body.html find 5000 change to what ever you want.
You do not have the required permissions to view the files attached to this post.
Last edited by martin on Jan 13th, '16, 12:13, edited 10 times in total.
Use this to install an ext on your board no more ftp or path making.
Path too install this ext is ext/boardtools/upload
Download is here Make it easy for us to solve your issues
User avatar

Jaantje
Users
Users
Magic user status: Offline
Posts: 354
Joined: Nov 2nd, '14, 20:25
    Windows 8.1 Chrome

Re: Who is where

Post by Jaantje »

Thanx martin works perfectimo :tumbsyes:

Image
Grreeetttttzzzzz, Jaantje
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Windows 8 Chrome

Re: Who is where

Post by martin »

This version also works with app thanx to dmzx there is a few lang edits needed for that if needed il post them.

the 3 with arrows are viewing pages with app/ in the url
1.png
You do not have the required permissions to view the files attached to this post.
User avatar

Jaantje
Users
Users
Magic user status: Offline
Posts: 354
Joined: Nov 2nd, '14, 20:25
    Windows 8.1 Chrome

Re: Who is where

Post by Jaantje »

Video Gallery works for me.
Watching in mChat doesn't work. I get to see a blank field
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Windows 8 Chrome

Re: Who is where

Post by martin »

Jaantje wrote:Video Gallery works for me.
Watching in mChat doesn't work. I get to see a blank field

Open who is where in root
Find This may be a partial find and not the whole line

Code: Select all

'mchat'      => 'MCHAT_TITLE',
Replace with Replace the preceding lines with the following

Code: Select all

'chat'      => 'MCHAT_TITLE',
EDIT I CHANGED IT AS I POSTED CUSTOM EDITS
User avatar

Jaantje
Users
Users
Magic user status: Offline
Posts: 354
Joined: Nov 2nd, '14, 20:25
    Windows 8.1 Chrome

Re: Who is where

Post by Jaantje »

Was already well as you can see below

Code: Select all

 // Grab some common modules
         $url_params = array(
            'video'      => 'VIDEO_INDEX',
            'chat'      => 'VIEWING_MCHAT_TITLE',
            'donation'   => 'VIEWING_DONATE',   
            'rules'      => 'BOARDRULES_TITLE',
            'hangman'   => 'VIEWING_HANGMAN',
         );
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Windows 8 Chrome

Re: Who is where

Post by martin »

My fault try this pls

Code: Select all

'video'      => 'VIDEO_INDEX',
            'chat'      => 'MCHAT_TITLE',
            'donation'   => 'VIEWING_DONATE',   
            'rules'      => 'BOARDRULES_TITLE',
            'hangman'   => 'HANGMAN_TITLE',
User avatar

Jaantje
Users
Users
Magic user status: Offline
Posts: 354
Joined: Nov 2nd, '14, 20:25
    Windows 8.1 Chrome

Re: Who is where

Post by Jaantje »

Thanx martin it works now :tumbsyes:

Code: Select all

         // Grab some common modules
         $url_params = array(
            'video'      => 'VIDEO_INDEX',
            'chat'      => 'MCHAT_TITLE',
            'donation'   => 'VIEWING_DONATE',   
            'rules'      => 'BOARDRULES_TITLE',
            'hangman'   => 'VIEWING_HANGMAN',
         );

Taka51
Users
Users
Magic user status: Offline
Posts: 30
Joined: Jun 8th, '15, 11:27
    Windows Vista Firefox

Re: Who is where

Post by Taka51 »

Hello

How do you hide yourself for this change to the guests

thank you in advance
WebDvdBdR - Page d’index
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Who is where

Post by martin »

It seems to me your asking 2 questions in one

1 Hide hidden users - Martins-Place.dyndns.info

2 show hide guest

open who is where .php

change this part to true or false

Code: Select all

//--- CONFIG AREA -- 
	# show guests 
	//set false or true
	  $show_guests = true;
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Who is where

Post by martin »

Got this in the making
2.png
3.png
Just need to get the footer inline as it's out side the wrap.
You do not have the required permissions to view the files attached to this post.
Last edited by martin on Jul 1st, '15, 11:01, edited 2 times in total.
User avatar

dmzx
Founder
Founder
Magic user status: Online
Posts: 5974
Joined: Jan 13th, '14, 20:45
    Windows 8 Firefox

Re: Who is where

Post by dmzx »

martin wrote:Got this in the making
:thumbup:
binance.com ;) try it!

Taka51
Users
Users
Magic user status: Offline
Posts: 30
Joined: Jun 8th, '15, 11:27
    Windows Vista Firefox

Re: Who is where

Post by Taka51 »

Hello martin

I replied that now have to tell you note your advice and will test as soon as possible

However, I encounter another problem the change is installed on my forum but nothing appears either robots or users and others (guests, ect ...)
Do I have to install a script where other kind highslide.js whether what folder I must put this root style

Best regards
User avatar

Topic Author
martin
Admin
Admin
Magic user status: Offline
Posts: 4777
Joined: Apr 6th, '14, 14:12
    Linux Chrome

Re: Who is where

Post by martin »

Send me a link to your site in pm or post here with a test account sound like you have 2 calls to jquery going on.

Taka51
Users
Users
Magic user status: Offline
Posts: 30
Joined: Jun 8th, '15, 11:27
    Windows Vista Firefox

Re: Who is where

Post by Taka51 »

Re Martin

here is the link to my forum and access

Communauté de WebDVDBDHD - Page d’index

nickname test
123456 password

cordially