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 - Amazon Integration (https://vborg.vbsupport.ru/showthread.php?t=119220)

rinkrat 08-04-2006 05:53 AM

Sweet! Can you make an Ebay version too?

soletrader 08-14-2006 12:20 PM

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
        <plugin active="1" product="vbulletin">
                <title>Amazon Affiliate URL</title>
                <hookname>bbcode_create</hookname>
                <phpcode><![CDATA[$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_amazon';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_amazon';

if (!function_exists('handle_bbcode_url_amazon'))
{
    function handle_bbcode_url_amazon(&$parser, $text, $link)
    {
        global $post;
        $parsedurl = $parser->handle_bbcode_url($text, $link);
        if (stristr($parsedurl, 'http://www.amazon.com')) {
                              $geturl = explode('"', $parsedurl);
                                    $amazon_url = explode('/', $geturl[1]);
                                        $size_url = count($amazon_url);
                                        $i = 0;
                                        while ($i <= $size_url) {
                                            if ($amazon_url["$i"] == 'ASIN') {
                                                          $i++;
                                                                $parsedurl = preg_replace('/href="(.*)"/U', 'href="http://www.amazon.com'. $amazon_url["$i"] .'/myID"', $parsedurl);
                                                                break;
                                                        }
                                                        $i++;
                                        }
                                }
              return $parsedurl;
    }
}]]></phpcode>
        </plugin>
</plugins>

Here is my code. I cant seem to get it to work.

http://www.traderslaboratory.com/for...?p=117#post117

Can anyone help me figure this out? Thank you in advance.

RetroDreams 08-24-2006 03:01 AM

Is this working on 3.6 Gold?

Taco John 08-29-2006 08:30 AM

Quote:

Originally Posted by rinkrat
Sweet! Can you make an Ebay version too?



I was just going to ask that! :)

Pagandream 11-07-2006 01:30 PM

Quote:

Originally Posted by RetroDreams
Is this working on 3.6 Gold?

for me not :(

Markith 11-27-2006 11:55 AM

Anyone know if there is a working amazon hack out there????

logastro 01-05-2007 07:23 PM

Yeah, a working version could be interesting (and better with over affiliation possibilities)

amykhar 01-05-2007 08:38 PM

I hate advertising in other people's threads, but mine still works for 3.6.x

logastro 01-06-2007 07:29 PM

Oh thanks a lot!

imranbaig 01-09-2007 07:07 AM

I installed this and changed url to .com and edited my own Affiliate ID, now whats next??


All times are GMT. The time now is 03:02 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.01033 seconds
  • Memory Usage 1,738KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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