SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how should i opened Google results within the same page?

    hi friends i need your help
    i wanted to setup the google search box in my website, i m using wordpress. how can i opened the results with in same page...
    i put the code on side bar, and then it say the , place next code, where you want to display the results. how i can do that??

    help me

    www.smashinghub.com
    kindly identify the code where should i placed it

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    You could use fancybox - scroll down and click on "Iframe (75% width and height)"

  3. #3
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by EricWatson View Post
    You could use fancybox - scroll down and click on "Iframe (75% width and height)"
    can u guide me, how should i install this? is it plugin ?

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,750
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    THey have a How to Use link
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  5. #5
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    THey have a How to Use link
    any easy way doing this ?? so much confused me ??? plz help

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,750
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Their instructions are pretty easy to follow, what are you having troubule with?
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  7. #7
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Their instructions are pretty easy to follow, what are you having troubule with?
    sir, kindly see this screen shot, i put the

    in my sidebar
    <form action="http://www.smashinghub.com" id="cse-search-box"> <div> <input type="hidden" name="cx" value="partner-pub-4275345795509435:t9w8r8-r2vi" /> <input type="hidden" name="cof" value="FORID:11" /> <input type="hidden" name="ie" value="ISO-8859-1" /> <input type="text" name="q" size="30" /> <input type="submit" name="sa" value="Search" /> </div></form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>


    this code after <div id="content">
    <div id="cse-search-results"></div><script type="text/javascript"> var googleSearchIframeName = "cse-search-results"; var googleSearchFormName = "cse-search-box"; var googleSearchFrameWidth = 500; var googleSearchDomain = "www.google.com"; var googleSearchPath = "/cse";</script><script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
    but i wanted to disppeared the content, it only show the search results and the sidebar
    any idea

    kindly open www.smashinghub.com and search any thing, u will get the idea

  8. #8
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,750
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Hi, for one thing I don't see the <script>'s included
    Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.0.pack.js"></script>
    Nor do I see the stylseheet linked
    Code:
    <link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.0.css" type="text/css" media="screen">
    What exactly did you do when you read hte How to Use link?
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  9. #9
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Hi, for one thing I don't see the <script>'s included
    Code:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.0.pack.js"></script>
    Nor do I see the stylseheet linked
    Code:
    <link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.0.css" type="text/css" media="screen">
    What exactly did you do when you read hte How to Use link?
    now i put the code, you can see , now

    see this screen shot, i wanted to sustain the my sidebar along with the results page, but it moved down and also show the post content of the front page

  10. #10
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I forgot, I did a tut on that a while back... http://www.visibilityinherit.com/cod...y-fancybox.php

    if you can't get that going, then a search like this will likely help... http://www.google.com/search?q=widge...&client=safari

  11. #11
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aliqayyum View Post
    but i wanted to disppeared the content, it only show the search results and the sidebar
    If you want the search results to replace the content instead of pushing it down, try placing the second code snippet that you placed after <div id="content"> on a blank Page instead of in your template.

    The Iframe option that you are using allows you to specify the URL the results will display on.

    • Create a new Page in Wordpress and call it 'Search Results' or something.
    • add the Search results code into the new page.
    • In your Google custom search settings...go to the Get Code link where you got the other snippets of code...and in the Specify search results details section on top, type in the URL of the new page.

    When someone does a search, that should give you just the search results on the left instead of results and content.

  12. #12
    SitePoint Wizard co.ador's Avatar
    Join Date
    Apr 2009
    Posts
    1,054
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.visibilityinherit.com/cod...y-fancybox.php

    the link above has 6 steps on how to use it with jquery.

    what have been your results so far?

  13. #13
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agarcia831 View Post
    If you want the search results to replace the content instead of pushing it down, try placing the second code snippet that you placed after <div id="content"> on a blank Page instead of in your template.

    The Iframe option that you are using allows you to specify the URL the results will display on.

    • Create a new Page in Wordpress and call it 'Search Results' or something.
    • add the Search results code into the new page.
    • In your Google custom search settings...go to the Get Code link where you got the other snippets of code...and in the Specify search results details section on top, type in the URL of the new page.

    When someone does a search, that should give you just the search results on the left instead of results and content.
    hi thanks for the replying

    i created the new page name as find.php and placed that code..

    in blank page

    <div id="content">
    <div id="cse-search-results"></div><script type="text/javascript"> var googleSearchIframeName = "cse-search-results"; var googleSearchFormName = "cse-search-box"; var googleSearchFrameWidth = 500; var googleSearchDomain = "www.google.com"; var googleSearchPath = "/cse";</script><script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
    it is not worked still

  14. #14
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm...I'm a little confused as to why the new page would have a .php extension...

    just to make sure...

    1. you created a new/blank Wordpress Page?...similar to your About Us Page or Contact Us Page?

    2. you put the URL to that blank page into the Specify search results details section in your Google custom search control panel?


    EDIT: make sure you copy the code into the HTML tab of the Wordpress Page and not the Visual tab.

  15. #15
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agarcia831 View Post
    hmm...I'm a little confused as to why the new page would have a .php extension...

    just to make sure...

    1. you created a new/blank Wordpress Page?...similar to your About Us Page or Contact Us Page?

    2. you put the URL to that blank page into the Specify search results details section in your Google custom search control panel?


    EDIT: make sure you copy the code into the HTML tab of the Wordpress Page and not the Visual tab.
    now i m little bit getting the point.

    i got the control panel of Google in adsense. now last point, i got three options of layouts, compact, fixed and open the frame in new page

    now i selected the new page
    it given me two codes of search engine right?

    first i placed , where i wanted to display the search box right, and second, the results box, where the page show the resutls..

    as u suggested the number 1 point, can explain,

    i made the new page from wordpress dashboard... can u little give me an examples !!! plx

  16. #16
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    let's see if images will help then...

    Step 1: In your Wordpress Dashboard, go to the Pages tab and click Add New...just like how you added the About Us and Contact pages to your site.



    Step 2: In your new Page, paste the code for the results box. Since it's code you are pasting in, make sure you are in the HTML tab (circled in red below) and not the Visual tab. Title/Name the page, then Publish it.



    Step 3: In your Google custom search control panel, go to the section where you got the two separate code snippets. In the top section (highlighted in yellow below), type in the URL address of the new page for the search results...for example: http://www.www.smashinghub.com/find/



    Notice that the URL is added to the search box code (in red box above) as you type it.
    You will have to add or change that value in the search box code on your site (red text in the search box code below)...

    Code:
    <form action="http://www.www.smashinghub.com/find/" id="cse-search-box">
      <div>
        <input type="hidden" name="cx" value="013723053986055911592:k-qc7jh47_g" />
        <input type="hidden" name="cof" value="FORID:10" />
        <input type="hidden" name="ie" value="UTF-8" />
        <input type="text" name="q" size="31" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
    <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>

    does that help clear anything up a little?

  17. #17
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [QUOTE=agarcia831;4506736]let's see if images will help then...

    thanks a lot
    problem solved

    last point, how i can create the empty widget , i wanted to insert the facebook gadget below the "connect to us"

    where i insert my fan page code
    thanks in advance

  18. #18
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your welcome. glad it worked.

    If that whole sidebar is widget-enabled, just go the the Appearance tab in your Wordpress Dashboard...to the Widgets link. In the Available Widgets area, find and drag the Text widget box (circled in red) to the far right...to the Sidebar box...



    You will have to look to find the Connect To Us widget in the Sidebar box and drag the Text widget under it. Once placed, the widget will open up a text box so you can paste your code in and save.

  19. #19
    SitePoint Addict aliqayyum's Avatar
    Join Date
    Oct 2009
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agarcia831 View Post
    your welcome. glad it worked.

    If that whole sidebar is widget-enabled, just go the the Appearance tab in your Wordpress Dashboard...to the Widgets link. In the Available Widgets area, find and drag the Text widget box (circled in red) to the far right...to the Sidebar box...



    You will have to look to find the Connect To Us widget in the Sidebar box and drag the Text widget under it. Once placed, the widget will open up a text box so you can paste your code in and save.
    thanks , can i use my categories in navi menu too. ! replacement of home, about us etc
    or just below

  20. #20
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, you can use a list of your categories at the top. you just have to place the right tag (code) in your template where you want it.

    http://codex.wordpress.org/Template_...ist_categories

    There's the Wordpress documentation page for the template tag to create a category list. Toward the bottom of the page, there are several examples of the code you would add to your template, depending on what you want.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •