|
Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews. |
Advertisement | |
Learn how to remove ads |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to add a new date field?
After reading through the documentation and looking through some of the module code, I haven't had much luck trying to create a module to add an additional date field.
First of all, is there an easy way to do this, like "Add Field" type "date" somewhere? If not, then am I correct in trying to create a new module for this field, or can this be done with template changes? I want to create one field named "Release Date" with a user input, validated date (mm-dd-yyyy or mm/dd/yyyy). It doesn't necessarily have to be a part of its' own module block, so it could just be displayed under the Article Title. It does, however, need to be a valid date variable, so I can eventually use it to sort by date or list X number of items based on this date field. Any advice is appreciated. Thank you. |
#2
|
||||
|
||||
Hey Marris, I am looking to impliment a way for people to add extra fields asin the user profile manager, however it wasnt really designed for that feature.
Did you read the tutorials in the GARS section? There are 2 on creating custom modules. |
#3
|
|||
|
|||
Quote:
A system for new fields like the User Profile Manager would be great. That would probably allow people to create 90% of the options they need without touching the module code. |
#4
|
||||
|
||||
yea, I agree. Truth be told, something like that didnt ever cross my mind while I was creating GARS. I figured it was easy enough to simply capture the data via the module system however its pretty obvious that only those familiar with html, PHP and GARS can do it as easy as they should be able to.
A custom profile field table for threads is exactly what the dr. ordered in this situation and would allo me to do things like the auction system much easier (yes, there is a GARS enabled auction system in the works. Please lord dont ask me for an ETA ) |
#5
|
|||
|
|||
Quote:
I just need to get a better handle on PHP/MySQL to get it to serve the requirements of my site design. |
#6
|
|||
|
|||
Well, I finally hammered out a basic date module. It takes a date value input in the numeric format MM/DD/YYYY, then displays the date in the GARS_mod_container.
There is rudimentary validation of the numeric input format, but it doesn't check if the date is within any realistic limits. If the input is left blank, the module displays "n/a". Here's the code, in case it can be of use to someone else: PHP Code:
product: GARS LITE type: Error mesasges var name: GARS_invalid_date_format CONTENT: PHP Code:
Last edited by Marris; 03-03-2006 at 07:22 AM.. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
date selector custom field won't allow dates before 1970 | Mark Seifert | Geek Article and Review System | 1 | 06-30-2009 06:00 PM |
Custom field, Date Slector | gldtn | Geek Article and Review System | 2 | 01-29-2008 12:44 PM |
Date Field errors | indie | Geek Article and Review System | 2 | 01-28-2008 07:38 AM |
Date saying December 31, 1969 for info block & date problem with thread preview | alldoulas | Geek Gazette | 0 | 08-04-2007 04:48 PM |
Release Date | jluerken | Geek Article and Review System | 1 | 10-24-2005 10:14 AM |