Author Topic: Autolink in layout and custom fied problem  (Read 4267 times)

0 Members and 1 Guest are viewing this topic.

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Autolink in layout and custom fied problem
« on: September 11, 2006, 02:13:54 PM »
Hello

Regarding this post:
http://www.4homepages.de/forum/index.php?topic=747.msg3277#msg3277

I've made a news extra field. Work like a charm, but I've problem to integrate it into my layout around the picture as a link. I've use it to make a banner portfolio with a external link (image_bannerlink).
Into the layout, it make automatic the link when it recognize the link format (http and www).

How can I work it out or desactive the autolink creation?

My layout code:
Code: [Select]
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
<div align="center">
  <table width="95%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="{image_bannerlink}" target="_blank">{thumbnail}</a><br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif
  image_is_new}<br />
  {lang_image_bannerlink} {image_bannerlink}</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{image_description}</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</div>

Result (First banner):
http://john-howe.com/links/gallery/categories.php?cat_id=71

A lot of thx for your help.
Regards, Dominique

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Autolink in layout and custom fied problem
« Reply #1 on: September 11, 2006, 02:20:25 PM »
In includes/functions.php find:
Code: [Select]
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
Replace with:
Code: [Select]
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Autolink in layout and custom fied problem
« Reply #2 on: September 11, 2006, 02:37:49 PM »
Thx, but same result.  :cry:
http://www.john-howe.com/links/gallery/categories.php?cat_id=71

HTML Output:
Code: [Select]
  <table width="95%" border="0" cellspacing="0" cellpadding="0">
    <tr>

      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><a href="http://<a href="http://www.apple.com" target="_blank">http://www.apple.com</a>" target="_blank"><!a href="./details.php?image_id=1584&amp;sessionid=5eec5b8fb4292723026e6e2e6b0ebb7b"><img src="./data/thumbnails/71/JustinSweet.jpg" border="0" width="574" height="60" alt="Justin Sweet" /></a></a><br />
<b>Justin Sweet</b> <sup class="new">new</sup><br />
  Web URL: <a href="http://www.apple.com" target="_blank">http://www.apple.com</a></td>

    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>

    </tr>
  </table>


Dom

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Autolink in layout and custom fied problem
« Reply #3 on: September 11, 2006, 02:55:32 PM »
what 4images version do you use?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Autolink in layout and custom fied problem
« Reply #4 on: September 11, 2006, 03:10:11 PM »
Version 1.7

I've a lot of Portfolio to update to 1.7.3 and this todo are planned. But I can't do it now. Sorry.

Dom

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Autolink in layout and custom fied problem
« Reply #5 on: September 11, 2006, 04:45:15 PM »
I've update this portfolio and it's working.
Thx. Less work than I think. But I must readd my custom changes to the other portfolios...  :(

Regards, Dom