Posts Tagged ‘Installation’

Woogle configuration Error: Class ‘WoogleQueryServiceNative’ not found

Friday, March 26th, 2010

Hi everyone,

I had a little problem with the Woogle installation, but was able to solve
it. Just posting to allow for the “debug by googleing” procedure we
all know.

I installed the remote backend and the extension. Search now uses
Woogle, but obviously tries to access the native version:

Fatal error: Class ‘WoogleQueryServiceNative’ not found in /var/www/
15.1/wooglewiki/extensions/Woogle/includes/WoogleUtil.php on line 179

I found the solution in the …/extensions/Woogle/addons/Remote/
Remote.php.

The config settings displayed on http://www.teamweaver.org/wiki/index.php/Woogle4MediaWiki/Configuration
are not complete - the actual setting that makes Woogle switch to
remote mode is missing. The complete version is:

I found the solution in the …/extensions/Woogle/addons/Remote/Remote.php:

The config settings displayed on http://www.teamweaver.org/wiki/index.php/Woogle4MediaWiki/Configuration are not complete - the actual setting that makes Woogle switch to remote mode is missing. The complete version is:

LocalSettings.php:

require_once(”$IP/extensions/Woogle/Woogle.php”);

// Woogle Configuration

WoogleConfig::set(’indexAddon’, ‘Remote’); // set the respective backend URL here

