Jump to content

Replace words by links


Durango

Recommended Posts

Hey

ok i just tested, it seems it doesnt affect old posts

or maybe it will take time to affect them ?

Also for a new post, it works !

but the problem is that it doesnt take into account the html

l replaced keword1 by <a href="url">keyword1</a>

but instead of showing keyword1 it shows raw html : <a href="url">keyword1</a>

How to make it work ?

Tx a lot :)

Link to comment
Share on other sites

Hey

I tried, but it doesnt work, it wouldnt parse the filter words (maybe because the same word appear again in the replacement url)

on our previous forum, we used this :

require .'include/strings.php';

    global $searchReplaceword;
foreach($searchReplaceword as $search => $replace)
{
  $cur_post['message'] =
    str_replace($search,$replace,$cur_post['message']);
}

 

and then on the file strings.php :

<?php
$searchReplaceword = array(

" word1 " => " <a href='http://www.url.com/go/word1' target='_blank' rel='nofollow'>word1</a> ",
" word2 " => " <a href='http://www.url.com/go/word2' target='_blank' rel='nofollow'>word2</a> "

would be great to use this on IPB ! :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...