vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   convert ebay links to auctionads links (https://vborg.vbsupport.ru/showthread.php?t=144207)

Slapyo 04-07-2007 04:22 AM

convert ebay links to auctionads links
 
I think it would be a great mod if we could have ebay links get converted to auctionads links.

<removed>

It would be fairly easy i think. I looked at the amazon code but couldn't figure out how to make it work with this.

Basically, you just url encode the ebay link and stick it on to the end of the auction ads link:
Code:

http://ads.auctionads.com/pagead/link_{accountcodehere}_{campaigncodehere}_http%3A//www.ebay.com/blah
Anyone wanna do this!?

I guess the problem would be having to weed out links to ebay images. That way those images would still show up, but any links to ebay pages would be converted when displayed in the posts.

I'm horrible with preg_match. But I would think that the code would do something similar to this.

Check for all instances of [ u r l=http://cgi.ebay.com/someitem]a link[/url] and change the url to the auctionads link.
Check for all instances of [ u r l]http://cgi.ebay.com/someitem[/url] and convert that into the following [ u r l=http://auctionadslink]original ebay link[/url]

None of this would be saved to the database, it would just be parsed out right before displaying.

Dismounted 04-07-2007 06:26 AM

I might do this if I release my eBay affiliate link code.

Slapyo 04-07-2007 07:06 AM

i have some code already with the regex but i ran into a problem. i have 3 patterns.
Code:

1 - matches [.url.]http://cgi.ebay.com/blah[./url.]
2 - matches [.url=http://cgi.ebay.com/blah]link[./url.]
3 - matches http://cgi.ebay.com/blah

but when it runs, the patterns match more than once and it screws up the link.

i never really got into regular expressions at all, this is all new to me.

that would be great if you could do this one. you can find out how auctionads writes its urls if you go to the site, make an account and go to the url converter page.

Dismounted 04-07-2007 09:09 AM

I've released my eBay Affiliate code. I'll work out how these URL's work and make another hack for AuctionAds.

Slapyo 04-07-2007 01:01 PM

Great! Thank you very much!

Dismounted 04-08-2007 06:58 AM

Can you PM me a working auctionads link?

Thanks,
Dismounted

Dismounted 04-10-2007 08:50 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=144468" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=144468</a>

Tigur 04-10-2007 08:51 AM

Now that was fast.

Slapyo 04-10-2007 03:43 PM

thanks dismounted


All times are GMT. The time now is 06:51 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.01012 seconds
  • Memory Usage 1,722KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete