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)

projectego 11-23-2007 02:59 PM

[high]* projectego clicks install :)[/high]

weeno 11-24-2007 04:09 AM

Another issue.

It seems that using this hack removes vbulletin's auto truncate feature in long urls.

For example:

Without the hack, long urls are shortened. Example:

h_ttp://www.amazon.com/Microsoft-Offi...5878848&sr=8-1

Once you install the hack, the url ends up being very long, and not auto truncated.

h_ttp://www.amazon.com/Microsoft-Office-2004-Student-Teacher/dp/B0001WN16M/ref=pd_bbs_1?ie=UTF8&s=software&qid=1195878848&sr= 8-1

bada_bing 11-24-2007 04:46 AM

Reserved

felxi 11-24-2007 09:08 AM

Quote:

Originally Posted by weeno (Post 1388445)
Another issue.
It seems that using this hack removes vbulletin's auto truncate feature in long urls.


Hey weeno,
thanks for the report. the truncate feature is now added to the script.

In general the displayed link e.g. [url ] amazon-link [ /url] will get [url="new-amazon-link" ] amazon-link [ /url], so the displayed post-text isn't changed :).

Greetz,
felxi

djbaxter 11-24-2007 01:13 PM

Wow!

I've tried a few of these before, both for vBulletin and WordPress. This is the first one that actually WORKS for me.

Well done! :)

I made a slight modification to the plug-in that might be useful to others...

In functions_amaxzon_links.php, find at lines 6-7:

Code:

        /*
        * your partnernet ids
        */
        $associate_id_de = 'xxxxxxxxx'; // or leave empty
        $associate_id_com = 'xxxxxxxxxxx'; // or leave empty

Since I don't have or need an amazon.de account but I do have another regional account, I changed this to:

Code:

        /*
        * your partnernet ids
        */
        $associate_id_de = ''; // or leave empty
        $associate_id_com = 'xxxxxxxxxxx'; // or leave empty
        $associate_id_ca = 'xxxxxxxxxxx'; // or leave empty

Then find two instances of

Code:

amazon.(de|com)
at lines 17-18 and 42-43. Change to:

Code:

amazon.(ca|com)
For other regional Amazons, use the appropriate regional extension instead of "ca".

weeno 11-24-2007 08:37 PM

two more "issues"

1.

It breaks this link:
http://www.amazon.com/review/product...owViewpoints=1

since it has an ABIN number but is not meant to go to the product itself

2.

It doesn't handle [url=http://www.link.com]text[/url] (without quotes)

Regarding #1, in a related note, I might even prefer the urls all to be redirect urls via Amazon rather than any in the more abbreviated ABIN version... since that way the final url is as intended by the origanal poster, and your referal code is no longer embedded in the final destination url. But that might be a personal preference.

thanks
arn

felxi 11-25-2007 10:20 AM

hi weeno,
the issues are been solved. thank you for reporting.

regards,
felxi

weeno 11-25-2007 07:23 PM

Quote:

Originally Posted by felxi (Post 1389089)
hi weeno,
the issues are been solved. thank you for reporting.

regards,
felxi

Thanks,

Do you forsee any problems if I modify it to use the redirect code on all links, even those with ABINs in them?

arn

g00gl3r 11-26-2007 12:54 AM

reserved

djbaxter 11-26-2007 03:36 PM

Quote:

Originally Posted by g00gl3r (Post 1389422)
reserved

This is a serious question, not a flame: What is the purpose of a post like this? It seems to me it's more a non-post.


All times are GMT. The time now is 04:50 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.01317 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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