vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - eBay Search function - code updated (https://vborg.vbsupport.ru/showthread.php?t=326698)

scottkoz20 09-01-2018 09:00 PM

eBay Search function - code updated
 
1 Attachment(s)
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

https://vborg.vbsupport.ru/external/2018/09/1.gif

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. :erm:

scottkoz20 09-02-2018 05:13 PM

reserved


All times are GMT. The time now is 09:19 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.01644 seconds
  • Memory Usage 1,718KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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