vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Exclude certain forums from "last post" (https://vborg.vbsupport.ru/showthread.php?t=275435)

JMEWLS` 12-13-2011 11:42 AM

Exclude certain forums from "last post"
 
I'm not talkiong about the latest posts or new posts etc. I mean the last post down the forum index. Can you use the "&exclude=x" code somewhere?

kh99 12-13-2011 04:39 PM

You could edit the forumhome_lastpostby template and surround all the code by a condition, like:

Code:

<vb:if condition="!in_array($lastpostinfo[forumid], array(1, 2, 3))">
// existing template
</vb:if>


and of course you'd replace 1, 2, 3 with the forumids you want to exclude.

JMEWLS` 12-14-2011 07:49 AM

Hey this will just remove the last post from the respectable forum? I'm saying that if there's a subforum within another forum...

Eg.

Forum 1
-- Forum1sub

In the last post, forum1sub will display under forum 1 in the main index? I just want to exclude this forum from the last post.

kh99 12-14-2011 08:42 AM

I'm not sure if you're asking a question or telling me that it's not working. It seems like the answer to your question is that it should only remove the last post from the forums that you list.

If you're saying that doesn't work like you wanted, please explain again.

JMEWLS` 12-14-2011 09:13 AM

Sorry mate. I don't want the last posts box to be removed.

I'm saying I don't want a subforum to be included in the last post. I think that when you have a sub forum within another forum the sub forum is included with the parents forums last posts.

For example... If I have:

Forum A
--Sub Forum A

And I post a thread in sub forum A. The thread will be displayed in the 'last post' in the main index. I don't want that forums posts to be included in the last post box.

kh99 12-14-2011 01:38 PM

OK, yeah, that's a lot different. I don't see any way to do that through options or a template edit.

If you're interested in doing some php programming, it looks like the last post that's displayed is determined by function fetch_last_post_array() in includes/functions_forumlist.php. The only hook before that is forumhome_start, and at that point you don't even know the parent forumid yet, so it would be a bit difficult to do it by plug-ins (although it probably could be done). It might be easier if you're willing to edit the functions_forumlist.php file.

JMEWLS` 12-14-2011 11:12 PM

How could I do this? I'm not very good with php though.


All times are GMT. The time now is 10:40 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.00985 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete