Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Text Replacement Links 1.1 (Updated!) Details »»
Text Replacement Links 1.1 (Updated!)
Version: 1.1, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 10-30-2004 Last Update: 04-27-2005 Installs: 35
DB Changes
Is in Beta Stage  
No support by the author.

Text Replacement Links


====================
Author: Ken 'LiveWire' Iovino
Site: www.vBhacks.us
Version: 1.1
====================

Updates
  • No longer will phrase the the link if the letters are being used. (Example) If google is one of my TextLinks, and a member post "I just got googlefied" It will not link it.
  • Mass Amounts of Queries per post fixed. This bug fixed by Kentaurus
  • No longer Case Sensitive. This bug fixed by nexialys

Huge Thanks
I have to give a huge thanks to the following members that have helped me get this hack where it is now. Xenon, Kentaurus, nexialys, Geographic2, and lewekleonek. Thank you guys very much!

What this does
This will allow you to specified any text you add to automatically turn into a link when your members post the word. For example, you go to the ACP and add the word 'google' to the list and then you add the 'url' to googles website, and anytime a member post the word google, it will automatically turn it into a link. See screenshots for example.


To do list...
  • Time to install: 3-5 minutes
  • Queries to run: 1
  • File Mods: 2
    • /admincp/index.php
    • /includes/functions_bbcodeprase.php
  • Templates to edit: 0
  • Templates to add: 0
  • New Phrases: 14

Please read carefully and make all the necessary changes as stated. This is will work if installed properly.
PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN! If you like this hack

Click It

Help & Support
Before asking for support Please make sure you have done all necessary changes! If you still need support please post a reply here.

Please post bugs and errors here. Hope you like, feedback welcomed.

Special Thanks and Credit to
-Xenon
-Kentaurus
-nexialys
-Geographic2
-lewekleonek

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-22-2004, 03:39 AM
cnczone cnczone is offline
 
Join Date: Mar 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working for me.
Reply With Quote
  #33  
Old 11-24-2004, 02:58 PM
StefanS StefanS is offline
 
Join Date: Nov 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly installed in 3.03 as described but not working.
Reply With Quote
  #34  
Old 12-03-2004, 09:19 PM
HarryBO HarryBO is offline
 
Join Date: Jan 2003
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working for me,too!
Reply With Quote
  #35  
Old 12-21-2004, 01:33 AM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #36  
Old 12-21-2004, 01:51 AM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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); 
Reply With Quote
  #37  
Old 12-22-2004, 11:03 AM
Marulatree's Avatar
Marulatree Marulatree is offline
 
Join Date: Nov 2002
Location: London
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this main install file be updated so we can just install straight from your first post
Reply With Quote
  #38  
Old 12-22-2004, 03:46 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working here. But I think it's got something to do the the admin only html hack I've got installed.
Reply With Quote
  #39  
Old 12-27-2004, 02:02 PM
Prince Prince is offline
 
Join Date: Oct 2001
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I concur this hack does not work.
Reply With Quote
  #40  
Old 12-30-2004, 01:25 PM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*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.
Reply With Quote
  #41  
Old 12-30-2004, 07:17 PM
Prince Prince is offline
 
Join Date: Oct 2001
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:11 PM.


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.07836 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete