This topic is locked
[SOLVED]

 How do I assign a clickable link/URL to a field?

3/5/2010 5:40:06 PM
PHPRunner General questions
S
spkar author

I am trying to build a personal bookmark or link site to remember all my links. I have created following table.

id, link_name, link_URL, desc, category, type, create_date, hits.

question:

  1. In a list or view page, how do I assign link_utl to link_name so that while clicking on 'CNN Sports and Football news', it should take me to cnn.com/news. link_URL is not shown on the page (hidden behind link_name).
  2. How to auto increment hits to increase hit count?
    Thanks,

    spkar

S
siliconswamp 3/5/2010

If you are going to build this where there is a report, you can edit this in the plain text editor and find the section of the report where you would output your table.
This would look something like below for the report
<TR>

<TD class=blackshade><FONT size=3>Site Category</FONT></TD>

<TD class=blackshade><FONT size=3>Name</FONT></TD>

</TR>{END Site_Name_newgroup}<!------------------------------------- data ----------------------------------------->

{BEGIN row_data}<TR>

<TD class=data>

<P align=right><FONT size=3>{$Site_Category_value}</FONT></P></TD>

<TD class=data>

<P align=right><FONT size=3><a href="{$Site_url_value}>{$Name_value}</a></FONT></P></TD>

</TD></TR>{END row_data}<!------------------------------------- group summary -----------------------------------------></TBODY>{END grid_row}
You will see how PHPRunner codes the tags for each row in a report, just be sure to include the site URL field as a column in the report (You can leave it or remove it in editing view, just check the code of the field first)
Hope This Helps!

$ilicon$wamp



I am trying to build a personal bookmark or link site to remember all my links. I have created following table.

id, link_name, link_URL, desc, category, type, create_date, hits.

question:

  1. In a list or view page, how do I assign link_utl to link_name so that while clicking on 'CNN Sports and Football news', it should take me to cnn.com/news. link_URL is not shown on the page (hidden behind link_name).
  2. How to auto increment hits to increase hit count?
    Thanks,

    spkar

Sergey Kornilov admin 3/5/2010

To make field a hyperlink (link_URL) set 'View as' type to 'Hyperlink'. You can choose it to display other field content as well.
Creating hit counter for a link is a totally different story. You'll need to build a proxy PHP file that will accept URL as a parameter, increment hit counter and redirect user to that URL. This needs to be created outside of PHPRunner.