VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. really need something like the "tools" mod here at the videohelp forum, i.e. when you type vdub you automatically get a link to vdub in the tools section. i've seen a few "lexicon" mods, but they don't seem to insert links to the entries into the main forum posts. thanks.
    Quote Quote  
  2. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    smart_tags.zip

    From: http://www.netclectic.com/index.php

    You need to register for the forum to gain acess to it. It's a beta mod and doesn't work 100%, if the word your tagging appears in the URL it will break the URL.

    Also you need to apply this fix to the mod file, replace the smart_tag_pass function in bbcode.php with this one. Otherwise it's case sensitive:

    Code:
    function smart_tag_pass($message) 
    { 
       static $orig, $repl; 
    
       if( !isset($orig) ) 
       { 
          global $db, $board_config; 
          $orig = $repl = array(); 
    
          $sql = 'SELECT * FROM ' . SMART_TAGS_TABLE; 
          if( !$result = $db->sql_query($sql) ) 
          { 
             message_die(GENERAL_ERROR, "Couldn't obtain smart tags data", "", __LINE__, __FILE__, $sql); 
          } 
           
          $smart_tags = $db->sql_fetchrowset($result); 
    
          if( count($smart_tags) ) 
          { 
             usort( $smart_tags, 'smart_tag_sort' ); 
          } 
    
          for ($i = 0; $i < count($smart_tags); $i++) 
          { 
             //$orig[] = '#\b(' . phpbb_preg_quote( $smart_tags[$i]['smart_tag'], "/") . ')\b#'; 
             //$repl[] = '' . $smart_tags[$i]['smart_tag'] . ''; ; 
    
              $orig[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote( $smart_tags[$i]['smart_tag'], '#')) . ')\b#i'; 
              $repl[] = ' . ']' . $smart_tags[$i]['smart_tag'] . ''; 
          } 
       } 
        
       if( count( $orig ) ) 
       { 
            $segments = preg_split( '#(<.+?>)|(\[url\].+?\[\/url\])|(\[img\].+?\[\/img\])|(\[code\].+?\[\/code\])|(\[email\].+?\[\/email\])|(\[acronym=.+?\].+?\[\/acronym\])|(\[.+?\].+?\[.+?\])#s' , $message, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); 
    
          $message = ''; 
    
          foreach( $segments as $seg ) 
          { 
             if( $seg[0] != '<' && $seg[0] != '[' ) 
             { 
                $message .= str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?)))*)\<))#sei', "preg_replace(\$orig, \$repl, '\\0')", '>' . $seg . '<'), 1, -1)); 
             } 
             else 
             { 
                $message .= $seg; 
             } 
          } 
       } 
        
       return $message; 
    }
    Quote Quote  
  3. big thanks!!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!