Announcement

Collapse
No announcement yet.

A plugin that converts certain words into a link?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Blog] A plugin that converts certain words into a link?

    Hello,

    I've been trying to find some sort of a plug-in or script that would convert a list of words into a link.

    Basically to create inline links for tags and categories, that links to the same website with the selected tag/word.

    Thanks!

  • #2
    I found this on vb.org: http://www.vbulletin.org/forum/showthread.php?t=219968, but it doesnt work for vb4.0

    $word = array(
    'word1',
    'word2'
    );

    $link = array(
    '<a href="/forums/link1.php">Word1</a>',
    '<a href="/forums/link2.php">Word2</a>'
    );

    $this->post['message'] = str_ireplace($word, $link, $this->post['message']);

    Comment


    • #3
      That plugin works perfectly fine in vB4.

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools &lt;- awesome site for html/css help

      Comment


      • #4
        okay i guess it works on the forums... what about for the blog coz it doesnt work there:

        $this->post['message'] = str_ireplace($word, $link, $this->post['message']);

        Comment


        • #5
          It won't work in the blog, no, unless you change the hook location and probably change the variable names. You'll need to look at the blog.php page to figure that information out. If you need help with that then vbulletin.org is the place to post for help.

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools &lt;- awesome site for html/css help

          Comment


          • #6
            Can't you just use the swear filter.

            Find - Google
            Replace - www.google.com

            ?

            Comment


            • #7
              You mean the Replacement Filters (there are no swear filters). Those can be used, but those effect every single instance of the word on the site, not just in posts/blogs

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools &lt;- awesome site for html/css help

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X