Peter Kalambet
Technogeek Labs
Published in
2 min readJul 30, 2013

--

Recently while installing and tuning Vanilla Forum (current stable version is 2.0.8.18) and applying Quote plug-in (current version in 1.6.1), found out that it just does not work out of box.

‘Quote’ menu item appears on the post top menu but when I’m trying to click it — browser just scrolls down and nothing happening. But if I try to open it in a new window I can see the input box with my quote in there. So after a half-hour of JS debugging I’ve found solution.

Before we start you need to update the class.quotes.plugin.php file that places in the plug-in directory root. There you need to decrease the required Vanilla Forum version (of course if you are not on version 2.1a or higher). But this is obvious trick and it mentioned even in the plug-in discussion.

Here is the less obvious part. First of all, you need to understand if mod_rewrite is enabled in your Apache configuration. Than you need to check if forum’s root .htaccess file has the following content:

# Original
# If you modify this file then change the above line to:
# Modified
<IfModule mod_rewrite.c>
RewriteEngine On
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

Than you need to check if RewriteUrls in the forum configuration file has the TRUE value.

For that you need to navigate to <forum root=””>/config/config.php and look for

string:$Configuration['Garden']['RewriteUrls'] = FALSE;

In case there is no such string just add it.

So the right value here is

$Configuration['Garden']['RewriteUrls'] = TRUE;

And now the hotfix for plug-in itself. Maybe it is not so elegant but it works for now. When I create the popper fix you’ll be the first one to know but let it just leave for now.

Now we open

/plugins/Quotes/js/quotes.js

look for string contains

'plugin/quotes/getquote/'+ObjectIDComment

Commnet it and add new one

var QuotebackURL = 'http://<your-forum-domain.tld>>/plugin/quotes/getquote/'+ObjectID;

Ands now you can enable it in forum’s dashboard and possibly add custom css code snippet like this

UserQuote {
background: #fff;
border-radius: 3px;
border: 1px solid #000;
}

That should do the trick.

--

--