\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{How to use two or more backends in Ingo.}
\section{Method 1: PHP logic in backends.php}
See

<a href="http://lists.horde.org/archives/ingo/Week-of-Mon-20070528/001345.html">http://lists.horde.org/archives/ingo/Week-of-Mon-20070528/001345.html</a>

\section{Method 2: Multiple instances of Ingo}
First copy your existing Ingo directory to a directory with the new name. Change to horde base directory, then run:

<pre><code>
cp -R ingo imgo
cd imgo
</code></pre>
Then replace all occurences of the "Ingo" string with a new name, we use "Imgo" as an example here.

If you have the \texttt{replace} command installed, that comes with the MySQL clients, you can simply run:

<pre><code>
replace Ingo Imgo ingo imgo INGO IMGO -- `find . -type f`
</code></pre>
Otherwise you can for example run:

<pre><code>
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd lib
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd Script
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd ..
cd Driver
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd ..
cd Storage
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd ../../
cd templates
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd rule
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd ../../
cd lib/Driver
perl -p -i -e "s/Ingo/Imgo/g" * *
perl -p -i -e "s/ingo/imgo/g" * *
perl -p -i -e "s/INGO/IMGO/g" * *
cd ../../
</code></pre>
There may be a better way of finding and replacing words in all the subfolders, please feel free to edit this page and put that method here.

Yes there is a better way. :)

<pre><code>
\# find ./ -type f -exec perl -pi -e 's/Ingo/Imgo/g' \{\} ;
\# find ./ -type f -exec perl -pi -e 's/ingo/imgo/g' \{\} ;
\# find ./ -type f -exec perl -pi -e 's/INGO/IMGO/g' \{\} ;
</code></pre>
Copy Ingo's icon using the new name:

<pre><code>
cp imgo/themes/graphics/ingo.png imgo/themes/graphics/imgo.png
</code></pre>
Edit \texttt{imgo/config/backend.php} for the backend to use for the second ingo.

I have used imap in the first ingo and procmail in imgo.

Edit \texttt{horde/config/registry.php} and add the following below ingo:

<pre><code class="language-php">
\$this->applications['imgo'] = array(
    'fileroot' => dirname(\_\_FILE\_\_) . '/../imgo',
    'webroot' => \$this->applications['horde']['webroot'] . '/imgo',
    'name' => \_("Mail Actions"),
    'status' => 'active',
    'menu\_parent' => 'imp'
);
</code></pre>
Now you would be able to use two filter backends. In case you want more, you can always make one more copy of ingo.

Jigish

\end{document}
