The vB Geek

The vB Geek (
-   Geek Article and Review System (
-   -   Custom Fields (

powerful_rogue 01-07-2008 11:05 AM

Custom Fields

Ive had a look at the wiki on how to create custom fields, however it comes up with an error.

Id like to create a custom field that allows the user to input the following information:

Contact Name:
Contact Number:

I want this to be optional information, so if a person only fills out the Contact Name and Contact Number then the Location box wont show.Alternativly, if they dont fill out any then none of them will show.

Ive had a look around, but a bit stumped at the moment.
If anyone can help it will be greatly appreciated.

Edit - Also once ive created a custom field - It comes up with "GARS3" Where abouts do I need to insert this to get it to show when someone is creating a new "Club/Group"

Morgan 01-07-2008 04:39 PM

Use Custom Fields to add custom fields. Go to Modules, pick the module of interest, add Custom Fields where you want them to show, click the Custom Fields link that appears afterwards, select Yes to those custom fields of interest, save, and then go to Types, pick the modules set, and tick the custom fields you want.

powerful_rogue 01-07-2008 07:20 PM

1 Attachment(s)
Thanks Morgan, That works great. :)

Is it possible to create mutiple text boxes under one custom field?

I want to create:

Group Contact: Enter Name
Contact Number: Telephone
Location of Meetings: Address

At present the only way I can see of doing it is by creating a custom field for each, but then when its being displayed it will look silly as you'll have a large box for each as shown in the attachment.

Id prefer to have them all shown in one box so it looks tidy.

Morgan 01-08-2008 02:18 PM

Custom fields should show in one box unless I am misunderstanding what you are trying to do.

powerful_rogue 01-09-2008 08:23 AM

Thanks Morgan.
Ive worked it out now and its going great :)

powerful_rogue 01-09-2008 08:55 AM

3 Attachment(s)
One quick question if you dont mind Morgan,

Ive set up another "Web Address" custom field for my "Clubs/Groups" section but made it "Not Required" as im guessing not all local clubs/groups will have a website.

It works great if you put the web address in, it grabs the snapshot and such like, however if you dont put the web address in it shows as in the attachments.

Would there be anyway of altering it, so that if a web adress isnt entered, it dosent show those custom fields (numbered 1 +2) in the pictures?

Also, is it possible to have an "Upload Image" - So that if no web address is entered, it will show the image uploaded where the snapshot shows, however if they do input a web address it shows the snapshot instead?

Last point which im guessing wouldnt be possible, but no harm in asking! If the do upload a picture and input a web adress - Is it possible to give the member an option as to which they would like to show as the picture? Ie, the snapshot of the website or the upload picture!

Morgan 01-09-2008 08:45 PM

Seems you want to change the default behavior of the add-on. For that you'd probably need to edit at least some of the snap.php files, not something for support but maybe something to consider for a future version, or consider using a 'Thumbnail to URL' custom field instead.

powerful_rogue 01-10-2008 10:44 AM

Thanks Moragn.

At the moment if you dont put in a website, it now comes up with the "preview not available" picture. If I used an if conditional somehwhere would it work to not display the web address button if no web address has been entered?

Morgan 01-10-2008 02:21 PM

Untested but you could try adding the bold red bit to the /geek/gars/mods/display/snap.php file:

if (THIS_SCRIPT == "showthread" && $post['gars_snap_www'] && $post['gars_snap_www'] != 'http://')
Please note that custom edits are not something for support but maybe something to consider for a future version.

All times are GMT. The time now is 04:54 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.