• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Adding search box to custom front page

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Page 1 of 2 12 Next LastLast
    Results 1 to 15 of 21

    Thread: Adding search box to custom front page

    • Thread Tools
      • Show Printable Version
    1. March 30, 2012 #1
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0

      Adding search box to custom front page

      Hello,

      I'm currently building my custome front page: http://alphaflight.net/showwiki/

      I would like to add in a search box, like is seen on the default front page. What code do I need to add a search field to a page?
      Reply With Quote Reply With Quote

    2. March 30, 2012 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      687
      You'll need to use HTML on the page, so HTML needs to be allowed for the forum the page is saved in. If you do that, you definitely want to use forum permissions to lock down who's allowed to edit the page.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. April 5, 2012 #3
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0
      Gotcha. since this page is in my content namespace, I'd have to make all my wiki allow HTML, which I'm not fond of the idea of; even though only site members can post/edit...How does the "special" page allow a search field? If it's outside the namespace, how can I make my custom front page so?

      If I were to allow HTML, what is the code that the default page uses to put in the search field?
      Reply With Quote Reply With Quote

    4. April 5, 2012 #4
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      Quote Originally Posted by Benjaminlwells View Post
      Hello,

      I'm currently building my custome front page: http://alphaflight.net/showwiki/

      I would like to add in a search box, like is seen on the default front page. What code do I need to add a search field to a page?

      you can also enable and add the Vbulletin sidebar, and put a wiki only search bar in it, like i did on http://www.birthright.net/forums/showwiki.php
      Reply With Quote Reply With Quote

    5. April 5, 2012 #5
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0
      Quote Originally Posted by Lord Doys View Post
      you can also enable and add the Vbulletin sidebar, and put a wiki only search bar in it, like i did on http://www.birthright.net/forums/showwiki.php
      Well, that's just perfect for me! I'm looking through my seetings, I don't see anything to enable that...
      [SIGPIC][/SIGPIC]
      AlphaFlight.net - The Home for Alpha Flight Fans
      Reply With Quote Reply With Quote

    6. April 5, 2012 #6
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      Quote Originally Posted by Benjaminlwells View Post
      Well, that's just perfect for me! I'm looking through my seetings, I don't see anything to enable that...
      you will need a mod from vbulletin.org (sidebar everywhere)
      http://www.vbulletin.org/forum/showthread.php?t=233871

      then add a custom block through your vbulletin control panel (forums & mods -> forum block manager)

      create a new block with
      Code:
      $templater = vB_Template::create('block_wikisearch');
      $content = $templater->render();
      return $content;
      then go to your styles and add a new template called: block_wikisearch

      put the folowing code in it:
      Code:
      <!-- Search Box -->
      
      <form action="search.php?do=process" method="post" id="searchform">
      <input type="hidden" name="s" value="" />
      <input type="hidden" name="do" value="process" />
      <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
      <input name="contenttype" value="VaultWiki_VaultArticle" type="hidden">
      <input id="keyword" class="textbox" name="query" tabindex="1" value="" type="text">
      <input class="button" value="Go" type="submit">
      <br />
      <label><input type="checkbox" name="titleonly" value="1" class="searchtype" style="margin: 5px 0 0 5px;" /> Search Titles Only</label>
      </form>
      </form>
      
      <!-- /Search Box -->
      if you want to let it show on wiki pages only, check the sidebar everywhere settings
      Reply With Quote Reply With Quote

    7. April 6, 2012 #7
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0
      Thanks Lord Doys,

      I had no issues with installing the product and creating the block, but I'll be darned if I can figgure out how to get the sidebar to appear at all on the wiki...I tried hunting through the wiki templates to add the strings listed in the install instructions for "Instructions for custom pages" but I can't find the strings they want found...

      How did you get it to show on your wiki?
      [SIGPIC][/SIGPIC]
      AlphaFlight.net - The Home for Alpha Flight Fans
      Reply With Quote Reply With Quote

    8. April 7, 2012 #8
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      Quote Originally Posted by Benjaminlwells View Post
      Thanks Lord Doys,

      I had no issues with installing the product and creating the block, but I'll be darned if I can figgure out how to get the sidebar to appear at all on the wiki...I tried hunting through the wiki templates to add the strings listed in the install instructions for "Instructions for custom pages" but I can't find the strings they want found...

      How did you get it to show on your wiki?
      hmm i cant remember doing something special about it.. its been a while
      the custom pages is only for php/hml files that dont belong to the vbulletin framework. i only use that on my interactive map but not for the wiki.

      nor can i see any wiki templates changed..
      i will have to look into it further
      Reply With Quote Reply With Quote

    9. April 7, 2012 #9
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      ah i found it

      i created a plugin under (admincp -> plugins & prods -> add new plugin)
      by the looks of it, i "linked" it to the member sidebar, so you can use the member show/hide option in the ESB options to turn it of and on

      product: Everywhere Sidebar
      Hook location: vault_article_complete (VaultWiki)
      title: wiki_sidebar
      execution order: 5

      plugin php code:

      Code:
      if ($bbandSBactive and $vbulletin->options['esidebar_memberlist']){
      require_once(DIR . '/includes/class_block.php');
      $show_sidebar = false;
      	$blockmanager = vB_BlockManager::create($vbulletin);
      	$sidebar = $blockmanager->getSidebarHTML();
      	if ($sidebar)
      	{
      		$show_sidebar = true;
      		if (function_exists(rebuild_sidebar))$sidebar=rebuild_sidebar($blockmanager,$sidebar);
      
      $templater = vB_Template::create('sidebarext_temp'); 
      $templater->register('sidebar', $sidebar);$templater->register('show_sidebar', $show_sidebar);$templater->register('button_top_sidebar', intval($vbulletin->options['esidebar_button_top']));$templater->register('width_sidebar', intval($vbulletin->options['esidebar_width']));$templater->register('margin_sidebar', intval($vbulletin->options['esidebar_width'])+20);
      $template_hook['sidebarext_temp']=$templater->render();
      $sidebarext_add = "' . \$template_hook['sidebarext_temp'] . '";        
      $sidebarext_search = '/\' \. \$footer \. \'/'; 
      $sidebarext_replace =  $sidebarext_add . "' . \$footer . '";               
      $memberlistSIDEBAR = preg_replace($sidebarext_search, $sidebarext_replace, $vbulletin->templatecache['vault_article_main']);
      $sidebarext_search = '/\' \. \$navbar \. \'/'; 
      $sidebarext_add ='<div id="content_container"><div id="content">';        
      if($vbulletin->options['sidebarposition']==0)$sidebarext_add ='<div id="content_container" class="contentright"><div id="content">';  
      $sidebarext_replace =  "' . \$navbar . '" . $sidebarext_add;               
      $memberlistSIDEBAR = preg_replace($sidebarext_search, $sidebarext_replace, $memberlistSIDEBAR);
      $vbulletin->templatecache['vault_article_main'] = $memberlistSIDEBAR;
      	}
      }
      Reply With Quote Reply With Quote

    10. April 7, 2012 #10
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      i now remember why i did it this way. I didnt want to hack 2 different products in case they are updated and things will be overwritten
      Reply With Quote Reply With Quote

    11. April 7, 2012 #11
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0
      Thanks again for helping me out with this LD, I tried made the plugin as you directed, it didn't go over too well. I got this when loading the wiki:
      Code:
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 15
      
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 15
      
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 15
      
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 18
      
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 18
      
      Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /hermes/waloraweb011/b1777/moo.benjaminlwells/vault/tab/article.php(712) : eval()'d code on line 18
      
      Warning: preg_replace() [function.preg-replace]: Unknown modifier 'd' in [path]/vault/tab/article.php(712) : eval()'d code on line 17
      
      Parse error: syntax error, unexpected T_STRING in /hermes/waloraweb011/b1777/moo.benjaminlwells/includes/class_core.php(4627) : eval()'d code on line 1
      [SIGPIC][/SIGPIC]
      AlphaFlight.net - The Home for Alpha Flight Fans
      Reply With Quote Reply With Quote

    12. April 7, 2012 #12
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      I have had some issues copying code blocks from this site as wel.
      I found out if quote the msg with the code, and select the code from the quoted msg.

      If that dont work, pm your email and ill send a txt file
      Reply With Quote Reply With Quote

    13. April 7, 2012 #13
      Benjaminlwells
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Benjaminlwells is offline
      Junior Member
      Join Date
      March 16, 2012
      Posts
      7
      Rep Power
      0
      ah, perfect that did it! Now you've got me wondering how you made the block for recent wiki changes? Is it custom code, or did you use the preset to look at the namespace forum?
      [SIGPIC][/SIGPIC]
      AlphaFlight.net - The Home for Alpha Flight Fans
      Reply With Quote Reply With Quote

    14. April 7, 2012 #14
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      687
      Fixed the bug with the backslashes inside the code block. It was a bug in VaultWiki, so your sites will have it too: https://www.vaultwiki.org/issues/2639/
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    15. April 8, 2012 #15
      Lord Doys
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Lord Doys is offline
      Junior Member
      Join Date
      September 27, 2011
      Posts
      45
      Rep Power
      181
      Quote Originally Posted by pegasus View Post
      Fixed the bug with the backslashes inside the code block. It was a bug in VaultWiki, so your sites will have it too: https://www.vaultwiki.org/issues/2639/
      cheers pegasus
      Reply With Quote Reply With Quote

    Page 1 of 2 12 Next LastLast

    Similar Threads

    1. How to get front page A-z index like NuWiki ?
      By Jules in forum VaultWiki Questions
      Replies: 5
      Last Post: April 4, 2012, 4:39 PM
    2. [Miscellaneous Hacks] Newest Wiki pages link, in Forumhome, and in Wiki front page
      By basketmen in forum vBulletin 3.x Addons
      Replies: 5
      Last Post: July 27, 2011, 4:45 AM
    3. Add 'New pages' and 'New pages' content to wiki front page
      By basketmen in forum VaultWiki Questions
      Replies: 6
      Last Post: July 20, 2011, 10:55 PM
    4. issue with Google Custom search engine results
      By mickknutson in forum General Discussion
      Replies: 1
      Last Post: July 10, 2011, 1:15 PM
    5. Promote a wiki article to CMS front page
      By stev in forum General Discussion
      Replies: 6
      Last Post: December 7, 2010, 3:57 PM

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • 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 Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 6:14 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.