Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / URL Field - Remove Autofill of the http://

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

URL Field - Remove Autofill of the http://

More
12 years 1 month ago - 12 years 1 month ago #6964 by ilinear
Replied by ilinear on topic URL Field - Remove Autofill of the http://
Hi loic,

Example, when open a webpage ( booking.com ), and copy the link, the result when I paste here is show as below:

http:// + www.booking.com

same, If I paste this link at your adsmanager url field, the outcome will be http://http://www.booking.com

It's automatically has http://

that's y, from the previous code I post, I remove (http://), so when user post their website url at adsmanager url field, it will no problem to link to the target page.

But, when users key in www.booking.com at adsmanger url field, without http:// in front, then it will broken again.

I think I will remain this solution, and show a note to remind my user to insert with http:// for their website.

Thanks for your Patience and support.

Appreciating.

Thank You.
Last edit: 12 years 1 month ago by ilinear.
The following user(s) said Thank You: adarr
More
12 years 1 month ago #6968 by loic
Hello,

To avoid this kind of problem. You can undo the modification of you code so http:// will be added no matter what.

Then, just before the line, you've modifyed add this code:
$value = 'http://'.$value;
$value = str_replace('http://http://','http://',$value);

The block will look like that:
if ((isset($field->link_text))&&($field->link_text != ""))
    $linkObj = $field->link_text;
else if ((isset($field->link_image))&&(file_exists(JPATH_BASE."/images/com_adsmanager/fields/".$field->link_image)))
    $linkObj = "<img src='".$this->baseurl."images/com_adsmanager/fields/".$field->link_image."' />";
else
{
    $linkObj = $value;
}
if ($value != "")
{
    $value = 'http://'.$value;
    $value = str_replace('http://http://','http://',$value);
    $return .= "<a href='$value' target='_blank'>$linkObj</a>";
}

This will update every link with a twice http and replace it with just one.
The following user(s) said Thank You: ilinear, adarr
More
12 years 1 month ago #6984 by ilinear
Replied by ilinear on topic URL Field - Remove Autofill of the http://
Hi loic,

Exactly what I looking for!!

Thank you very much for your guide and support !!

Finally problem solve d T_T~~~~

TQ
The following user(s) said Thank You: adarr
More
12 years 1 month ago #6995 by tompap
Replied by tompap on topic URL Field - Remove Autofill of the http://
If you like our work, don't hesitate to post a review on extensions.joomla.org, it's the best to help us to improve our software !!
The following user(s) said Thank You: ilinear, adarr
Moderators: perry
Time to create page: 0.923 seconds
Powered by Kunena Forum