vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Trying to modify "Forum Leaders" page (https://vborg.vbsupport.ru/showthread.php?t=110440)

bryanb 03-15-2006 10:20 AM

Trying to modify "Forum Leaders" page
 
I'm a total newbie at this, so please bear with me. I'm trying to add additional information on the "Forum Leaders" page. Specifically last activity date and time, and sign up date. I've added the following in showgroups.php (I borrowed this from members.php):

PHP Code:

// LAST ACTIVITY AND LAST VISIT
if (!$userinfo['invisible'] OR ($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) OR $userinfo['userid'] == $vbulletin->userinfo['userid'])
{
    
$show['lastactivity'] = true;
    
$userinfo['lastactivitydate'] = vbdate($vbulletin->options['dateformat'], $userinfo['lastactivity'], true);
    
$userinfo['lastactivitytime'] = vbdate($vbulletin->options['timeformat'], $userinfo['lastactivity'], true);
}
else
{
    
$show['lastactivity'] = false;
    
$userinfo['lastactivitydate'] = '';
    
$userinfo['lastactivitytime'] = '';


and in the showgroup_usergroupbit template I've added:

$user[lastactivity]

The problem is that a date/time stamp shows up instead of a normal date. Can anyone tell me what I'm doing wrong?

Now I've removed the code that I modified the php file with - back to its near orginal state - and the date time stamp still appears. I guess I'm using the wrong $user code. Any help? Thanks in advance.

Akex 03-15-2006 11:24 AM

You are in the good way ;)

Just put this in your code :

$user['lastactivity_date'] = vbdate($vbulletin->options['dateformat'], $user['lastactivity']);
$user['lastactivity_time'] = vbdate($vbulletin->options['timeformat'], $user['lastactivity']);

Then put $user[lastactivity_date] and $user[lastactivity_time] in showgroup_usergroupbit template :).

Not tested it, but I think it will work.

bryanb 03-15-2006 11:54 AM

Thanks! But I tried this, and it gave blank results.

I reverted back to $user[joindate] and $user[lastactivity] and I'm still getting date and time stamp (1101726000, etc.) I tried searching this forum here at .org because I think I saw someone who had this problem before - I can't seem to find the thread. Is there a switch somewhere in the administrator control panel, or is there something off in the code somewhere?

Found it: $user[lastonline]

This works fine!


All times are GMT. The time now is 04:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00979 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete