Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2012, 04:26 AM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Linking to Pollstar Search Engine (embedded code - where to put?)

Hello,
I want to include in my website an embedded search engine from the website Pollstar (http://www.pollstar.com). It would include what looks like a google search window but it is for concerts.

I want to put this in a main page in my news section (at the top right), and also in a forum post (which I will make a "sticky").

Can you please tell me where I can embed the code, for these two locations? I'm really worried about messing up my website by putting code where I shouldn't put it.

Here is the link to the Pollstar page which discusses the different options for embedding: http://www.pollstar.com/linkToUs.aspx

Here is the code I want to embed, which if I am not mistaken would be all I need:

<img src="http://www.pollstar.com/images/logo.gif" width="100" alt="Powered by Pollstar" /><form action="http://www.pollstar.com/eventSearch.aspx?" method="GET"><input type="text" name="SearchBy" id="SearchBy" /> <input type="submit" value="Search" /></form>
Reply With Quote
  #2  
Old 05-16-2012, 05:21 PM
webmastershome webmastershome is offline
 
Join Date: Apr 2005
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi there

you have not mention the site url to find top right side.

It's look like very simple edit the template section

admincp-> style manager - > select the template to edit ( past the code )

try this
Reply With Quote
  #3  
Old 05-17-2012, 01:06 AM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But which template?
Reply With Quote
  #4  
Old 05-21-2012, 12:25 PM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody?
Reply With Quote
  #5  
Old 05-21-2012, 12:38 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As someone mentioned above, we can't tell you how to add it to your main page without more information (ideally a link to your main page).

The problem with including it in a post is that you normally can't put html in a post (and it's not a good idea to enable html). What you could do it create a new bbcode and put that html as the replacement, then you can use the bbcode in a post.

If you're worried about experimenting with inserting the code in templates, you could create a new style and use that to experiment, then if it gets messed up just delete it (you just need to be careful when you're editing template to make sure it's a template in your experimental style).
Reply With Quote
  #6  
Old 05-21-2012, 01:24 PM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or I could just copy and paste the old code into a notepad, then if it gets messed up I can replace the new code with the old (copied) code, right?

How can I create a new bbcode and put the html as the replacement?
Reply With Quote
  #7  
Old 05-21-2012, 04:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave234 View Post
Or I could just copy and paste the old code into a notepad, then if it gets messed up I can replace the new code with the old (copied) code, right?

Sure, of course you can do that. The only thing is if you had a busy site, your members might see some strange things happening while you experiment.


Quote:
How can I create a new bbcode and put the html as the replacement?
Find "Custom BB Codes" on the left in the adminCP, click on "Add New BB Code" and go from there. The code would go in the replacement text box, and the rest you can probably figure out (you can use the help by clicking on the ? icons). The only thing I'd mention is that you'd want to set "Remove Tag if Empty" to No. You can leave the other radio buttons set at the default.

So maybe you put pollstar as your tag name, then in the post you'd just put [pollstar][/pollstar] (you can also use that as the "example" when you're creating the bbcode). It's a bit of a hack because anyone will be able to use that in a post and insert a search box, but it's otherwise harmless.
Reply With Quote
  #8  
Old 05-22-2012, 05:01 PM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just made the BB code and did in my forum post, and the image looks good. It has the search box next to the "Pollstar" logo.

However, when I enter a band name and click enter it takes me to a page that says:

"Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error."
Reply With Quote
  #9  
Old 05-22-2012, 05:30 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh...yeah, I didn't notice that your code includes a form, and I think the problem is that for admins and moderators the posts are already inside a form, and you can't nest them.

Given that there's only one input field (SearchBy) and it's method="GET", it should be the same as going to the url http://www.pollstar.com/eventSearch....archBy=keyword, so you could probably replace the form with some javascript that sets location.href to that url. But you'd also need to encode the search term for a url...it starts going from an easy hack to a complicated one.
Reply With Quote
  #10  
Old 05-22-2012, 05:32 PM
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually it works now. Strangely enough, when I place the in the first post, it shows that error. However, when I do it in a reply post, it works! All the BB code is enabled in the forum.....so I have NO IDEA how this it's not working, ha ha
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:13 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.04442 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete