vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   CMS: exclude section from primary content (https://vborg.vbsupport.ru/showthread.php?t=250036)

scarex 09-06-2010 12:28 PM

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.

Rho'd Berth 11-29-2010 09:18 AM

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

scarex 11-29-2010 08:24 PM

Quote:

Originally Posted by Rho'd Berth (Post 2127069)
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 "


Fenriz 08-05-2011 08:21 AM

Could you be more specific plz. How to exclude f.e. "section 19" to be listed from cms home?

doopz 08-24-2011 02:17 PM

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?

Phases 05-24-2012 02:19 AM

I would really REALLY to exclude certain sections from aggregating on the main CMS page..


All times are GMT. The time now is 03:08 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.00946 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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