The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I would like to add two custom fields to CMS article. Read about hook feature in different articles. If i get some guidence on how to write a plugin or hook to add new fields would be very helpful. Please note that i am new to vb coding, so any help would be really great ![]() --------------- Added [DATE]1294315725[/DATE] at [TIME]1294315725[/TIME] --------------- Lynne, you have helped many with your answers. can you please help me with this one? or any other expert? please guide me in the right direction to make this change. appreciate your help ![]() |
#2
|
|||
|
|||
![]()
can someone help me on this? thank you
![]() |
#3
|
||||
|
||||
![]()
What do you mean by new fields - like User Profile Fields to show something from the user? Or like new fields to the article? Have you looked at the mods yet?
|
#4
|
|||
|
|||
![]() Quote:
I would like to add two new fields to the article: 1) External URL Link - This will be used in the <a href={}> on the article preview title. When the user click on the title header, they would be directly sent to the external url (deal link). I am running the deal site and it is very much needed (currently when the user clicks on the header it will open the article page and i don't want to do that for user friendly purposes) 2) Expired/Active Status - This field will be displayed next to the title in the article preview. If the deal is expired the status needs to changed. Hope i have given you the detail...let me know if any further information needed...I did looked into the Mods, but couldn't find the one for my need. Appreciate your help on this. ![]() |
#5
|
||||
|
||||
![]()
I can't tell you specifics since I haven't done this. But, you are going to want to be familiar with the cms_article table (maybe add a couple fields?) and then look at the code for content.php where the method is addcontent. You'll probably have to add your two new fields to an array so you can use the datamanager to add the content of those fields to the database.
|
#6
|
|||
|
|||
![]()
Lynne, thank you...did figured it out....
|
#7
|
|||
|
|||
![]()
It would be cool if someone could make this into a mod of some sort, so we don't have to hack the core files... as I am really looking to add some custom fields to CMS articles like that too!
|
#8
|
|||
|
|||
![]()
afaik, you have to edit a core file in order to add custom fields to the cms.
|
#9
|
|||
|
|||
![]() Quote:
Thanks! |
#10
|
|||
|
|||
![]()
hi,
you could start with "vbcms_content_article_inline" template edit. add the fields that you may want and then search for the existing field by name into the source files. you may get 3 or 4 files that you need to edit in order to make this thingwork. also you need to add fields in the database table cms_article. hope this helps. good luck! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|