vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Add fields to CMS articles (https://vborg.vbsupport.ru/showthread.php?t=282329)

firebrand media 05-02-2012 07:59 PM

Add fields to CMS articles
 
I need to pull "featured" articles to a home page.

I was advised:
Quote:

Best way would be:
-adding a custom variable to articles. Featured? Yes/No.
Then you can edit an article and toggle this variable.
- Then make an widget that grabs the articles with featured variable yes. Then you can display them in a slideshow or whatever means you see fit.
I'm new to serious vBulletin hacking so I have a bunch of questions:
  • How does one one add a "custom variable" to an article? These terms are too generic to yield useful searches. :) I don't see anything in the UI, so I'm assuming I need to add some code, but where?
  • How do I access these custom variables? Do I need to do something to the database, or is that all handled?
I'm certainly not afraid to code, I just need some documentation on how this stuff works.

Lynne 05-02-2012 08:51 PM

You may want to see this article - How to add a new field to the CMS

firebrand media 05-03-2012 02:41 PM

I added this question to that article's thread, but you lost me on step 1.
Quote:

Create a new field in cms_node
Could you add an appropriate article link to that thread?

Lynne 05-03-2012 03:03 PM

cms_node is a table in the database. So, you need to add your custom field to the table.


All times are GMT. The time now is 05: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.01204 seconds
  • Memory Usage 1,713KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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