vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Text Replacement Links 1.1 (Updated!) (https://vborg.vbsupport.ru/showthread.php?t=71191)

cnczone 11-22-2004 03:39 AM

Still not working for me.

StefanS 11-24-2004 02:58 PM

Exactly installed in 3.03 as described but not working.

HarryBO 12-03-2004 09:19 PM

Still not working for me,too!

Geographic2 12-21-2004 01:33 AM

I installed but then used what Kentaurus posted and it works on highly modified vb 3.0.0

I also solved your www.google.com problem.

Simply search for <space>Google<space> which will insure you wouldn't replace subwords as well for example Googleicous...

So look for " Google " instead of "Google"

Kentaurus's code with my small addition to check for spaces before and after the word and add a space before and after the replacement:

PHP Code:

static $customReplaceInit false
        static 
$findtext = array(); 
        static 
$replacetext = array(); 

    if (!
$customReplaceInit
    { 
            
$textlinks $DB_site->query(" SELECT text, link FROM " TABLE_PREFIX "textlink"); 
            while(
$link $DB_site->fetch_array($textlinks)) 
            { 
                    
$findtext[] = " ".$link['text']." "
                    
$replacetext[] = " [url=" $link['link'] . "]" $link['text'] . "[/url] "
            } 
        
$customReplaceInit true
    } 

        
$bbcode str_replace($findtext$replacetext$bbcode); 


This works for me at Giant Vegenetics

Sample word: Pumpkin
Pending full implementation with Wiki... :)


I plan to connect it to my WIKI for a very nice feature. Encylopedic knowledge injected directly into the threads. Sweet.

Geographic2 12-21-2004 01:51 AM

Kentarus's with n*****?'s idea, Using case insensitive preg_replace and checking for spaces to avoid the www.google.com problem.

PHP Code:

static $customReplaceInit false
        static 
$findtext = array(); 
        static 
$replacetext = array(); 

    if (!
$customReplaceInit
    { 
            
$textlinks $DB_site->query(" SELECT text, link FROM " TABLE_PREFIX "textlink"); 
            while(
$link $DB_site->fetch_array($textlinks)) 
            { 
                    
$findtext[] = "/\s".$link['text']."\s/i"
                    
$replacetext[] = " [url=" $link['link'] . "]" $link['text'] . "[/url] "
            } 
        
$customReplaceInit true
    } 

        
$bbcode=preg_replace($findtext$replacetext$bbcode); 


Marulatree 12-22-2004 11:03 AM

can this main install file be updated so we can just install straight from your first post

Jolten 12-22-2004 03:46 PM

Still not working here. But I think it's got something to do the the admin only html hack I've got installed.

Prince 12-27-2004 02:02 PM

I concur this hack does not work.

Geographic2 12-30-2004 01:25 PM

*sigh*
I disagree this hack does work - IF you follow the changes given by various people to the original unmaintained install file.

Proof positive: http://www.giantvegenetics.com

Give it a try. Use the word pumpkin in a post. Please use the AI Growbot Garden Teahouse forum for your test.

PHP Code:

UserVB Guest
PW
dotorg 

Follow the install file directions. Then make the changes I described in either of the code blocks I posted on Page 3 of this thread, use the first one if you want it case sensitive, use the second one to ignore case sensitivity.

Prince 12-30-2004 07:17 PM

Quote:

Originally Posted by Geographic2
*sigh*
I disagree this hack does work - IF you follow the changes given by various people to the original unmaintained install file.

Proof positive: http://www.giantvegenetics.com

Give it a try. Use the word pumpkin in a post. Please use the AI Growbot Garden Teahouse forum for your test.

PHP Code:

UserVB Guest
PW
dotorg 

Follow the install file directions. Then make the changes I described in either of the code blocks I posted on Page 3 of this thread, use the first one if you want it case sensitive, use the second one to ignore case sensitivity.

so it only works if you go thru this thread and try and figure out all of the additional changes that others have made? to me that means this thing needs to go back to the beta forum or the hack developler needs to update his instructions. I should not have to read thru a thread and guess which additional changes need to be made to the code to make the hack work, that is silly.


All times are GMT. The time now is 11:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01384 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete