1. I make URL field not required in add_form
2. On detail page printing URL: http://
Where I must paste script something like
Sorry my englishPHP Code:if ($url == "http://") $url = "";
PS
IndexU v. 3.04
1. I make URL field not required in add_form
2. On detail page printing URL: http://
Where I must paste script something like
Sorry my englishPHP Code:if ($url == "http://") $url = "";
PS
IndexU v. 3.04
Hi,
From my understanding of this, you don't need the url field to show up the detail template?
You have two options:
1) If you don't require the url field at all then you can remove it from the detail_link.html template.
2) In the admin area, when you add a link, just delete the "http://" from the url field and that will remove it from the links that don't require it.
I'm sure there are other ways using php but those seem to be the easiest as far as i can see.
Also, and not sure if this is applicable, but if you do not require the url field to be submitted from add.php then you'll need to open up add.php and remove this line (line 158)
elseif(empty($url) || $url == 'http://') $error_msg = $msg["10102"];
that will save you getting an error message, when a link is added via your site.
Hope it helps
Rob
I've commented our the line (see below) in add.php and modify.php:
elseif(empty($url) || $url == 'http://') $error_msg = $msg["10102"];
I've tried to just delete the http:// on those links for businesses that do not have websites.
In both instatnces, I am still getting the error "URL is required."
NOTHING IS WORKING!
I would like the option to list a business' url if they have one or to not list one if one does not exist. Can someone help me?
you need to edit the idx_link and idx_link_temp tables with something like phpmyadmin and change the Null column from NOT NULL TO NULL
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
That did the trick...although I still get the "URL is Required" error when I delete the "http://" when entering a link.
However, I have found that I can delete the "http" and insert a space (hit the space bar once) in the URL field. This allows me to avoid the "URL is required" message and I end up with an empty URL field when detail_link is displayed.
That will work for me.
Thanks for your help!
Hi,
I've always run my programs without the need for the URL field. The easiest way is to remove line 158 in add.php.
If you are still getting up the error message then open up msg.php and delete the info that runs element 10102, failing that if you do not want any error messages to show up at all, just take the error msg out of the add templates.
Rob
Hi Rob,
I figured out my problem. I had to comment out
elseif(empty($url)) $error_msg = $msg["20072"]
which is Line 70 in link_edit.php.
No more URL field is required message.
Thanks!
I love the idea that the first post had,
if ($url == "http://") $url = "";
Could it be something like
if ($url == "http://") $url = "No Website";
Where would be the best place to add that kinda code....
add.php and modify.php:
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.