July 2nd, 2007phpLinkBid Deep links MOD - optional fields
Instead of updating the phplb deep links mod, I prefer to post this here to leave both options available. Either deeplinks should be required, this was done in the previous mod or optional, instructions below.
Step 1: Apply the mod in phpLinkBid Deep links MOD
Step 2:
1. in file buy.php
FIND:
$kForm->addRule('link_deep_title1', 'title');
$kForm->addRule('link_deep_title2', 'title');
$kForm->addRule('link_deep_title3', 'title');
$kForm->addRule('link_deep_url1', 'url');
$kForm->addRule('link_deep_url2', 'url');
$kForm->addRule('link_deep_url3', 'url');
REPLACE BY
$kForm->addRule('link_deep_title1', 'deep-title');
$kForm->addRule('link_deep_title2', 'deep-title');
$kForm->addRule('link_deep_title3', 'deep-title');
$kForm->addRule('link_deep_url1', 'deep-url');
$kForm->addRule('link_deep_url2', 'deep-url');
$kForm->addRule('link_deep_url3', 'deep-url');
2. in /klib/class.kForm.php
FIND
case 'url':
if(!$validate->is_url($data[$name]))
$this->controls[$name]['errors'][] = 'Invalid URL';
break;
AFTER IT ADD
case 'deep-url':
if(!$validate->is_url($data[$name]) && ($data[$name] != 'http://'))
$this->controls[$name]['errors'][] = 'Invalid URL';
break;
case 'deep-title':
if(!$validate->is_title($data[$name]) && ($data[$name]))
$this->controls[$name]['errors'][] = 'Invalid title';
break;
2 Responses to “phpLinkBid Deep links MOD - optional fields”
Leave a Reply
You must be logged in to post a comment.

July 6th, 2007 at 7:31 pm
Installed this mod too:) Thank you very much
July 28th, 2007 at 9:24 am
Have installed this. Thanks
I would like to have some show/hide sliding effect, if deeplinks are optional.
cheers