Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User's local time in post! Details »»
User's local time in post!
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-08-2002 Last Update: Never Installs: 81
 
No support by the author.

A very simple hack, but I'm sure your users will like this.
With this you can display the local time for every user in their post. Look to the left to see the hack in action.

To install this hack download the attached file (localtimepost.hack.php), upload to your /admin folder and use vbHacker.

That's all I have to say... wow that was short.

Have fun that's what really matters!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 08-31-2002, 03:28 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you using $post['localtime'] or $post[localtime] to get the time?

Quote:
Originally posted by Ice Man_00
thx for the quick reply. But it still dosen`t work. Must have changed a lot since 2.2.5 then...
Reply With Quote
  #63  
Old 08-31-2002, 03:49 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reinstalled 2.2.7. Thanks again.
Reply With Quote
  #64  
Old 08-31-2002, 03:51 PM
Ice Man_00 Ice Man_00 is offline
 
Join Date: Jan 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you mean in my postbit template, this is what i use...

PHP Code:
    Location$post[field2]<br>
    
Local time$post[localtime]<br>
                
Local date$post[localdate]<br
    
Posts$post[posts]<br
Reply With Quote
  #65  
Old 08-31-2002, 03:57 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have $post[localtime] and it works for me
Reply With Quote
  #66  
Old 08-31-2002, 04:02 PM
Ice Man_00 Ice Man_00 is offline
 
Join Date: Jan 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since this is hacken into functions.php and is output in the postbit template. Is there anywhere else it gets the info from ?? Another file ??
Maybe there is something missing, somwhere..
Reply With Quote
  #67  
Old 11-11-2002, 05:01 AM
aykordeen aykordeen is offline
 
Join Date: Sep 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tried to install it several times on my 2.2.8 and I keep getting this error message:

Parse error: parse error in /home/www/mywebsite/forum/admin/functions.php on line 817

Fatal error: Call to undefined function: vbdate() in /home/www/mywebsite/forum/admin/sessions.php on line 399

Any ideas as to the cause?

Thanks.
Reply With Quote
  #68  
Old 12-06-2002, 05:30 PM
XFLBret XFLBret is offline
 
Join Date: May 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to make this work in the PM postbit as well?
Reply With Quote
  #69  
Old 01-05-2003, 07:34 PM
LangTuDaTinh LangTuDaTinh is offline
 
Join Date: Dec 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for a great hack

i modifed a bit since some of my user doesn't chage to their local time when register so

i added another option in

registeradult
registercoppa

by change to this

PHP Code:

        
<option value="0" >(GMTWestern Europe TimeLondonLisbon</option>
        <
option value="0.1" selected>Please select your local time</option
as u can see i changed default option to another option which value is 0.1.

so if user doesn't select their local time zone when they are registering, the value for time zone will be 0.0 instead of 0

i also modifed a bit in functions.php

PHP Code:

        
} else {
            
$post[signature] = "";
        }

        
/* User local time in post */
if ($post[timezoneoffset] =="0.1") {
    
$timetag="";
    
$timetabbr="";
    
$post[localtime]="";
}
else {
    global 
$timeoffset;
    
$post['localtime'] = date($timeformattime()+($post['timezoneoffset']-$timeoffset)*3600);
    
$timetag="Local Time: ";
    
$timetabbr="<br>";

then instead of put $post[localtime] in postbit, i will put

PHP Code:
$timetag$post[localtime]$timetabbr 
I also use these for Location and Bookmarks's hack.

if user doesn't specify a location then their location will not display in postbit and the same for bookmarks' hack.....check out my postbit.
Reply With Quote
  #70  
Old 03-03-2003, 01:55 PM
ChevyMan ChevyMan is offline
 
Join Date: Feb 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I installed this but I get an error. It has local time but after it says array [localtime] how can I fix this?

Thanks
Reply With Quote
  #71  
Old 03-08-2003, 07:12 AM
Sliderx's Avatar
Sliderx Sliderx is offline
 
Join Date: Nov 2002
Location: well near of my computer
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that great thx FireFly
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 03:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05608 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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