Custom Fields
7 Attachment(s)
Here I am going to cover the basics of creating Custom Fields in GARS 2.0
Please note that this documentation was created for GARS 2.0 Beta 2. It may not be 100% up to date and things may change as future versions come out. Step 1 Create a custom field To create a custom field, click admincp->gars->custom fields->add new Choose the type of custom field you want to create. Please note that you can not change the type after you created it - however you can always delete and create another! Here is a quick overview of each type at time of writing this:
Step 2 Assign the custom field to one or more types. Edit the types you want to assign the custom field to (admincp->gars->types). At the bottom of the page, you will see all available types that you can assign. Assign by ticking the box next to the custom field and clicking Save. From that stage, the fields will be available when editing and creating a new GARS controlled thread. Step 3 Displaying the values of your custom fields Make sure you have the custom_fields.php module registered. go to admincp->gars->modules Check the bottom section (Registered modules) to see if you have Custom Fields there. If not, then add it by clicking Register New Module and adding the following settings: PHP Code:
This will make the custom fields module available to your module sets. Step 4 Add Custom Fields to your module sets Edit a module set making sure you are on the showthread page. Scroll to the bottom of the page and in the left selection box, choose Custom Fields, then the position you want to place it. Click Save and the Custom Fields module will be in position. Edit the Custom Fields module settings page by clicking it's name (or by selecting edit from the drop down menu next to its name). Here you can edit the title for the module box when it displays. You can also select which Custom Fields display along with an optional caption. You can also overwrite the templates GARS uses to display the custom fields. Leave the template settings blank for the default. |
when making a custom template for a field.whats the varible for the value of the field ?
|
Sorry, you lost me :)
|
when adding a custom field to the custom module it offers you the option to use a template ? how do thouse templates work ?
|
What it does is allow you to override the default template for displaying the item or hosing the module.
That gives you the ability to do something far cooler then simply showing the text results. The standard results for that module are displayed in GARS_custom_row. |
very good
this tutorial is very clear and useful,
but my first tentative fails...when i will display in my personal module set - he don't appears! what i do wrong? :confused: tks beduino |
If the custom fields appear when creating/editing a thread but do not appear when viewing a thread... the most common culprit is your Custom Fields module settings.
Edit the module set for the type in question. On the showthread page of the module set, click the Custom Field module (if the module isnt there, you need to add it) Tick each field you want to display. Save it and bob should be your uncle. HTHs |
it helps!
Well,
I'm learning the use of GARS.:o In fact the 'custom fields' is to author, and no to comments of viewers and users. IMHO this mod is one of better licences I have ! :) All the best, Beduino ps. a lot of questions will be come :rolleyes: |
I have another challange: I want to display the Value of the custom-field inside of another template. Well, to be clear: Behind the picture displayed should be a link and a part of the link is the custom-field.
The custom-field is named "test" and the content of one of the posts is "12345". Now I want to have a link in the postbit which is built up like this: www.abcde.de/index.php&test=12345&somethingelse I´d like to get this in the way of: Quote:
Best wishes, Julian! |
It should be fine. instead of $table[test], try $post[gars1] (where gars1 is the field name)
HTHs |
All times are GMT. The time now is 03:25 PM. |
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Tutorial powered by GARS 2.1.9 ©2005-2006