Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2005, 09:04 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Auto convert parts of links that user's post (for affiliate programs)

I want to be able to "replace" the beginning of some URL's in posts with an affiliate URL. By replace, I mean replace the actual link only through the replacements system. I want the links in the threads to remain the same, but to be replaced on page load.

For example:

Take the following site

http://site.com/?article=4324

And redirect links posted with the following:

http://affiliatesite.com/?affiliate...m/?article=4324

But using javascript to show the non-affiliate link in the status bar.

Basically I need to replace

http://site.com/?article=

with

http://affiliatesite.com/?affiliate...e/com/?article=

Leaving the last number off, so when different articles are linked to they will all work with the replacement? Does that make sense? Any suggestions?

I think it can be hardcoded somewhere, but what file would I put it in? If someone wants to make a real hack out of it, that would be awesome too.

Thanks.

~006
Reply With Quote
  #2  
Old 04-10-2005, 09:33 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sell if i ever find a site tricking me into a place that i don't want in this way, it would be the last time i visited there.

I always check my statusbar before clicking. If nothing is shown i won't click mostly or i will first try to look at page source. If i ever found out to be mislead, well i would be gone from there.
Reply With Quote
  #3  
Old 04-10-2005, 09:36 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could probably convert my Amazon or Ebay associates hack to do what you need.
I'm with Marco though. You shouldn't trick your users. Be open and let them know that you are doing it to support the board. The members of my site have no problem with my converting Amazon or Ebay hacks.
Reply With Quote
  #4  
Old 04-10-2005, 10:31 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Sell if i ever find a site tricking me into a place that i don't want in this way, it would be the last time i visited there.

I always check my statusbar before clicking. If nothing is shown i won't click mostly or i will first try to look at page source. If i ever found out to be mislead, well i would be gone from there.
Marco. That is a good point. I wasn't planning on using it that way. The affiliate links just look really messy and I think it would be cool to just show people the real page they will end up on.

Meaning, the link they see in the post IS the link they would end up on. It would just go through an affiliate site first and track the click. Nothing dishonest about that.

However, making a link like: (non working link, just hover over and see what I mean though)
http://really-cool-site..com

..would be very bad. That is not what I want it for.


---------

And Amy, I tried out yours but that changes the actual link. I am really just trying to keep the links looking good, and doing the affiliate stuff behind the scenes. I will take a further look at yours and see if it can be modded.

And my users will know about it. I'm just afraid of new members posting a link and seeing it posted differently, and thinking they messed up.
Reply With Quote
  #5  
Old 04-11-2005, 02:08 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can change mine just a wee bit to make it not change the text of the link if that's what you want. It just takes a bit of tinkering.
Reply With Quote
  #6  
Old 02-10-2012, 10:34 PM
metrika metrika is offline
 
Join Date: Nov 2007
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want it too
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:51 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.07589 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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