Show Bid Request
Simple Templater
Bid Request Id: 54507
|
|
|
Posted by: |
marktacchi (4 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Above Average - 33.33%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Mar 24, 2003 10:12:33 PM EDT
|
Bidding Closes: |
Mar 26, 2003 8:36:36 PM EDT
|
Viewed (by coders): |
130 times
|
Deadline: |
3/28/2003
TIME EXPIRED
|
|
|
|
Description:
I need to create a file called 'templater.php' with a function in it called 'processTemplate()'. This function reads in a specified template file, parses through the file to check if values have been supplied and returns the processed file.
Note that this function must support nested IFs.
FILE: TEMPLATE1.HTML ------------------------------ include ('templater.php');
$array['APPLES'] = 'y'; $array['MAC']= 'Y'; $array['RED_DELI']= 'Y';
echo processTemplate('/tmp/template/template.html',$array);
FILE: TEMPLATE2.HTML ------------------------------ include ('templater.php');
$array['APPLES'] = 'N';
echo processTemplate('/tmp/template/template.html',$array);
FILE: TEMPLATE.TXT ------------------------------ Hello, here's some fruit! [IF APPLES] I got apples! [IF MAC] It's a Mac[ENDIF] [IF RED_DELI]It's red delicious[ENDIF] [ELSE] Sorry, No Apples [ENDIF]
OUTPUT 1: ------------------------------ Hello, here's some fruit! I got apples! It's a Mac It's red delicious
OUTPUT 2: ------------------------------ Sorry, No Apples
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
PHP
Must be 100% finished and received by buyer on:
Mar 28, 2003 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$36 (USD)
|
Mar 25, 2003 5:42:36 PM EDT
|
10
(Excellent)
|
|
|
Actually, I have your problem solved. The script is ready. You can test it here: http://www.ms-soft.pl/~mirek/temptest.php There's no syntax error checking, it just assumes that template syntax is correct, so if you try incorrect syntax, the results will be unpredictable, although the script should never hang. Of course if you wish, I can add syntax checking. Keywords in template are case insensitive.
Hope you'll like it. Greets, Mirek
|
|
|
|
|
|