Google Custom Search Engine

  • Author
    Posts
  • #35198

    althenmorgey
    Member

    Is it possible to put the search bar on our blogs?

    The code is like this:

    <!– Google CSE Search Box Begins –>
    <form id=”searchbox_000820qic1rwscu” action=”http://google.com/cse”>
    <input type=”hidden” name=”cx” value=”000rwscu” />
    <input name=”q” type=”text” size=”40″ />
    <input type=”submit” name=”sa” value=”Search” />
    <input type=”hidden” name=”cof” value=”FORID:0″ />
    </form>
    <script type=”text/javascript” src=”http://google.com/coop/cse/brand?form=searchbox_0kqic1rwscu”></script>
    <!– Google CSE Search Box Ends –>

    #35316

    timethief
    Member

    No. It’s javascript and wordpress programming strips out all javascript for security reasons. If you like you can confirm this answer here pink sticky post at the head of the forum http://wordpress.com/forums/topic.php?id=467&replies=2 and here in the FAQs blog http://faq.wordpress.com/2006/05/07/javascript-can-i-use-that-on-my-blog/

    #35327

    realtebo
    Member

    ok, but why can’t you make an ecception !!!^??!?

    THIS IS AN ECCETIONAL THING for little blog !!!

    #35334

    raincoaster
    Member

    They don’t make exceptions because if they did, you could put something really dangerous in your blog, something that would screw up even just the people who glanced at it.

    A google search bar isn’t such a big deal, when you’ve already got a capable blog search box in your template. People already know how to find google if they need to search the web.

    If this is some kind of “how do I make money from my blog” question, the short answer is that you don’t if you’re using free WordPress hosting at WordPress.com. If you want to put ads, etc on it you have to download the WordPress software and host it yourself.

    #35615

    I want to use it to search my current WordPress blog which I’m elated with but also the archives of my old Blogdrive blog (which I loathed) so that there’s sort of no break in service between the two. There’s plenty of still-relevant info left on that old blog. I think you’ll find this is adequate justification for something that WordPress alone will not allow me to do. (and yes, I realize beggars should not be choosers– but I have had reason to expect a lot out of WordPress).

    Now Google does have a non-JavaScript code, so this should work based on the information above. However, it doesn’t. In fact, when saving it, WordPress just deletes the input tags. So is there some way to make this work?

    Code’s here:

    <form id="searchbox_015236274181698984450:frdj1vzvtfk" action="http://www.google.com/cse">
    <input type="hidden" name="cx" value="015236274181698984450:frdj1vzvtfk" />
    <table>
    <tr>
    <td><input name="q" type="text" size="40" /></td>
    <td><input type="submit" name="sa" value="Search" /></td>
    </tr>
    <tr>
    <td colspan="2"><span style="font-family:Arial, Helvetica, sans-serif; font-size:83%">Google Custom Search</span></td>
    </tr>
    </table>
    <input type="hidden" name="cof" value="FORID:1" />
    </form>

    #35616

    timethief
    Member

    Will you send a feedback to staff on this please with a link back to this thread? Tx

    #35617

    drmike
    Member

    It’s still a form. I’m sure you don’t want to risk the security of everybody’s blog here, right?

    #35618

    tho wordpress doesn’t seem to care about the form tag. are there some forms it allows?

    #35619

    mark
    Staff

    <form id=”searchbox_015236274181698984450:frdj1vzvtfk” action=”http://www.google.com/cse”>
    <input type=”hidden” name=”cx” value=”015236274181698984450:frdj1vzvtfk” />
    <table>

    We don’t allow those tags / actions. This is for security reasons.

    #35620

    how about you make us a widget then? :)

    #35621

    timethief
    Member

    (1) Please send in a feedback and the staff and developers will consider your request.

    (2) I don’t understand why you don’t either import your all blog contents from the other blog and delete what’s no longer relevant or alternatively copy and paste what’s relevant into your new blog. Many of us have done this.

    #35624

    drmike
    Member

    Agreed. Best bet would be to request this as a widget via feedback.

    You get extra points for writing the widget and submitting it. :)

    #35636

    emoneyonline
    Member

    but it does not work on my blog …how can i ad google search box.????

    #35637

    drmike
    Member

    Um, maybe reading the thread that you just posted in will give you an answer.

    Oh, by the way. Thanks for giving me a link to your spblog. It’s been reported. :)

    #35638

    cornell
    Member

    Ya know it’s funny DrMike, I reported it too. Just before I read your comment…

    #35639

    andrew
    Member

    I would also like to use Google custom search on my WordPress.com blog. I know I can’t, for the reasons given above.
    My workaround is to link to my Google custom search page. You can see this at:
    http://changingway.org/

    #35640

    raincoaster
    Member

    That’s a smart workaround.

    #35641

    drmike
    Member

    Agreed and I should have suggested it. It’s not a 100% though to what the original poster wanted but maybe it’ll work for the poster.

    And the spblog is gone. #7 for the day for me. :)

    #35642

    timethief
    Member

    @drmike
    Aww … sheet … your splog stats are better than mine :(

The topic ‘Google Custom Search Engine’ is closed to new replies.