phpBBHacks.com - help on last seen mod of ezportal
Talk sports at SportsForums.net
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
help on last seen mod of ezportal
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Portal Support and Discussion
 See a User Guidelines violation? Please contact us.
Author Message

vas
New User

Joined: 22 Mar 2007
Posts: 6

PostPosted: February 22nd 2008, 10:20 am    Post subject: help on last seen mod of ezportal Reply with quote

hi ricky_racer

nice to see you here.

you are being the most recognizable face from the smartors.

i need help. i hope members here would able to gimme a lending hand.

i want to non-members not to have access to the member profile through the last seen block. I tried various ways but could not get any further. I use category heirarchy.

the last seen mod is as below.

Code:

#
#-----[ OPEN:]-----------------------------------------
#
/portal.php
#
#-----[ FIND:]-----------------------------------------
#

else
{
   $l_total_user_s = $lang['Registered_users_total'];
}

#
#-----[ AFTER, ADD:]-----------------------------------
#
//
// START: Last Seen MOD
//
// START: CONFIGURE NUMBER OF LAST SEEN
//*************************************

$CFG['last_seen'] = '10';

// END: CONFIGURE NUMBER OF LAST SEEN
//*************************************
$sql = "SELECT username, user_id, user_level, user_allow_viewonline, user_lastvisit FROM " . USERS_TABLE. "
   WHERE username <> 'Anonymous'
   ORDER BY user_lastvisit DESC LIMIT " . $CFG['last_seen'];
   if (!$result = $db->sql_query($sql))
   {
      message_die(GENERAL_ERROR, 'Could not query last seen information', '', __LINE__, __FILE__, $sql);
   }
      while ($row = $db->sql_fetchrow($result))
   {
   $style_color = '';
   if ( $row['user_level'] == ADMIN )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
   }
   else if ( $row['user_level'] == MOD )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
   }
   if ( $row['user_allow_viewonline'] )
   {
      $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
   }
   else
   {
      $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
   }
   if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
   {
   $template->assign_block_vars('last_seen_row', array(
      'L_LSEEN_USERNAME' => $user_online_link,
      'L_LSEEN_TIME' => create_date($board_config['default_dateformat'], $row['user_lastvisit'], $board_config['board_timezone']))
      );
   }
}
//
// END: Last Seen MOD
//
#
#-----[ FIND ]-----------------------------------
#
 
   'WELCOME_TEXT' => $CFG['welcome_text'],


#
#-----[ AFTER ADD ]-----------------------------------
#
   'L_LAST_SEEN' => $lang['Last_Seen'],

#
#-----[ OPEN:]-----------------------------------------
#
/language/lang_english/lang_main.php
#
#-----[ FIND:]-----------------------------------------
#
$lang['Vote'] = 'Vote';
$lang['No_poll'] = 'No poll at the moment';
#
#-----[ AFTER, ADD:]-----------------------------------
#
$lang['Last_Seen'] = 'Last Seen';
#
#-----[ OPEN:]-----------------------------------------
#
portal_body.tpl: [All Template Folders]
place block where needed. reference other block docs for details.

        <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
          <tr>
           <td class="catHead" height="25" colspan="2"><center><span class="genmed"><b>{L_LAST_SEEN}</b></span></center></td>
          </tr>
            <tr>
              <td align="left" valign="top">
                <table width="100%" cellpadding="0" cellspacing="0">
                <!-- BEGIN last_seen_row -->
                <tr>
                 <td class="row1" align="left" valign="middle"><span class="gensmall">&raquo;&nbsp;<a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td> </tr>
                  <tr>  <td class="row1" align="left" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME}&nbsp;</span></td>
                </tr>
                <!-- END last_seen_row -->
              </table>
              </td>
            </tr>
        </table>
          <br />

=============== for smartDark =============================

        <table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline">
          <tr>
           <th height="25" colspan="2">{L_LAST_SEEN}</th>
          </tr>
            <tr>
              <td align="left" valign="top">
                <table width="100%" cellpadding="0" cellspacing="0">
                <!-- BEGIN last_seen_row -->
                <tr>
                 <td class="row1" align="left" valign="middle"><span class="gensmall">&raquo;&nbsp;<a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td> </tr>
                  <tr>  <td class="row1" align="left" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME}&nbsp;</span></td>
                </tr>
                <!-- END last_seen_row -->
              </table>
              </td>
            </tr>
        </table>
          <br />

