This topic is locked

Turning Image into Link

3/18/2011 2:30:58 PM
PHPRunner General questions
D
DeeLite author

I have a table where I'm taking partner/site links, and an image (path to their image on their server) is submitted with their link
So the table is like:

SiteId

SiteName

SiteURL

SiteThumb
How do I make the list so that I have both the Image (SiteThumb) and the Site Name act as a hyperlink?
Example Data:

SiteName : My Link Source

SiteURL: http://www.myfakesite/

SiteThumb: https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=16684&image=1&table=forumtopics
Project is done in PHP using MSSQL DB

D
DeeLite author 3/21/2011

Anyone has a solution? I can't see how in the coding where I can turn an image into a link.

D
Dingoboy 3/21/2011



I have a table where I'm taking partner/site links, and an image (path to their image on their server) is submitted with their link
So the table is like:

SiteId

SiteName

SiteURL

SiteThumb
How do I make the list so that I have both the Image (SiteThumb) and the Site Name act as a hyperlink?
Example Data:

SiteName : My Link Source

SiteURL: http://www.myfakesite/

SiteThumb: https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57164&image=1&table=forumreplies
Project is done in PHP using MSSQL DB


I don't no exactly what you want, but take a look at these 2 and maybe you get the hint.
<A href="{$SiteURL_value}">

<img width="300" height="200" alt="" src="{$SiteThumb_value}" /> {$SiteName_value} </A>
could turn out something like this
<A href="http://www.facebook.com">;

<IMG width="300" height="200" alt="" src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57164&image=2&table=forumreplies"; /> Facebook </A>

D
DeeLite author 3/21/2011



I don't no exactly what you want, but take a look at these 2 and maybe you get the hint.
<A href="{$SiteURL_value}">

<img width="300" height="200" alt="" src="{$SiteThumb_value}" /> {$SiteName_value} </A>
could turn out something like this
<A href="http://www.facebook.com">;

<IMG width="300" height="200" alt="" src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57167&image=1&table=forumreplies"; /> Facebook </A>


Thanks, but where do I go to do this?
the visual editor has the HTML/Source code edit, but when I go to add in <a href> tags around my image call:
<a href="{$SiteURL_value}" target="_blank"><img src={$SiteThumb_value}" border=0></a>
this is what I see in the source code after I build the page:
<a href=<span id="edit5_SiteURL" >http://www.myfakesite/</span>><IMG border=0 alt=""

src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57167&image=2&table=forumreplies"></a>;
Where is the "span id" tags coming from? And why can't this be done through the visual editor?

D
Dingoboy 3/21/2011



Thanks, but where do I go to do this?
the visual editor has the HTML/Source code edit, but when I go to add in <a href> tags around my image call:
<a href="{$SiteURL_value}" target="_blank"><img src={$SiteThumb_value}" border=0></a>
this is what I see in the source code after I build the page:
<a href=<span id="edit5_SiteURL" >http://www.myfakesite/</span>><IMG border=0 alt=""

src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57168&image=1&table=forumreplies"></a>;
Where is the "span id" tags coming from? And why can't this be done through the visual editor?


I need to see more code to understand where the span is coming from

But you need " between src= and {$SiteThumb_value}" like this src="{$SiteThumb_value}"

D
DeeLite author 3/21/2011



I need to see more code to understand where the span is coming from


That's the problem, from the looks of it, the span ID is hooked into the variable in the template:
{$SiteURL_value} = <span id="edit5_SiteURL" >whateverUrlis</span>
Where do I changed the "value" of the variable so it doesn't bring up CSS calls and just the URL?
I can't find how this variable is called within the php files to see what it's doing.
Edit to add:
this is from the template file:




{BEGIN SiteURL_fieldcolumn}

<TR>

<TD style="WIDTH: 840px" align=left><a href="{$SiteURL_value}"><IMG border=0 alt=""

src="{$SiteThumb_value}"></a></TD>

</TR>

{END SiteURL_fieldcolumn}

{BEGIN SiteName_fieldcolumn}

<TR>

<TD style="WIDTH: 840px" align=left>{$SiteName_value}</TD>

</TR>

{END SiteName_fieldcolumn}





But you need " between src= and {$SiteThumb_value}" like this src="{$SiteThumb_value}"



that is my mistyping. the " is actually in the code.

D
Dingoboy 3/21/2011

Sounds like you need to write support for that one.

I know from my self that PHPR sometimes has being mixing codes together.

Try to Build your project and press the "Do the full build"

That sometimes helps.

D
DeeLite author 3/21/2011



Sounds like you need to write support for that one.

I know from my self that PHPR sometimes has being mixing codes together.

Try to Build your project and press the "Do the full build"

That sometimes helps.


Full build is what I always do.

D
DeeLite author 3/22/2011

Okay, unless I'm a licensed user, I can't get help from support, but this is the Catch-22. I'm can't purchase something that I have no way of knowing that it can't do something as basic as putting a link on an image through the visual editor, with slight modification to the templates.
This is basic Banner/Image linking. Why do I have to jump through hoops to do something this basic?

Sergey Kornilov admin 3/22/2011

Offered free help. Check your email.