PDA

View Full Version : PrefIx/PostFIx question


bobby9101
06-02-2006, 07:44 PM
on the submit page, iw ould like to prefix www. and post fix /
similar to how the http:// is prefixed
how?

Boby
06-02-2006, 08:14 PM
Check submit.php

You should have something like this (depending of your version):
Content visible to registered users only.
Now insert following code before that:
Content visible to registered users only.
If you want to add www. in front of reciprocal url add this too:
Content visible to registered users only.
I would not reccomend to add the / at the end of an URL because it can end with .php or .html or whatever and you would break it with the /

Hope this helps.

Boby

bobby9101
06-02-2006, 08:21 PM
thanks man,
the post fix isn't a problem becasue i only accpet homepages
you think there is anyway i can check to make sure the page doesnt end in .php .html or have a domain.com/folder ?
that would be awesome so i dont have to deny a million sites that posted a non homepage

Boby
06-02-2006, 09:05 PM
Hmmm, try this one:
Content visible to registered users only.
It will check if a file is present in the URL with these endings:

.php, .php3, .php4, .php5
.htm, html, .shtm, .shtml
.cgi
.asp
.pl
.py
.xml
Variables submitted via URL won't hurt the script, you can submit even:
http://www.domain.com/index.php?foo=bar&milk=gotmilk&mark=all

And it will also check if a / is already placed on the end of the link.

Hope this is ok ;)

Boby

bobby9101
06-02-2006, 09:08 PM
so if it ends in .html it wont allow it?

Boby
06-02-2006, 09:10 PM
If it ends in any of the above file endings you won't have the / added on the end of the link.

bobby9101
06-02-2006, 09:12 PM
oh well that is still good.
suggestion for next release. make somehting in ACP that toggles if subfolder can be submitted

bobby9101
06-13-2006, 03:45 PM
Content visible to registered users only. when i add this
and add say: http://google.com
i get this error: The URL could not be validated. Either the page does not exist or the server cound not be contacted.
and the new url in the URL box is http://www.http://google.com (http://www.http://google.com???)