Back to vBulletin 4.x Template Modifications

eBay Search function - code updated
Mod Version: 1.00, by scottkoz20

vB Version: 4.2.x Rating: (0 vote - 0 average) Installs: 1
Released: 02 Sep 2018 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Additional Files Re-usable Code  

Background Note for this Hack: My search functionality for eBay broke on my site 2 weeks ago and I got it re-working yesterday. This was something that was added onto my site year before I took over sportscardforum.com and I don't know if the original author is a member here (so if someone is the original author, please advise so I can provide the proper credit).

This hack is adding/updating eBay search functionality on your site.

1) If you do not have an eBay EPN Campaign ID, you will need to register for this first. You can go to https://epn.ebay.com/login to register.

2) Add the following code snippet to your Style that you want to modify the Navbar from the Navigation/Breadcrumb Templates. I have mine above the following (it's embedded with another mod)

Code:
{vb:raw ad_location.ad_navbar_below}
You will need to change the BOLD text to your eBay EPN Campaign

Code:
				
<form method="get" id="search-ebay-box" target="_blank" action="http://rover.ebay.com/rover/1/711-53200-19255-0/1?" >
<input type="hidden" name="type" value="3" />
<input type="hidden" name="campid" value="Your Campaign ID from EPN" />
<input tabindex="1" type="text" name="icep_uq" value="" maxlength="160" size="26" class="ebaytext" />
<input type="submit" value="Search" tabindex="3" />
</form>
You can play with this a bit, I use to have mine on the header of the site, but changed this earlier this year.

3) Save and test.

There is a Javascript code that you can add to put in a transparent overlay. The code would go directly AFTER the end form tag.

If wanted to use this, the image will need to be uploaded to your images/misc folder. Please change the BOLD text to be your site.

Code:
<script type="text/javascript">
(function() { var f = document.getElementById('search-ebay-box'); if (f && f.icep_uq) { var q = f.icep_uq; var n = navigator; var l = location; if (n.platform == 'Win32') { q.style.cssText = 'border: 2px solid #7e9db9; padding: 2px;'; } var b = function() { if (q.value == '') { q.style.background = '#FFFFFF url(YOUR SITE/images/misc/ebay_search.gif) left no-repeat'; } }; var f = function() { q.style.background = '#ffffff'; }; q.onfocus = f; q.onblur = b; if (!/[&?]q=[^&]/.test(l.search)) { b(); } } })();
</script>
This would be the final product



I do not know if this will work on VB3 or VB5. You'd have to test this out and that part of the reason I am going to mark this not supported.

I can try to answer and help where I can, but I know enough to be dangerous, not enough to be proficient.

Download

No files for download.

Screenshots

Similar Mods

vBulletin CMS Widgets eBay Search Box (Widget) vBulletin 4.x Add-ons

vblts.ru supports vBulletin®, 2022-2024