Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2003, 03:30 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hide (The last post was form ?????) on Forum home page.

Hi all

I am after a hack for a private forum I have on the forum home page.
I am not hiding the forum from all, but I don?t want anyone to see who the last post was from in that forum.
I have seen this somewhere on a board but can?t remember where.

Any ideas



Lee
Reply With Quote
  #2  
Old 01-22-2003, 12:09 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please can anyone help me with this as i havent been able to find it anywhere.
Reply With Quote
  #3  
Old 01-22-2003, 05:32 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok. You could take that out but I am sure for the users that can see it you still want it... give me a sec.

There are two ways we can do this. Here are both of them.

##### 1 #####
-----------------------
in index.php find

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
and replace with

PHP Code:
        if ($forum['lastpost']>AND $bbuserinfo[usergroupid]!=0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
now in forumdisplay.php find

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
and replace with

PHP Code:
        if ($forum['lastpost']>AND $bbuserinfo[usergroupid]!=0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
-----------------------
############

OR

##### 2 #####
-----------------------
in index.php find

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
and replace with

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else if(
$bbuserinfo[usergroupid]==0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby2')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
in forumdisplay.php find

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
and replace with

PHP Code:
        if ($forum['lastpost']>0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
        } else if(
$bbuserinfo[usergroupid]==0) {
          
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
          
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
          eval(
"\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby2')."\";");
        } else {
          
$forum['lastpostinfo']='Never';
        } 
now make a new template and call it forumhome_lastpostby2 and place this within it.

Code:
	<table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink"><tr align="right">
		<td nowrap><smallfont>$forum[lastpostdate] <font color="#006000">$forum[lastposttime]</font>
		</smallfont></td>
		<td nowrap>&nbsp;<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><img src="https://vborg.vbsupport.ru/greentek/lastpost.gif" border="0" alt="Go to last post"></a></td>
	</tr></table>
-----------------------
############

Now in 1 its simple, but in 2 it gives you the option to still have last post info / or change what it will say instead.
Reply With Quote
  #4  
Old 01-22-2003, 09:23 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Neo
Thanks for the reply; I want to do this with two forums only.
Can I enter somewhere the forum ID's so that the rest of the site/forum is unaffected?

Anyway, thanks for taking the time to post the code. It is much appreciated.

Lee

PS, If you look at the bottom of my site you will see the two forums I want to change.
Site............
:bunny:
Reply With Quote
  #5  
Old 01-27-2003, 05:14 PM
XrayHead's Avatar
XrayHead XrayHead is offline
 
Join Date: Oct 2002
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi All
Can anyone else help with this problem i have?
Reply With Quote
  #6  
Old 09-13-2003, 03:09 PM
mauisun mauisun is offline
 
Join Date: Jul 2002
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the code works well for all the forums on the board, but I am with XrayHead on this one, how do I get this code to work for just 2 or 3 specific forums? or even just one forum fo rthat matter. I want the forum to be visible but locked to all but whom permissions are set for. but unfortunately, the last poster is listed, and if you follow that it shows the title of the last post. anyone please?
.....mauisun
Reply With Quote
  #7  
Old 12-05-2003, 02:21 AM
zsmom's Avatar
zsmom zsmom is offline
 
Join Date: Sep 2003
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love this to be able to work on just two or three forums as well. Anyone?
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 10:24 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.04151 seconds
  • Memory Usage 2,273KB
  • 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
  • (1)bbcode_code
  • (8)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete