Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2010, 12:28 PM
scarex scarex is offline
 
Join Date: Aug 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default CMS: exclude section from primary content

Hi everybody.

I was wondering if it was possibile, in some way, to configure CMS Front Page Primary Content in order to fetch articles ONLY from e selectable subset of sections.

I look for informations, finding several threads on vbulletin.com:
For instance: this one or this one

this one is the most interesting...

Anyway, it seems (even after a long trial session with my vbulletin installation) that's it's not possible: you can choose to display article from ALL subsections, or to display articles only from current section.

Is it correct?

Does anybody the same issue and already tried to create a mod for this or now in which file the query is written, in order to perform such "exclusion" directly in code?

Thanks

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

Found it.

The query is performed in file packages/vbcms/collection/content/section.php

Adding the condition "AND node.parentnode NOT IN (SectionID_List)" to ON clause, it works.
Reply With Quote
  #2  
Old 11-29-2010, 09:18 AM
Rho'd Berth Rho'd Berth is offline
 
Join Date: Oct 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi scarex,

Can you please explain a bit more how you fixed it?
What change should I make in the section.php file? Where should I make it?

Thanks in advance,

Robert
Reply With Quote
  #3  
Old 11-29-2010, 08:24 PM
scarex scarex is offline
 
Join Date: Aug 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Rho'd Berth View Post
Hi scarex,

Can you please explain a bit more how you fixed it?
What change should I make in the section.php file? Where should I make it?

Thanks in advance,

Robert
I've edited packages/vbcms/collection/content/section.php. In 4.0.8 release, in getLoadQuery function you can find the query in $sql variable.

Before $sql statement, I declared the following variable

PHP Code:
$restriction ="AND node.parentnode NOT IN (5,154)"
and I used it in $sql statement

PHP Code:
" INNER JOIN " TABLE_PREFIX "cms_node AS rootnode
ON rootnode.nodeid = " 
intval($this->filter_node) .
$restriction AND (node.nodeleft >= rootnode.nodeleft AND node.nodeleft <= rootnode.noderight) AND node.nodeleft != rootnode.nodeleft "
Reply With Quote
  #4  
Old 08-05-2011, 08:21 AM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you be more specific plz. How to exclude f.e. "section 19" to be listed from cms home?
Reply With Quote
  #5  
Old 08-24-2011, 02:17 PM
doopz doopz is offline
 
Join Date: Feb 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, so this removes the whole section, not just from the CMS home.
anyone else any suggestion on how to not display a certain section on the CMS index, but do allow the section to be viewed?
Reply With Quote
  #6  
Old 05-24-2012, 02:19 AM
Phases Phases is offline
 
Join Date: Dec 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would really REALLY to exclude certain sections from aggregating on the main CMS page..
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 02:39 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.05036 seconds
  • Memory Usage 2,209KB
  • 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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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