Author Topic: (REQ) Removing the links in the keywords? I want it (Just text)  (Read 6919 times)

0 Members and 1 Guest are viewing this topic.

Offline ameenov

  • Newbie
  • *
  • Posts: 41
    • View Profile
In the details page ..
I am trying to Removing the links in the keywords because I want it to be only text
like description.

what i have to do?

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: (REQ) Removing the links in the keywords? I want it (Just text)
« Reply #1 on: May 30, 2005, 09:32:22 AM »
in includes/functions.php find:
Code: [Select]
    foreach ($split_keywords as $key => $val) {
      $keywords .= (($keywords != "" ) ? ", " : "")."<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_keywords=".urlencode($val))."\">$val</a>";
    }
replace it with (or insert below):
Code: [Select]
$keywords = str_replace(" ", ", ", $image_row['image_keywords']);
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 ameenov

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: (REQ) Removing the links in the keywords? I want it (Just text)
« Reply #2 on: May 30, 2005, 10:30:55 AM »
Hi
thanks V@no

But the text became like that:

The, keywords, have, commas

Can I remove it?

Offline ameenov

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: (REQ) Removing the links in the keywords? I want it (Just text)
« Reply #3 on: May 30, 2005, 10:41:20 AM »
OK
I have done it that way:

find:

Code: [Select]
    $keywords = "";
   $keywords = str_replace(" ", ", ", $image_row['image_keywords']);

replace it with

Code: [Select]
$keywords = (!empty($image_row['image_keywords'])) ? format_text($image_row['image_keywords'], 1) : REPLACE_EMPTY;
===========
But I don't know if it is the right way?
Or it will make problems to me in the future?

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: (REQ) Removing the links in the keywords? I want it (Just text)
« Reply #4 on: May 30, 2005, 11:34:37 AM »
u dont need any conditions there, because the part where u put that line is already inside that condition and u dont need use format_text because there is nothing to format, especialy no need enable html in the keywords list ;)
so, simple
Code: [Select]
$keywords = $image_row['image_keywords'];woulld be enough :)
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 hinzwiekunz

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
    • http://www.hinzwiekunz.de
Re: (REQ) Removing the links in the keywords? I want it (Just text)
« Reply #5 on: April 17, 2006, 10:23:28 PM »
Hi Vano,

how could I get a further keyword-Tag without links? I want to get dynamic Keywords in Meta-Tags without Links
http://www.4homepages.de/forum/index.php?topic=11375.0 and want to use the Link-Functionality in the detail-Image-View.

So this thread means to delete all Link-Informations from the keywords. For me, I want to have the link-Informations in the detail-view, but not in the Meta-Tags.

Perhaps I have to generate a new Keyword-Function only to display the text-Version?

And no in German - sorry my bad english.

In einem anderen Thread habe ich gefragt wie ich die dynamischen Keywords in Meta-Tags bekomme. Mit {image_keywords} bekomme ich die Keywords innerhalb von Links - also unbrauchbar für Meta-Tags. Dieser Thread zeigt mir zwar wie ich die Links entferne, aber ich möchte sie ja in einem bestimmten Teil, nämlich bei den Bild-Details, behalten.
Also eine zweite Keywords-Funktion/Variable einfügen? Wie mache ich das, und an was für einer Stelle?


hinzwiekunz
« Last Edit: April 22, 2006, 04:10:34 PM by hinzwiekunz »