vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   How to add a new field to the CMS (https://vborg.vbsupport.ru/showthread.php?t=257589)

firebrand media 05-03-2012 10:17 PM

Ah...
So I just add a column to the cms_node table?
Easy enough.

This is my first foray into vBulletin modding and I just get nervous about operating with a chainsaw. :)

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

Sorry for the noob questions.
Quote:

2.
Open packages\vbcms\item\content.php and find:
If I edit conten.php, isn't the change going to get blown away when update vBulletin?

kh99 05-04-2012 12:23 AM

Quote:

Originally Posted by firebrand media (Post 2325997)
If I edit conten.php, isn't the change going to get blown away when update vBulletin?

Yes. That's why it's good to use plugins when possible, but there isn't always a hook location in place to do what you want to do.

Lynne 05-04-2012 01:29 AM

And this is why you should always keep notes when editing your site.

ragtek 05-04-2012 06:56 PM

anybody got this running without editing the files?

charlesr 05-05-2012 07:24 AM

I don't think it's possible because there is no hook location to call via a plugin product.

ragtek 05-05-2012 10:39 AM

1. edit isn't necessary => hook vbcms_content_publish_editor
2. template edit is fine, who cares about this ( tms^^ )

but everythng else seems to be impossible
shame that they still didn't change this:(

Yellow Slider 05-27-2012 05:20 PM

Quote:

Originally Posted by ragtek (Post 2326414)
1. edit isn't necessary => hook vbcms_content_publish_editor
2. template edit is fine, who cares about this ( tms^^ )

but everythng else seems to be impossible
shame that they still didn't change this:(

Yep, it took a year but they finally added the hook. I've updated the relevant step.

I guess I should have asked them to add some other hooks back then, cause if I open a new hook request now, vB 5 would be out by the time the hooks get added :)

christleo 12-22-2012 02:08 PM

Quote:

Originally Posted by HouseAddict (Post 2154482)
And that's a short guide?

Geez... I just spent almost an hour going through it and trying it out without any success.

Tsk, why does this have to be so darn complicated...

Hmm, how can I extend that $pub_view array to be available to other templates, not just vbcms_edit_publisher (as defined in content.php) in an easier manner...

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

It seems that I am having some issue with spitting out the value in the front-end as well... adding that code to vbcms_content_article_page prints out nothing.

Seems the root of the problem is $view->FIELDNAME = $this->content->getFIELDNAME(); in the plugin attached to vbcms_article_populate_start... as if I change that $view->FIELDNAME value to a constant, I get a value out on the front-end and in all the other templates (weird). If I leave it as $this->content->getFIELDNAME(), it ends up blank.


Having the same issue... $this->content->getFIELDNAME() seems like giving me blank too...

pczone 04-25-2014 08:38 AM

I also blank too , I try to fixed and works.

edit:
packages/vbcms/item/content/article.php

find:
Code:

$sql = "SELECT node.nodeid, node.showrating, node.setpublish, node.new
add node.FIELDNAME, at the end of the line:
Code:

$sql = "SELECT node.nodeid, node.showrating, node.setpublish, node.new,node.FIELDNAME,

BlackxRam 06-07-2015 01:12 AM

Can anyone confirm that this mod still works? How many custom fields does this add to articles in your CMS?


All times are GMT. The time now is 08:02 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.01160 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete