Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2009, 09:33 AM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Last Seen Online in Postbit vB 3.8.1

Hi all,

So I want to add last seen online to the postbit, there are no new mods for this and old ones do not seem to work.

I know where I add the code manually but if I copy paste the same code used in the member profile it shows the title but not the date, as if the $ command is only good for the member page.

Any ideas what I would use?
Reply With Quote
  #2  
Old 03-11-2009, 10:33 AM
BigJohnny's Avatar
BigJohnny BigJohnny is offline
 
Join Date: Jun 2006
Location: Canada
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its probably going to be either a $userinfo or a $prepared var, it would only be $prepared if vB has an existing variable for last seen online.

I had a problem with signatures in my memberinfo template, when I used $post[signature] it would return the sig, but if there was a sig pic it would only show the bbcode tags for sig pics.

I found out that memberinfo already had a sig part, so I used $prepared[signature] and it displayed the sig with pics, because vbulletin has already "prepared" the signature.
Reply With Quote
  #3  
Old 03-11-2009, 10:51 AM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neither work.
Reply With Quote
  #4  
Old 03-11-2009, 02:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I posted over on vb.com, you'll need to use $post or $userinfo. However, the code you posted over on vb.com isn't going to work as is. You have a bunch of variables in it that aren't defined for use in the postbit. You will have to simplify it quite a bit.


edit: Someone posted this in another thread. It may work for you:
HTML Code:
<div>$vbphrase[last_seen_online]: $post[lastseen_date] $post[lastseen_time]</div>
You may have to create that phrase or just use text. And, I'm not sure if those are actual working variables or ones he created using a plugin. Try substituting variables that you were going to use in there.
Reply With Quote
  #5  
Old 03-11-2009, 02:15 PM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, doesn't work thanks anyway.
Reply With Quote
  #6  
Old 03-11-2009, 02:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You know, simply saying "doesn't work" isn't going to help us to help you. You need to post the code you are using with a couple of lines before and after your code if you want us to help you debug it. Also, post your plugin code (and location) so we can see how you are getting these variables.
Reply With Quote
  #7  
Old 03-11-2009, 02:42 PM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm just placeing it in postbit under join date.

Code:
<div>$vbphrase[last_seen_online]: $post[lastseen_date] $post[lastseen_time]</div>
The : shows but the data doesn't so the $varibles are not right, otherwise code is fine.

Likewise saying 'just create a plugin is not helpful. What does one put in this plugin?
Reply With Quote
  #8  
Old 03-11-2009, 02:57 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought you were trying other variable names at first? Not $post[lastseen_date]. I thought you had some names from the memberinfo template that you were trying ($post[lastactivitydate] or $post[lastactivitytime]?). I never said to just create a plugin - I don't know if you need one. I did say that if you do have a plugin, you need to post your code for us to see.

And I know that phrase is not available because I checked - which is why I said you would have to create it or use text.
Reply With Quote
  #9  
Old 03-11-2009, 03:05 PM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<div>$vbphrase[last_seen_online]: $userinfo[lastactivitydate] $userinfo[lastactivitytime]</div>
Yeah, these are the other ones, i posted them over at vb.com, they do not work either. The phrase is not a problem, i can just use text. It's the data pulled that is important.
Reply With Quote
  #10  
Old 03-11-2009, 03:13 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then it sounds like you will need to write a plugin to define the variables you want to use. You'll probably want to use one of the postbit_* hook locations. You should look in the code to see what variables are available at each location. If you have a date available, then you should be able to format it using something like (this is taken from a mod I wrote and you'll have to change it a little bit, I'm sure):
PHP Code:
            $user['date'] = vbdate($this->registry->options['dateformat'],$user['dateline']);            
            
$user['time'] = vbdate($this->registry->options['timeformat'], $user['dateline']);
            
$userdateline $user['date'] .' '$user['time']; 
And then you would use $userdateline in the template. As I said though, take a look in the code around the hook location to see what the names of the variables are that you would use in your plugin.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:28 AM.


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.04046 seconds
  • Memory Usage 2,257KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete