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)

BirdOPrey5 10-30-2011 08:32 PM

Quote:

Originally Posted by Prisoner (Post 2262996)
Thanks!

We forgot 1 important line in the code-

Code:

global $vbulletin;

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

Working now. :)

Prisoner 10-30-2011 08:51 PM

Thanks for hanging in there with me all day! It looks like it's working.

Prisoner 11-01-2011 06:41 PM

I hate to ask for more help but, what are the hooks for the time display on the ForumHome and Thread Display?

BirdOPrey5 11-01-2011 07:27 PM

Probably forumhome_complete and threadbit_process...

However you also need to change the variable, $post only works in postbit.

For forumhome it looks like:

$lastpostinfo['lastpostdate']

and for threadbit it looks like:

$thread['lastpostdate']

The way I did this by the way for future reference was to go to Admin CP -> Options -> General Settings -> Add Template Name in HTML Comments -> set to YES

Then load the pages you are curios about- in the source of the page will be comments saying what template the data is coming from.

Then I look in that template and see the variables being used where I want-

Template variables either look like {vb: raw thread.lastpostdate} or $thread['lastpostdate'] depending how they are used... but in plugins and php files they are ALWAYS the latter.

Prisoner 11-02-2011 12:28 PM

Thanks, I am trying to figure it out now.

Prisoner 11-04-2011 03:33 AM

I have it working in threadbit_process. I just had to change the variable to ['lastposttime'] in order to remove the time.

Just not able to find it in Forumhome.

BirdOPrey5 11-04-2011 11:56 AM

What code do you have for the forumhome_complete plugin?

Prisoner 11-04-2011 12:23 PM

This is one of many that I have tried.

PHP Code:

global $vbulletin;

if (!
is_member_of($vbulletin->userinfo6))

  
$lastpostinfo['lastpostdate'] = ' ';


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

Haha! I'm learning...or lucky. It olny took me three tries to get it off the Search Results Page with.

search_results_threadbit

PHP Code:

global $vbulletin

if (!
is_member_of($vbulletin->userinfo6)) 
{  
  
$thread['lastposttime'] = ' '



BirdOPrey5 11-04-2011 09:54 PM

Been looking at forumhome... seems to be a very unusual situation here. First the actual hook would have been forumbit_display, not forumhome_complete. But even that doesn't work. There is no hook to let us alter the date/time on this page.

Instead you will need to edit the template directly.

In your style manger choose your style -> edit templates

Find the template: forumhome_lastpostby

Find the code:
Code:

<div align="$stylevar[right]" style="white-space:nowrap">
                $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
                <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
        </div>

and change it to:

Code:

<div align="$stylevar[right]" style="white-space:nowrap">
                <if condition="is_member_of($bbuserinfo, 6, 22)">$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if></if>
                <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
        </div>

(added code in red)

Prisoner 11-05-2011 02:00 AM

Thanks again, I'll give it a try.


All times are GMT. The time now is 07:30 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.01956 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_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