> Forums > Active Forums > Themes and Templates > Adding a Quick Search Box to your site
Last Post 10 May 2011 01:44 AM by Victor. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Will Morgenweck Forum Admin
DotNetNuke Staff
Will Morgenweck
Post Count:7671

--
11 Jan 2011 11:23 PM
    • DotNetNuke Version: 5.6.0
    • Active Forums Version: 4.3.3
    Here is a quick way using Active Social that you can add a quick forum search box as module to your site.

    All you need to do is create a custom view in Active Social with the following code and then add it to a page.  You will need to update the URL based upon your site.  Easy thing to do would be to go to your forum search page, enter the word test then click search.  Copy everything in the URL from the end of your domain name to "q/"  then replace that section in the code snippet below.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7671

    --
    11 Jan 2011 11:23 PM
    
    <script type="text/javascript">
        function doAFSearch(){
        var q = document.getElementById('txtAFSearch').value;
        q = encodeURIComponent(q);
        window.location.href='/community/forums/tabid/68/afv/search/q/' + q + '/default.aspx';
    };
    </script>
    <input type="text" id="txtAFSearch" value="" onkeydown="if(event.keyCode == 13){doAFSearch(); return false;}" />
    <input type="button" id="btnAFSearch" value="Search" onclick="doAFSearch(); return false;" />
    
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Victor
    Customers
    Victor
    Post Count:5

    --
    10 May 2011 01:44 AM
    Posted By Will Morgenweck on 12 Jan 2011 12:23 AM
    
    &#60;&#105;&#110;&#112;&#117;&#116;&#32;&#116;&#121;&#112;&#101;&#61;&#34;&#116;&#101;&#120;&#116;&#34;&#32;&#111;&#110;&#107;&#101;&#121;&#100;&#111;&#119;&#110;&#61;&#34;&#105;&#102;&#40;&#101;&#118;&#101;&#110;&#116;&#46;&#107;&#101;&#121;&#67;&#111;&#100;&#101;&#32;&#61;&#61;&#32;&#49;&#51;&#41;&#123;&#100;&#111;&#65;&#70;&#83;&#101;&#97;&#114;&#99;&#104;&#40;&#41;&#59;&#32;&#114;&#101;&#116;&#117;&#114;&#110;&#32;&#102;&#97;&#108;&#115;&#101;&#59;&#125;&#34;&#32;&#105;&#100;&#61;&#34;&#116;&#120;&#116;&#65;&#70;&#83;&#101;&#97;&#114;&#99;&#104;&#34;&#32;&#47;&#62;
    &#60;&#105;&#110;&#112;&#117;&#116;&#32;&#116;&#121;&#112;&#101;&#61;&#34;&#98;&#117;&#116;&#116;&#111;&#110;&#34;&#32;&#111;&#110;&#99;&#108;&#105;&#99;&#107;&#61;&#34;&#100;&#111;&#65;&#70;&#83;&#101;&#97;&#114;&#99;&#104;&#40;&#41;&#59;&#32;&#114;&#101;&#116;&#117;&#114;&#110;&#32;&#102;&#97;&#108;&#115;&#101;&#59;&#34;&#32;&#118;&#97;&#108;&#117;&#101;&#61;&#34;&#83;&#101;&#97;&#114;&#99;&#104;&#34;&#32;&#105;&#100;&#61;&#34;&#98;&#116;&#110;&#65;&#70;&#83;&#101;&#97;&#114;&#99;&#104;&#34;&#32;&#47;&#62;
    

    This is great, thanks for the code. I wonder if I can add a field of date to the "search" or by authors. Thanks, V--
    You are not authorized to post a reply.
    > Forums > Active Forums > Themes and Templates > Adding a Quick Search Box to your site
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy