Author Topic: Need help with <a href="{image_new_added_db_field_definitions}">CLICK HERE</a>  (Read 12659 times)

0 Members and 1 Guest are viewing this topic.

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
<a href="{iamge_new_added_db_field_definitions}">CLICK HERE</a>

I added new field in details. But I need that the link would be jus CLICK HERE. Every link should forward to different page. I made a new field, but how to write in details.html ?

If I am writing in the way as I wrote in topic I do not get it working :/

Please help.

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Please help me or just say that it is impossible.

Thks

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
it's possible.

you should use as tagname the same name as the additional image field you added.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
it's possible.

you should use as tagname the same name as the additional image field you added.

Could you give me step by step instruction. I can't understand what you said.

Thank you for help, I very need that :/

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
you added an extra field in db_field_definitions.php, right?

for example:
you added an extra image field named "special_url".

then you can use in details.html.
{special_url}
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
you added an extra field in db_field_definitions.php, right?

for example:
you added an extra image field named "special_url".

then you can use in details.html.
{special_url}

Yes, I added an extra field in db_field_definitions.php
My extra field is named image_URL
But I want not the URL appear but just words CLICK HERE with that link from {image_URL}.
I tried something like <a href="{image_URL}">CLICK HERE</a> But this thing is not working...

Please help...

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
iso the question is.
is the field image_URL filled with an value?
if you first only use {image_URL} in the template file,
is there something shown?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iso the question is.
is the field image_URL filled with an value?
if you first only use {image_URL} in the template file,
is there something shown?

is the field image_URL filled with an value?
I do not understand the question, sorry for my band english... In DB is set as text.

if you first only use {image_URL} in the template file, is there something shown?
If I am using {image_URL} in detals.html, then the full entered URL appear in that place.





Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
if the full url is shown,
then also <a href="{image_URL}">Link</a> should work.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
if the full url is shown,
then also <a href="{image_URL}">Link</a> should work.

I tried this many times and it is not working...

In the details.html page appear click here and full url at the left. But I want that the full URL do not appear, just Click here will be seen,. Something is wrong. I need help....

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
can you give me an link to your page, or show me the source code of the generated html file.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
That is the code which I write in details.html file:
<a href="{image_URL}">CLICK HERE</a>

But when I upload it to server and go to image details page I get in this way:
 http://www.xxxxxxxxxxxxxxxxx.com">CLICK HERE

(the link is showen together with note click here, but I want just click here to be showen).

When I am seeinig html souirce code I see this:
<a href="<a href="http://www.xxxxxxxxxxxxxxxx.com/" target="_blank">http://www.xxxxxxxxxxxxxxxxxxxx.com/</a>">CLICK HERE</a></font></td>






Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
ok, the problem is, that the url in the additional field is being formated as an url.

you can do something like this:
in details.php
before:
"msg" => $msg,
add this:
"image_URL1" => (isset($image_row['image_URL']) ? $image_row['image_URL'] : "",
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline zaisk

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
I did this, but I get the error message when trying to get into details page.

My tag is not really {image_URL}, it is {image_link}, so I changed this line in this way and added into details.php as you said.

"image_link1" => (isset($image_row['image_link']) ? $image_row['image_link'] : "",

After I added this line of code I get the error:

Parse error: parse error, unexpected ',' in /home/golden/public_html/details.php on line 517

What is wrong ?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
my fault,
there is one ) missing:
this should work:
"image_link1" => (isset($image_row['image_link'])) ? $image_row['image_link'] : "",
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump