vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post Timestamp Visibility (https://vborg.vbsupport.ru/showthread.php?t=272961)

Prisoner 10-28-2011 11:42 AM

Post Timestamp Visibility
 
Is there any mod that would allow only admins or select groups to see the timestamp of a message?

Lynne 10-28-2011 02:14 PM

I've never heard of one. I would imagine you could just put a condition around the timestamp in the postbit. Or write a plugin to do the same thing (with no template edit)

hook location - postbit_display_complete
PHP Code:

if (!is_member_of($vbulletin->userinfo,6)) 
{
$post['posttime'] = ' ';
$post['postdate'] = ' ';


Modify to suite your needs.

Prisoner 10-28-2011 03:06 PM

Thank you, I will try it.

--------------- Added [DATE]1319899447[/DATE] at [TIME]1319899447[/TIME] ---------------

I'm sorry, I looked for the lines above, posttime and postdate, but couldn't find them. Are they in the postbit template.

Am I looking in the right place?

Prisoner 10-30-2011 10:07 AM

I found it, applied it by creating the plugin, but the time and date wasn't visible for anyone.

BirdOPrey5 10-30-2011 10:19 AM

It works for me, what was the exact code you used?

Prisoner 10-30-2011 10:41 AM

Exactly as she had in the example, tried it with '6' and '22' my webmaster usergroup.

PHP Code:

if (!is_member_of($vbulletin->userinfo,22)) 
{
$post['posttime'] = ' ';
$post['postdate'] = ' ';



BirdOPrey5 10-30-2011 10:44 AM

6 is the admin usergroup- usually. As it was written ONLY users in group 6 should see the date.

Prisoner 10-30-2011 11:12 AM

Maybe it's because I use two groups, Administrators and Webmaster. Will try it in a few.

BirdOPrey5 10-30-2011 12:35 PM

This would be the line for both groups:

Code:

if (!is_member_of($vbulletin->userinfo, 6, 22))

Prisoner 10-30-2011 02:27 PM

Still the same, no matter which group I put in there, it disappears for everyone.

When I make the plugin inactive, it comes back. When I take the Date line out of it, just the date shows.

I must be missing something.

Sorry to be such a bother.


All times are GMT. The time now is 02:25 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.01913 seconds
  • Memory Usage 1,733KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete