Add post custom field
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
Sorry, at the moment custom fields are not part of the core of Bludit. You can try to write a plugin.
Last edited by Edi on Tue May 31, 2016 12:06 am, edited 1 time in total.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Hi,
you can add the field.
For example I added the field, source
edit bl-kernel/dbpost.class.php and add the field source
edit bl-kernel/admin/view/new-post.php and add
The name of the input text, need to be the same as the name of field.
you can add the field.
For example I added the field, source
edit bl-kernel/dbpost.class.php and add the field source
Code: Select all
private $dbFields = array(
'title'=> array('inFile'=>true, 'value'=>''),
'content'=> array('inFile'=>true, 'value'=>''),
'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
'status'=> array('inFile'=>false, 'value'=>'draft'),
'tags'=> array('inFile'=>false, 'value'=>array()),
'allowComments'=> array('inFile'=>false, 'value'=>0),
'date'=> array('inFile'=>false, 'value'=>''),
'dateModified'=> array('inFile'=>false, 'value'=>''),
'coverImage'=> array('inFile'=>false, 'value'=>''),
'source'=> array('inFile'=>false, 'value'=>'')
);
Code: Select all
HTML::formInputText(array(
'name'=>'source',
'value'=>'',
'class'=>'uk-width-1-1 uk-form-large',
'placeholder'=>'Source link'
));
I need document this kind of thingEdi wrote:Thank you, Diego!
So simple... Never thought of the possibilities of arrays.