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 / Support / AdsManager Support / How to add URL field valur to image

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.

How to add URL field valur to image

More
10 years 8 months ago - 10 years 8 months ago #18561 by tillhunter
How to add URL field valur to image was created by tillhunter
Hello
I need set value in url field as ads image link. When click on image it goes to url field link.
In details_json file i set like that

$visitsite2 = $this->content->ad_visitsite;

and set

<li>
<span class="alignver"></span>
<a href="<?php echo $visitsite2; ?>" target="_blank"><img u="image" src="<?php echo $image?>" /></a>
</li>
It generate links like that mysite.com/ad_visitsite value. And in result when click on image i get error because link is incorrect
How to set it correct?
Last edit: 10 years 8 months ago by tillhunter.
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18577 by loic
Replied by loic on topic How to add URL field valur to image
Hello,

Could you give me the link displayed by the variable $visitsite2 ?

Best regards.
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18581 by tillhunter
Replied by tillhunter on topic How to add URL field valur to image
Hi.
Now i change style to standart default file. I will use this style and need add link to this file. Just for now i am changing it to default_json for you.

hithoster.com
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18587 by loic
Replied by loic on topic How to add URL field valur to image
Hello,

I don't have the error you had in your first post. The link on the button 'Visit Site' redirect me to another website.

Also, if you still have the error, try to add 'http://' just before the link.

Best regards.
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18590 by tillhunter
Replied by tillhunter on topic How to add URL field value to image
Hello
It seems you didn't understand me. I want that link inside button "Visit site" also should be link of image. When click on image it redirect me to another site.
That why i create new variable ($visitsite2 = $this->content->ad_visitsite; ) in details_json file and try to set it as link of image (<a href="<?php echo $visitsite2; ?>" target="_blank"><img u="image" src="<?php echo $image?>" /></a>).

In frontend image have link but it generated like that mysite.com/anothersite.com - link_inside_button_visitsite. That's why i get error when clicking on image.

How to change code to make link generated correctly?
The following user(s) said Thank You: adarr
More
10 years 8 months ago #18797 by tompap
Replied by tompap on topic How to add URL field value to image
If the data set by a user is anotherwebsite.com

you will get a bad URL link like mysite.com/another....

to avoid that you should check in php if your link contains a http:// or https:// if not add it.
The following user(s) said Thank You: adarr
Time to create page: 0.053 seconds
Powered by Kunena Forum