-

[2.0.22] Online/Offline Status Images

General phpBB2 Discussion and Support
Forum rules
To receive support you must become a donor unless otherwise specified in the release topic.

Please read these topics for more information:
Web Services/Support/Private Mod Access

Re: [2.0.22] Online/Offline Status Images

Postby EXreaction » Wed Aug 22, 2007 5:58 pm

Ok, the problem is because the print topic mod includes it's own header file, which doesn't include the online/offline functions.php file.

See if you can do the same edits that is required for page_header.php in the page_header_printer.php file. :)

Let me know if it works. :)
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: [2.0.22] Online/Offline Status Images

Postby Philthy » Wed Aug 22, 2007 7:42 pm

You sir, are a genius :geek:

Many thanks :D worked a treat.
Philthy
Donor
Donor
 
Posts: 16
Joined: Tue Aug 21, 2007 11:19 am
Blog: View Blog (0)

Re: [2.0.22] Online/Offline Status Images

Postby rcelaCG » Thu Oct 11, 2007 10:06 pm

Excellent Mod. I was just wondering if it would be possible to keep the indication on viewtopic as an image, but change the one in profiles into text (like "Status: Online"). Thanks.
rcelaCG
Member
Member
 
Posts: 2
Joined: Thu Oct 11, 2007 10:01 pm
Blog: View Blog (0)

Re: [2.0.22] Online/Offline Status Images

Postby EXreaction » Fri Oct 12, 2007 12:46 pm

Yes, it is possible, you would need to add an output in the php file with the online/offline function with the text you want using a different template variable, and then just change the template variable you use in the template files you want to change.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: [2.0.22] Online/Offline Status Images

Postby rcelaCG » Fri Oct 12, 2007 3:20 pm

Thanks.
rcelaCG
Member
Member
 
Posts: 2
Joined: Thu Oct 11, 2007 10:01 pm
Blog: View Blog (0)

[2.0.22] Online/Offline Status Images

Postby zrom » Mon Dec 17, 2007 1:49 pm

Hi! What's about hidden status..? When i in hidden status, site answer me that i'm is online...How i can to correct this??

P.S.: Sorry for my bed english :)
zrom
Member
Member
 
Posts: 1
Joined: Mon Dec 17, 2007 1:45 pm
Blog: View Blog (0)

Re: [2.0.22] Online/Offline Status Images

Postby EXreaction » Mon Dec 17, 2007 5:57 pm

I don't remember exactly how this is setup, but I believe it will show you as offline to normal members if you are hidden, but online to moderators/administrators if you are hidden.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: [2.0.22] Online/Offline Status Images

Postby JLA » Sat Jan 12, 2008 7:54 pm

Have a problem with this mod. We intend to only use this in a few select places in our site.

We have it working so far as follows.

1. Made the edit in the page_header file for the STANDARD user profiles on our site as instructed.
2. Made the edit in usercp_viewprofile.php file on our site.
3. Copied the files included with the mod to the appropriate locations as instructed.
4. Made the edit in the lang_main.php on our site as instructed.
5. Made the edit in the profile_view_ body.tpl file as instructed.

Result - this is working fine - the offline/online icon appears in STANDARD user profiles for the users on our site that have them. We did not make any changes as we do not want online /offline icons/status in the groupCP, memberlist, or viewtopic.

This is the problem:

We have a modified version of the MPS (My Profile Space Mod) installed. We also wish for the online/offline icon to appear on the MPS profile of users that have one. There are corresponding files that "should" achieve this as we did in steps 1 - 5 above. The files to edit are:

1. mps_viewprofile.php
2. the MPS template file (mps_avatar.tpl) that deals with the section of the MPS profile where we want the icon to appear.

This mod uses the same page header as the one edited as mentioned in the beginning of this post. The edits we made on the MPS page metioned as as follows:

1. mps_viewprofile.php
Code: Select all
// Begin original phpbb info   

   'AVATAR_IMG' => $avatar_img,

// Start Online/Offline Status Images MOD
   'STATUS_IMG' => display_online_offline($profiledata['user_id'], $online_array),
   'L_ONLINE_OFFLINE' => $lang['Online_Offline'],
// End Online/Offline Status Images MOD

   'USERNAME' => $profiledata['username'],
   'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
   'POSTER_RANK' => $poster_rank,
   'RANK_IMAGE' => $rank_image,
   'POSTS_PER_DAY' => $posts_per_day,
   'POSTS' => $profiledata['user_posts'],
   'PERCENTAGE' => $percentage . '%',
   'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
   'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),


2. In mps_avatar.tpl
Code: Select all
<tr>
      <td valign="middle" height="1%" align="center" nowrap="nowrap"><div align="left"><span class="genmed"><br /><span class="gensmall">{POSTER_RANK}</span><br /><br />
{PROFILE_SEX}</span></div></td>    
   </tr>
   <tr>
      <td valign="middle" height="1%" align="center" nowrap="nowrap"><div align="left"><span class="genmed">{MPS_AGE}</span></div></td>    
   </tr>   
   <tr>
      <td valign="middle" height="1%" align="center"><div align="left"><span class="genmed">{LOCATION}</span></div></td>    
   </tr>   
   
   <tr>
   
   <td valign="middle" height="1%" align="center"><div align="left">{STATUS_IMG}</div></td>
   </tr>

   <tr>
      <td valign="top" height="1%" align="center" nowrap="nowrap"><div align="left"><span class="genmed"><br />{L_LAST_LOGIN}<br />{LAST_VISIT_DATE}</span></div></td>    
   </tr>


When attempting to go into a user's MPS profile, the page does not load (blank/white screen) When removing this line of code from mps_viewprofile.php
Code: Select all
'STATUS_IMG' => display_online_offline($profiledata['user_id'], $online_array),


The page loads fine - just no status icon.

Any assistance would be appreciated.
JLA
Member
Member
 
Posts: 4
Joined: Sat Jan 12, 2008 7:37 pm
Blog: View Blog (0)

Re: [2.0.22] Online/Offline Status Images

Postby EXreaction » Sat Jan 12, 2008 8:06 pm

Is the code you put in inside of a function?

If it is in a function you will need to put $online_array in the list of globals, or put
global $online_array;

somewhere in the function (at the top would be best).

If not, see if you can find out what error it is in your error logs.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: [2.0.22] Online/Offline Status Images

Postby JLA » Sat Jan 12, 2008 8:50 pm

EXreaction wrote:Is the code you put in inside of a function?

If it is in a function you will need to put $online_array in the list of globals, or put
global $online_array;

somewhere in the function (at the top would be best).

If not, see if you can find out what error it is in your error logs.


Which "code" are you referring to? If you are referring to the edits we made per the mod instructions, no, there were no edit within a function.

The two files we edited are to MPS files that correspond to the standard view profile files of phpbb2 The edits we made on those standard files are currently working - it is just making the same edits on the MPS versions that is causing the MPS profile page to not work.
JLA
Member
Member
 
Posts: 4
Joined: Sat Jan 12, 2008 7:37 pm
Blog: View Blog (0)

PreviousNext

Return to phpBB2



Who is online

Users browsing this forum: No registered users and 2 guests

cron