================== for iCGstation ==========================

<table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr><td class="tbtl"><img src="images/spacer.gif" alt="" width="22" height="22" /></td><td class="tbtbot"><span class="genmed"><b>{L_LAST_SEEN}</b></span></td><td class="tbtr"><img src="images/spacer.gif" alt="" width="124" height="22" /></td></tr></table>
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline">
            <tr>
              <td align="left" valign="top">
                <table width="100%" cellpadding="0" cellspacing="0">
                <!-- BEGIN last_seen_row -->
                <tr>
                 <td class="row1" align="left" valign="middle"><span class="gensmall">&raquo;&nbsp;<a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td>
                    <td class="row1" align="right" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME}&nbsp;</span></td>
                </tr>
                <!-- END last_seen_row -->
              </table>
              </td>
            </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />

#
#-----[ SAVE/UPLOAD ALL FILES ]------------------------------------------
# EoM



thanks in advance.

vas
Back to top
View user's profile Send private message

Ricky_Racer
Dedicated User

Joined: 19 Jul 2003
Posts: 1398
Location: Middle of Nowhere, USA

PostPosted: February 22nd 2008, 12:53 pm    Post subject: Reply with quote

Well, what do you say to, let us just restrict viewing profiles to logged in users ?
Code:
#
#------[ OPEN ]---------------------------------------
#
profile.php
#
#------[ FIND ]---------------------------------------
#
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
   $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
   $sid = '';
}
#
#------[ AFTER, ADD ]---------------------------------
#
//
// Add : -- Restrict Guest Access w/ message --
//
$u = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]);
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
if ( !$userdata['session_logged_in']  && $mode == 'viewprofile')
{
   $redirect = append_sid("profile.$phpEx&mode=viewprofile&".POST_USERS_URL."=".$u, true);
   $redirect = str_replace("?", "&", $redirect);
   $template->assign_vars(array(
      'META' => "<meta http-equiv=\"refresh\" content=\"5;url=login.$phpEx?redirect=$redirect\">")
   );
   $message = sprintf($lang['Sorry_auth_viewprofiles'], $lang['Auth_Registered_Users'] ). '<br /><br />' . sprintf($lang['Click_to_register'], '<a href="' . append_sid('profile.'.$phpEx.'?mode=register') . '">', '</a>');
   message_die(GENERAL_MESSAGE, $message);
}
//
// End : -- Restrict Guest Access w/ message --
//
#
#------[ OPEN ]---------------------------------------
#
language/lang_english/lang_main.php
#
#------[ FIND ]---------------------------------------
#
$lang['Click_return_group'] = 'Click %sHere%s to return to group information';
#
#------[ AFTER, ADD ]---------------------------------
#
//
// Add : -- Restrict Guest Access w/ message --
//
$lang['Click_to_register'] = 'Click %sHere%s to Register. Registration is <b>FREE !!!</b>';
//
// End : -- Restrict Guest Access w/ message --
//
#
#------[ FIND ]---------------------------------------
#
$lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.';
#
#------[ BEFORE, ADD ]--------------------------------
#
//
// Add : -- Restrict Guest Access w/ message --
//
$lang['Sorry_auth_viewprofiles'] = 'Sorry, but only %s can view a member\'s profile on our forum.';
//
// End : -- Restrict Guest Access w/ message --
//
Back to top
View user's profile Send private message Visit poster's website

vas
New User

Joined: 22 Mar 2007
Posts: 6

PostPosted: February 22nd 2008, 2:33 pm    Post subject: Reply with quote

Ricky_Racer wrote:
Well, what do you say to, let us just restrict viewing profiles to logged in users ?


actually I dont want the username come with the link option.

I was able to do away with the link for the top posters block as follows

Code:

{most_posts.USERNAME} :: {most_posts.POSTS}&nbsp;{L_POSTS}<br /><br />


instead of

Code:

<a href="{most_posts.U_VIEWPROFILE}" class="genmed">{most_posts.USERNAME}</a> :: {most_posts.POSTS}&nbsp;{L_POSTS}


But unable to do so for "Last seen mod" Please help. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Portal Support and Discussion All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - PhotoshopForums.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - DrGregHouse.com - Bad Boy Blog - BadBoyForums.com - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2008. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.