[DEV] JQ Who is where

Mod Support

Moderators: BNa, Sekuro, 4seven


Re: [DEV] JQ Who is where

Postby 4seven » 04 Mar 2013, 21:29

No bug of this mod, bcs. each ajax-call steels the session. Look at the sessions table.
The mod catch all information from the sessions table, nothing else. Same is here
on posting, because of present ajax. I fix it, by adding jqupload to the main code,
and tell it to show "ajax present > posting etc." or similar.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: [DEV] JQ Who is where

Postby martin123456 » 04 Mar 2013, 23:05

My bad
Code: Select all
case 'mchat':
         $location =  $user->lang['VIEWING_MCHAT'];
         $location_url = append_sid("{$phpbb_root_path}mchat.$phpEx");
      break

should be
Code: Select all
case 'mchat':
            $location = $user->lang['MCHAT_TITLE'];
            $location_url = append_sid("{$phpbb_root_path}mchat.$phpEx");
        break;



and any clue how to call the index.php from a folder in root

Code: Select all
case 'dm_eds':
         $location =  $user->lang['VIEWING_DM_EDS'];
         $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
      break;
martin123456

Tiptop

Tiptop
 
Posts: 14
Joined: 17 Aug 2012, 17:45
 
Resolution: 1366x768


Re: [DEV] JQ Who is where

Postby 4seven » 05 Mar 2013, 20:06

martin123456 wrote:and any clue how to call the index.php from a folder in root

Code: Select all
case 'dm_eds':
         $location =  $user->lang['VIEWING_DM_EDS'];
         $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
      break

Was this a question? If yes, can you explain what you want to achieve?
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: [DEV] JQ Who is where

Postby martin123456 » 05 Mar 2013, 23:41

Yes it was a question

im trying to put it in the who is where but the problem is the index.php is not in the root its within a folder

what ever addons we add if the .php file is in the root it works example ("{$phpbb_root_path}mchat.$phpEx"); works perfect

but if the .php file is in a folder it fails to work example ("{$phpbb_root_path}foldername/mchat.$phpEx");

Code: Select all
case 'dm_eds':
         $location =  $user->lang['VIEWING_DM_EDS'];
         $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
      break;


root/index.php is the default but im trying to add root/foldername/index.php

Hope you understand what i'm trying to say 8-)

on a side note i have the who is where showing lots of extra pages now ;)
martin123456

Tiptop

Tiptop
 
Posts: 14
Joined: 17 Aug 2012, 17:45
 
Resolution: 1366x768


Re: [DEV] JQ Who is where

Postby 4seven » 06 Mar 2013, 01:17

This is an example. Genuine viewonline.php

Code: Select all
        case 'adm/index':
            $location = $user->lang['ACP'];
            $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
        break

Your code is

Code: Select all
          case 'dm_eds':
             $location =  $user->lang['VIEWING_DM_EDS'];
             $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
          break

but it have to be

Code: Select all
          case 'dm_eds/index':
             $location =  $user->lang['VIEWING_DM_EDS'];
             $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
          break

As i told, the mod works exact as viewonline.php, powered by sessions_table. So its a general phpbb3 question.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: [DEV] JQ Who is where

Postby martin123456 » 22 Mar 2013, 00:41

ok i understand what your saying but it just dont work i have added the bellow code to who is where.php and view on line.php

you see the first one is contact.php (thats in root) and works perfect the dm_eds and modcp are both in folders and dont work as he image shows

Code: Select all
case 'contact':
         $location =  $user->lang['VIEWING_CONTACT'];
         $location_url = append_sid("{$phpbb_root_path}contact.$phpEx");
      break;
      
      case 
'dm_eds/index':
             $location =  $user->lang['VIEWING_DM_EDS'];
             $location_url = append_sid("{$phpbb_root_path}dm_eds/index.$phpEx");
          break;
          
          case 
'modcp/index':
            $location = $user->lang['VIEWING_MODCP'];
            $location_url = append_sid("{$phpbb_root_path}modcp/index.$phpEx");
        break;


in short if the file.php is in root its perfect but it the file.php is in a folder it wont

strange that this works as it's what i'm doing

case 'adm/index':
$location = $user->lang['ACP'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;
Attachments
testy.png
martin123456

Tiptop

Tiptop
 
Posts: 14
Joined: 17 Aug 2012, 17:45
 
Resolution: 1366x768


Re: [DEV] JQ Who is where

Postby 4seven » 22 Mar 2013, 00:54

No clue, bcs. it works for me. May recheck with a virgin, genuine 3.0.11 board in viewonline.php.
If i have more time in the next future i can check this again.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: [DEV] JQ Who is where

Postby martin123456 » 22 Mar 2013, 01:15

Well some thing to think about this works perfect

Code: Select all
case 'aos_notifications':
            
$user->add_lang('mods/info_acp_aos_notifications');
            
$location $user->lang['VIEWING_AOS_NOTIFICATIONS'];
            
$location_url append_sid("{$phpbb_root_path}aos_notifications.$phpEx");
        break; 


just going to alter the code to suit and il post my finding
martin123456

Tiptop

Tiptop
 
Posts: 14
Joined: 17 Aug 2012, 17:45
 
Resolution: 1366x768

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron