Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 09-28-2003, 08:33 PM
vadimr vadimr is offline
 
Join Date: Sep 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Ability to auto-link set keywords.

The idea behind this hack/feature is to help with many webmasters to link their visitors to the right place right away.

The feature is as follows.. and it should be very easy to implement because the bad word feature is already there so therefore the text gets filted each time it is submitted.

Basically I want to be able to add keywords and the URL for them. Each time someone writes lets say the word google, I want my vbulletin to automatically link it to www.google.com with target window _blank (but that blank feature could always be added as the part of the url). I don't want a simple addition of www in the front of the word and .com in the end of the word, I want my specific url. So if i want to send everyone who types google to toolbar.google.com I can change that in the database/config file somewhere.

Replacement would do this fine, however as noted by Scott MacVicar it could break something if someone was to paste a URL. So It has to be a little smart, all url should stay un-touched.

Also if someone was to go and edit the post later and remove the link and just again put the word google in there, the hack should again link the word up, just like the bad work feature.

To make it even more smarter, make it up to two words searchable
so if someone was to type google it would go to www.google.com and if someone was to type Google Toolbar it would go to toolbar.google.com and so on..

This would be very benificial to many users, to help promote their sponsors and so on. Just think of it, if you site is sponsored by Bob International (making this up), and each click-through earns you more money, wouldn't you be happy if Bob Internation was posted on your site that everyone would go to bob international with your affiliate link?

I want to hear some feedback on this, thanks guys..
- Vadim
Reply With Quote
  #2  
Old 09-28-2003, 08:36 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=50116" target="_blank">https://vborg.vbsupport.ru/showt...threadid=50116</a>

Try that
Reply With Quote
  #3  
Old 09-29-2003, 02:24 AM
vadimr vadimr is offline
 
Join Date: Sep 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a good idea, but not exactly finished.. I wish I was more fluent with php to edit that code... I'll try to see what I can do.. I even have a database that I created that has all my affiliate's name and their links.. With a control panel so you can always, add, edit and delete new users... However this would be a very slow operation if the replacement was used to parse the links when viewing the site.. It has to be only when posting or editing a msg, else the operation to load pages would take too long to work..
Reply With Quote
  #4  
Old 09-29-2003, 07:52 AM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would appreciate something like this but for a different reason. I have used the Replacements for this with some success. Adding a leading space to each replacement will help avoid problems with URLs getting messed up if someone has a keyword in a URL.

However, when a post is edited, the replacement text is rendered and you wind up with HTML in your message body that doesn't display properly.

So I think you have a good idea here, and I can think of a lot of uses for it.

Regards,

Matt
Reply With Quote
  #5  
Old 09-29-2003, 12:00 PM
vadimr vadimr is offline
 
Join Date: Sep 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Matt,
Thanks for the feedback, I want to ask you a few questions. Can you elaborate further on the leading space? I really would like to avoid that problem.
Also you said once the text is edited the replacement text will be rendered and you'll end up with HTML. I understand that this will happen if you are just using plain replacement but what if it was modified to work with vB code? So even if the user went to edit his msg, deleted the vB code still once it was submitted the keyword would be re-linked again.

This also can be made a little more interesting, once the keywords are found instead of being replaced with the direct link to the site, they could be replaced with something like www.yoursite.com/redirect.php?site_id=google this way you have a nice way of tracking clicks, changing re-direct url and etc.. all out of a database. I have this setup on my site for other reasons and it's a great way to track and update urls.

I also want to make this smart and not only search for 1 keyword then check what is the next word.. Like I said earlier google and google toolbar would have two different redirects.



Quote:
Originally Posted by memobug
I would appreciate something like this but for a different reason. I have used the Replacements for this with some success. Adding a leading space to each replacement will help avoid problems with URLs getting messed up if someone has a keyword in a URL.

However, when a post is edited, the replacement text is rendered and you wind up with HTML in your message body that doesn't display properly.

So I think you have a good idea here, and I can think of a lot of uses for it.

Regards,

Matt
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:07 PM.


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.03848 seconds
  • Memory Usage 2,194KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete