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
  #72  
Old 05-22-2005, 06:24 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One query per page. That isn't possiable. If you have the word "Soda" as a link going to coke.com, and a user says. I like to drink soda. It will show up as a link. There isn't a way around it unless you deigne something where it can tell the PHP how the user is using the word.
Reply With Quote
  #73  
Old 05-22-2005, 08:28 PM
-=Sniper=- -=Sniper=- is offline
 
Join Date: May 2002
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think the geek auto linker only has one query per page.
Reply With Quote
  #74  
Old 05-22-2005, 10:24 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As this one does also.
Reply With Quote
  #75  
Old 05-22-2005, 10:29 PM
-=Sniper=- -=Sniper=- is offline
 
Join Date: May 2002
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hehe what you wrote didnt make sense...anyway I just tested auto linker again, and it seems to do what I described above.

not sure which system to use
Reply With Quote
  #76  
Old 05-22-2005, 10:45 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by -=Sniper=-
I think the geek auto linker only has one query per page.
You said that the geek auto linker only has one guery per page, as this hack does also.

I would use whatever fits your needs, this isn't any sort of competition.
Reply With Quote
  #77  
Old 06-04-2005, 03:19 AM
tylercruz's Avatar
tylercruz tylercruz is offline
 
Join Date: Feb 2004
Location: Nanaimo, BC
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it, but it's not working as well as I hoped, so I'll be removing it. My beef with it is that it messes up the formatting of posts right now.... Sometimes it removes the newlines in posts, and sometimes it removes the preceeding space, making posts really cluttery...

Let me know when you beef this up and fix the errors..
Reply With Quote
  #78  
Old 06-04-2005, 05:55 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i acually never seen this error. Got a screenshot?
Reply With Quote
  #79  
Old 07-23-2005, 10:27 AM
Supernature Supernature is offline
 
Join Date: Dec 2001
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At first, I have to say "Thank you" for this excellent work!
I found out why the redirect phrases are not working - they phrasetypeid is wrong. I use the german vB3, so I don't know how the type is called in the english version, must be something like "Control Panel: Messages" - the phrasetypeid is "9000" (as sayed, in the german version).

After installing the hack, i asked myself:
If someone asks "Where do I find the homepage of XYZ", and XYZ is in the TextReplacement-Table, the other users will think he is completely insane, because there is no option to tell this automatic link from the others.

So I did the following modification:

I changed one line in the code to insert in functions_bbcodeparse.php from

PHP Code:
$replacetext[] = " [url=" $link['link'] . "]" $link['text'] . "[/url] "
to
PHP Code:
$replacetext[] = " [autolink=" $link['link'] . "]" $link['text'] . "[/autolink] "


Next, I created a custom vb-Code:

Name: autolink
Tag: autolink
Code to insert:
Code:
<span class="autolink"><a title="this link has been created automatically" href="{option}" target="_blank">{param}</a>*</span>
Use option: yes



At last, I went to the custom CSS-Definitions and inserted the following:
Code:
.autolink a:link
{
   text-decoration:underline;
}
.autolink a:visited
{
text-decoration:underline;
}
.autolink a:hover
{
text-decoration:underline;
}
The result is that the generated links are marked with a '*', and on mouseover, the text "this link has been created automatically" will appear.
Additionally, the links will be underlined.
If you alreade use "underline" for the normal Links, you should use any other CSS-Definition.
Reply With Quote
  #80  
Old 07-23-2005, 10:49 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for that! I will definitly be looking at your above post when I port this to 3.5.0!
Reply With Quote
  #81  
Old 07-23-2005, 01:51 PM
Supernature Supernature is offline
 
Join Date: Dec 2001
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Feel free to do so
Just found another problem: If the text to replace is followed by a ".", it will not work.
And if the word to replace is the first in a line, the link will "jump" to the end of the line before, even if there are one ore more blank lines in between.
(Tried this also with the original hack without my modifications, same behaviour).
Any idea?
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 12:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05370 seconds
  • Memory Usage 2,312KB
  • 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
  • (2)bbcode_code
  • (2)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
  • (3)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