PDA

View Full Version : Integration with vBulletin - CES Wiki Simple Search Integration


thincom2000
01-15-2007, 10:00 PM
CES WIKI SIMPLE SEARCH INTEGRATION
Version: 1.0.3
Works with MediaWiki 1.6.8+, vbWiki Standard (https://vborg.vbsupport.ru/showthread.php?t=136242), and vbWiki Pro.

*** NEWS ***
2/2/2007 - v1.0.3 released
1/20/2007 - v1.0.2 released
1/16/2007 - v1.0.0, v1.0.1 released

Products to Install: 1
Plugins Included: 1
Files to Upload: 0
Template Edits: 2
Files to Edit: 0

What It Does:
Combines the Wiki & Forum search fields, allowing users to search the Wiki from your forum. If you are using vbWiki Pro and using the vBulletin skin, now you can get rid of the extra search box, because vBulletin's will do both!

The way it works is: if you are searching the forum, it takes you to the normal forum results page. If you select the option to Search the Wiki, instead it automatically takes you to the Special:Search page displaying the appropriate results, forwarding the article, or if it doesn't exist, telling you to create the page.

*** Changelog ***
As of Version 1.0.3:
- fixed bug where Advanced Search for posts would return threads
- updated template edits: search_forums

As of Version 1.0.2:
- Fixed bug where uninstalling other CES products would make some settings disappear

As of Version 1.0.1:
- If article exists, load the article.
- If article doesn't exist, display "you can create" message.

*** Screenshots ***
1. Pop-up Navbar Search

MaestroX
01-16-2007, 07:49 AM
Great thankyou for this mod :)

Very usefull

*Installed

thincom2000
01-18-2007, 04:16 AM
You're welcome. I actually originally tried writing a Full Search Integration, where it would allow selecting Advanced Criteria for both in one search, and show results from both on the same page. However, that required replacing vBulletin's search.php, and it was a pain to get the two sets of results to synchronize. The script was slow, had too many queries, and I just got fed up with doing it.

So I came out with this SIMPLE version. :p

redlabour
01-18-2007, 05:04 AM
Great one! :)

sait.dogan
01-27-2007, 02:29 PM
Great, thank you for this mod.

Very usefull.

thincom2000
02-02-2007, 10:32 PM
Hm... so I see no one found this bug in all this time.

v1.0.2 and lower has the following bug:
In Advanced Search, with "Search Forums" selected -
selecting "Show Results as -> Threads" will return results as Threads.
selecting "Show Results as -> Posts" will return results as Threads.

This issue has been fixed in v1.0.3 with a new template edit for template search_forums. You should revert the template before doing this or it won't solve anything.

redlabour
02-19-2007, 01:45 PM
Nominated for HoM. ;)

RedGTiVR6
03-08-2007, 12:09 PM
Quick issue.

I didn't see it noted in the instructions.

I've uploaded this and made the changes to the templates, but when I try and search in the Wiki, I'm taken to a completely different web page: http://www.yourdomain.com/dtz4.php

I realized that this probably ment that there was something in the code that was calling http://www.yourdomain.com

So I went into the .xml file and found it once. Uploaded again (allowing overwrite) and tried it again. Worked.

Now I'm running into issues with the actual link.

I'm not sure if this is just something with our wiki....but it needs the index.php after wiki/ (so /wiki/index.php). Changed this in the .xml as well and I've found a new issue.

Now I'm getting a problem with the link that is generated:

This link works: http://www.mp3car.com/wiki/index.php/Special:Search?search=tuning

This link doesn't: http://www.mp3car.com/wiki/index.php/Special:Search&search=tuning&go=Go

The first link is one that I get when using the WIKI search function. The second is what I get when using the modified search function.

OK - figured it out. In the .xml file I searched for "&search" and found it in here:

<![CDATA[$globals = array_merge( $globals, array( 'showwiki' => TYPE_UINT ) );

$vbulletin->input->clean_array_gpc('r', $globals);

if ($vbulletin->GPC['showwiki'] == 2)
{
exec_header_redirect( $vbulletin->options['wiki_search_path'] . '&search=' . $vbulletin->GPC['query'] . '&go=Go' );
}
else if ($vbulletin->GPC['showwiki'] == 1)
{
$vbulletin->GPC['showposts'] = true;
}
else if ($vbulletin->GPC['showwiki'] == 0)
{
$vbulletin->GPC['showposts'] = false;
}]]>

I changed it to be "?search" instead of "&search" and uploaded it allowing overwrite.

Now the search function works fine.

I'm not sure if these issues are specific to our forum and our wiki or if this is an issue that would be common on all wikis/forums, but I wanted to outline what I had to do to solve it incase someone else runs into the same issues.

*installed*

thincom2000
03-08-2007, 03:57 PM
Hi, these seem to be isolated issues with your setup. I'm a little bit perplexed why you needed to edit the XML to change www.yourdomain.com specifically. There should have been a setting for this in the AdminCP, as well as a setting for the path to Special:Search that you could have played with until it went to the correct page.

It may have something to do with using /wiki/index.php/Special:Search instead of just /wiki/Special:Search, in your particular setup. I have had no problems using & instead of ? on such setups in the past.

???

RedGTiVR6
03-08-2007, 05:21 PM
hrmm - nothing was mentioned about an options menu in the Admin CP.

The instructions just stated upload the .xml and you're ready.

daFish
03-13-2007, 09:34 AM
Great product. Thanks thincom2000. :)

myregistration
06-04-2007, 02:15 AM
Hi,

I have vBulletin 3.6.7, MediaWiki, and vbWikiPro installed.

I've installed this Plugin with but it's not replacing the old Search popup in the vBulletin navbar. Any advice? Thanks!

:)

thincom2000
06-04-2007, 04:53 AM
I've installed this Plugin with but it's not replacing the old Search popup in the vBulletin navbar. Any advice? Thanks!

There are template edits mentioned in the readme.txt.

myregistration
06-04-2007, 08:45 AM
Hi thincom2000, thanks for your quick response!

My current version of vBulletin is 3.6.7. Has the replacement code changed with version vBulletin 3.6.7? I was able to modify the popup box, but the change I had to make to the navbar Search popup was a little different than the readme.txt file, described below.

When I submit a search in the popup box on the vbulletin pages it works fairly well. Though, if no Article search results are found it redirects me to my website's login page.

When I use the popup on the Wiki side, it takes me to the vBulletin search page and does not auto fill the keywords for the query field.

For the Wiki side, do I need to configure MediaWiki or vbWikiPro for the hook? Any ideas?

For the Special:Search page url, the following format worked best for my environment:
http://www.yourdomain.com/forum/index.php?ns0=1&searchx=Search

* the keywords will be appended by code in format &search=keywords

Thanks! :)


<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>


I replaced the above with the following code ...


<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<form action="search.php" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<!-- *** OMITTING THE FOLLOWING FIELDS ***
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
-->
<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<label for="rb_nb_sp0"><input type="radio" name="showwiki" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
<br>
<label for="rb_nb_sp1"><input type="radio" name="showwiki" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
<br>
<label for="rb_nb_sp2"><input type="radio" name="showwiki" value="2" id="rb_nb_sp2" tabindex="1004" />$vbphrase[show_wiki]</label>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</form>
</div>
<!-- / header quick search form -->
</if>

RedGTiVR6
02-27-2008, 06:20 PM
anyone know if this will work with 3.7?