vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Links to Amazon (https://vborg.vbsupport.ru/showthread.php?t=39071)

amykhar 05-26-2002 03:30 PM

Links to Amazon
 
I have a shopping forum, and quite often people post links to sales items at Amazon. My board is an affilliate of Amazon, ergo I would like to transform any Amazon links to point to my affilliate account.

All it takes is appending a slash and the affilliate name at the end of the link.

So, basically, as URLs are entered in a message, the hack needs to see if it points to amazon.com. If it does, it needs to modify the link to the affilliate link.

This would probably be a useful hack for others besides myself. Anyone have any thoughts on how to do it?

Amy

Logician 06-15-2002 08:07 PM

edited for bug fix.. check below

Me2Be 06-16-2002 02:47 PM

This would be great -- Amy are you using it?

(Thanks Logician!)

amykhar 06-16-2002 02:54 PM

I haven't had time to try it yet.

Going to try right now :D

Amy

amykhar 06-16-2002 03:08 PM

The code is throwing errors. Pretty sure it has something to do with the quotes in the urls. Working on ironing out the kinks.

Amy

Logician 06-16-2002 05:13 PM

Quote:

Originally posted by amykhar
The code is throwing errors. Pretty sure it has something to do with the quotes in the urls. Working on ironing out the kinks.

Can you specify the errors? What's the url before parsed and after parsed?

Code seems to work correctly here..

amykhar 06-16-2002 05:29 PM

Parse error: parse error in /home/eaforums/public_html/admin/functions.php on line 644

Fatal error: Call to undefined function: vbdate() in /home/eaforums/public_html/admin/sessions.php on line 356

Logician 06-16-2002 05:42 PM

Vbulletin changed the code while it's parsed here. ;)

I attached the code into a text file, please apply from there and you'll be fine..

Please notice: The code is 2 lines, not 4! So do not break the lines in between! There are only 2 linebreaks inside, both after the

$bbcode);

lines.

Logician 06-20-2002 06:04 PM

Does it work?

amykhar 06-21-2002 02:22 PM

Sorry, I had to be away for a few days. It doesn't quite work. If I give it a link to a specific product, say

http://www.amazon.com/exec/obidos/AS...878268-1024166

It truncates all the product information and gives me

http://www.amazon.com/affiliatesite instead of

http://www.amazon.com/exec/obidos/AS.../affiliatesite

Amy


All times are GMT. The time now is 10:41 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.01158 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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