WoogleConfig::set(’remoteBaseServiceUrl’, ‘http://octopus13.fzi.de:9999/teamweaverIS-backend/services/’); // set the respective backend URL here
WoogleConfig::set(’remoteAuthKey’, ’secret’); // key for querying, only required if the backend is set to securityEnabled = true;
WoogleConfig::set(’indexGroups’, array(’group1′, ‘group2′));
WoogleConfig::set(’indexRepository’, ‘123′); // numeric id for indexing (repoId) - as configured in the backend repo_config.xml
WoogleConfig::set(’remotePushIndexAuthKey’, ’secret2′); // key for indexing - as configured in the backend repo_config.xml

Great app, though. This is what we all have been waiting for, so make sure to keep going!
Achim

I posted this to the Woogle Mailinglist, but it was said to be postponed for supervision by the admins. As far as I know the initiator of the project is on holiday for a couple of weeks (at least I read his Email Responder that way…), so I cross posted it here.

Ubiquity-Script for documentation of your browsing in a wiki (knowlets)

Saturday, March 21st, 2009

This Ubiquity Script (know Command) helps keeping track of your ideas (I call these snippets “knowlets”) and what you found out while browsing the web while doing research (or, in my case, trying to get an overview over team performance reports, client communication and project protocols distributed over 4 blogs, 5 wikis, 1 drupal and 1 mantis…).

Howto use it:

The idea came up, when I discovered the famous fyi Script by Mike Chambers - THE script to explain people what Ubiquity is good for by the way. Credits to Christian Sonne for his support, who answered my silly question about TABs (no RTFM!) and the community who helped me out of my hassle with the ever-crashing alpha release.

The script is made for MediaWiki syntax, but can easily adapted for others…

Code:
/*
Copyright (c) 2009 Achim Bode
For Copyright-Notice and Details pls see bottom of the script...

This Version is written for Ubiquity Version 0.5 with Parser 1

This Script allows for easily kepping track of your research:
with one or two clicks it pastes all necessary context information into a wiki page opened in a different tab:
* what you found on the web page (text selection on the page)
* why you want to remember it (a comment you can optionally add behind the "know" command)
* the URL
* the page title

installation:
* install Ubiquity Addon on Firefox
* install this script (click subscribe if you do not need adaptations - otherwise copy this code, go to about:Ubiquity -> "create command" page and paste it there, then change parameters as described in the next line)
* adapt the values for pageTitleSequence and editorTextAreaID (currently it works for German Mediawiki pages in the namespace "Knowlets")
* open a wiki page in edit mode

usage:
* mark some interesting text on any webpage
* click Alt+Space to open Ubiquity
* type "know" into the commandline (the command for this script)
* if you want, add a line why you wanted to remember this piece of text behind the know command (example: know das hier wollte ich mir merken, weil ich es für die Masterarbeit brauchen kann)
* hit return

everything you need to know to pick up and follow this idea later should now be inserted into your open wiki page. you have to save it manually.

*/

CmdUtils.CreateCommand({
name: "know",
homepage:"http://blog.achimbo.de",
author:{name:"Achim Bode", email:"jo@achimbo.de"},
license:"MIT",
version:"091031",
takes: {"to (optional)": noun_arb_text},

description:"Vers. 090709-05. logs current page in an open mediawiki page: url, title, your comment in Ubiquity command line if provided, and marked text on the page.",

help:"If text from the current page is selected, the command will paste the selected text and current url, the page title and the text entered into the console in the wiki. Please adapt the variables pageTitleSequence (some Sequence of text appering in every pagetitle of your wiki in edit mode) and editorTextAreaID (open a wiki page in edit mode, choose 'View - Page Source' in Firefox - you'll find it when you search for 'textarea' in the source code).",

pageTitleSequence: "Bearbeiten von Knowlet",
editorTextAreaID: "wpTextbox1",

preview: function( pblock, konsole )
{
var doc = this.getDocument();
var sel = this.getSelection();

//generate the preview
var headline = "knowlet:
“;
var ausgabe = this.createString( konsole );
//ausgabe += this.createDebugString();
//var ausgabe = this.getSelection() );
//var ausgabe = this.objectToString( this.getTextAreaWithSelection() );
ausgabe = headline + ausgabe;

pblock.innerHTML = ausgabe;
//displayMessage( this.createString( konsole ) );
},

getTextAreaWithSelection:function(){
var textareas = this.getDocument().getElementsByTagName(”textarea”);
for (var i=0; i < textareas.length; i++) {
var ta = textareas[i];
if (ta.selectionStart != ta.selectionEnd) return ta;
//am Anfang sind beide = Textlänge, dann letzte Position (auch wenn TA ohne Fokus)
}
return null;
},

getSelectedTextFromTextArea:function( ta ) {
return ta.textContent.substr( ta.selectionStart, ta.selectionEnd);
},

getKnowletEditor: function() {
return this.getLastTabStartingWith( this.pageTitleSequence ).document.getElementById( this.editorTextAreaID );
},

getKnowletContent: function() {
return this.getKnowletEditor().value;
},

pasteKnowlet: function( appendText ) {
this.getKnowletEditor().value = this.getKnowletContent() + appendText;
},

/*createDebugString: function () {
return "DebugString";
}*/

getLastTabStartingWith: function( title ){
var tabs = Utils.tabs.search( title );
//displayMessage( "getLastTabStartingWith: " + this.objectToString( tabs ) );

// old Parser1 syntax:
/*var kompletterSeitenName = "";
var gefunden = false;
//finde den letzten Seitennamen im Hash-Objekt, das von Utils.tabs.search( title )
//zurückgegeben wurde (die Seitennamen stehen im prop-Enumerator/-Iterator):
for (prop in tabs){
kompletterSeitenName = prop;
gefunden = true;
}
if( !gefunden ) this.onNoKnowletOpen();
var tabs = Utils.tabs.get( kompletterSeitenName );
return tabs;*/

// new Parser1 syntax:
var gefunden = tabs.length > 0;
if( !gefunden ) this.onNoKnowletOpen();
return tabs[ tabs.length-1 ];
},

onNoKnowletOpen: function() {
displayMessage(”ACHTUNG: Kein Knowlet geöffnet”);
},

objectToString:function( o ) {
var str = “”;
for (var prop in o) {
str += prop; //Property-Name anzeigen
str += ” = ” + o[prop]; //Property-Inhalt anzeigen
str += ” [" + typeof( o[prop] ) + “]”; // Datentyp anzeigen
str += “
“; // Zeilenumbruch hinzufügen (Listenansicht)
}
return str;
},

scrollEditorToBottom:function() {
var ta = this.getKnowletEditor();
if(ta && ta.createTextRange){
rng=ta.createTextRange();
rng.collapse(false);
rng.select();
}
},

createString: function( konsole ) {
var doc = this.getDocument();
var sel = this.getSelection();
var title = doc.title;
var url = doc.location.href;
var string = “”;

var eintrag = konsole.text; // konsole.text oder konsole.html verwenden?
if ( eintrag == sel ) eintrag = “”; // wenn identisch mit Selektion, dann weglassen
// Wenn nicht leer (”") 2 Returns einfügen (bei “” kommen danach ohnehin 2 Zeilenumbüche)
// alle Backslash-n \n durch echte Linefeeds ersetzen
if ( eintrag != “” && eintrag != undefined ) { //wenn Eintrag Konsole, dann Eintrag fett…
var semikolon = ( eintrag.charAt(0) != “=” ) ? “;” : “”; // Semikolon wird nur gesetzt, wenn keine Überschrift
string = “\n\n” + semikolon + eintrag.replace(/\\n/g, “\u000a”) + “\n\n” + title + “\n\n” + “:” + url;
// bereits im String enthaltene Linefeeds müssen ersetzt werden sonst werden sie “woertlich” ausgegeben
} else { // sonst Seitentitel fett drucken (;)
string = “\n\n;” + title + “\n\n” + “:” + url;
}
if ( sel != “” ) string += “\n\n

" + sel + "

“; //\ = Ansi-Escapesequenz für Backslash
return string;
},

execute: function( konsole, test2 )
{
//this.pasteKnowlet( konsole.text );
this.pasteKnowlet( this.createString( konsole ) );
//displayMessage( “execute: ” + this.createString( konsole.text ) );
},

getDocument:function()
{
return CmdUtils.getDocumentInsecure();
},

getSelection:function()
{
var ta = this.getTextAreaWithSelection();
if( ta != null ) {
return this.getSelectedTextFromTextArea( ta );
} else {
return context.focusedWindow.getSelection();
}
//return context.focusedWindow.getSelection();
},
})

/*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/