vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Dynamic Amazon Links (https://vborg.vbsupport.ru/showthread.php?t=163393)

felxi 11-21-2007 10:00 PM

Dynamic Amazon Links
 
Description
This Hack will easily rewrite all amazon links whitin the posts to your associate id. You can add your amazon.de and amazon.com associate id, links to both amazon stores will be replaced with the right id, it works fine with multilanguage boards.

vBulletin
vB 3.6.x working
vB 3.5.x working

updating
just upload the functions_amazon_links.php from the zip and don't forget to insert your amazon ids.

Change Log
25/11/2007 v1.05
- support for [ url=xxx]yyy[ /url]
- replacement for tag=xxx and ref=xxx in non asin links
- small fix for /preview/ links

24/11/2007 v1.04
- [url]amazon-link[ /url] long amazon links will be shorten vb like

23/11/2007 v1.03
- [url] and [url="xxx"] will be repleaced

weeno 11-23-2007 12:08 AM

Thank you for taking this up. I've been trying to get the previous one to work, but unless the parsings perfect (in that it doesn't break in any scenario) then I'm reluctant to deploy it on my site.

downloading/testing.

edit: It's not working for me. links are not getting processed at all. Looks like lower case [url] aren't processed.

thanks
arn

redlabour 11-23-2007 05:50 AM

Great - but does it work with vbAnonymizer installed?

felxi 11-23-2007 06:23 AM

Quote:

Originally Posted by weeno (Post 1387802)
edit: It's not working for me. links are not getting processed at all. Looks like lower case [url] aren't processed.

@arn:
i made a little update and tested it. now the script will also replace [url] and [url="xxx"] instead of [URL] and [URL="xxx"].

@redlabour: i'll test it this evening to get it working.

Best regards,
Felxi

weeno 11-23-2007 06:37 AM

Quote:

Originally Posted by felxi (Post 1387897)
@arn:
i made a little update and tested it. now the script will also replace [url] and [url="xxx"] instead of [URL] and [URL="xxx"].

The lowercase still isn't working for the [url="xxx"]

example:
[url="http://www.amazon.com/Logitech-970155-0403-V20-Notebook-Speakers/dp/B0009WKBGC"]these[/url]

arn

felxi 11-23-2007 07:03 AM

Quote:

Originally Posted by weeno (Post 1387910)
example:
these

It should work now, I updated the script. You can test your link-codes in the functions_amazon_links.php and run this php file direct:

PHP Code:

<?php
echo amazon_links('some text
[url="http://www.amazon.com/Logitech-970155-0403-V20-Notebook-Speakers/dp/B0009WKBGC"]link text here[/url]'
);


function 
amazon_links($text) {
// ...
}
?>


weeno 11-23-2007 07:26 AM

Quote:

Originally Posted by felxi (Post 1387917)
It should work now, I updated the script. You can test your link-codes in the functions_amazon_links.php and run this php file direct:

Thanks. appears to be working well. I'll test it more extensively when I have time this weekend. again, appreciate the effort.

arn

reteep 11-23-2007 07:46 AM

Seems to work dude, good job!

daFish 11-23-2007 07:49 AM

Great release. I assume this works with the 3.6-series?

reteep 11-23-2007 07:52 AM

Quote:

Originally Posted by daFish (Post 1387943)
Great release. I assume this works with the 3.6-series?

Yea, running it on the latest 3.6.


All times are GMT. The time now is 08:03 AM.

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.01905 seconds
  • Memory Usage 1,736KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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