I wouldn't use this plugin. It creates its own database file storing the details and doesn't use any of the built in sql class. Jquery is also used by vanilla so its probably best to use it in the plugin. The plugin also doesn't work as the javascript requests go to the wrong url.
Not entirely sure why you get the database details from the current config file and then write them to a new file, you already just got the values. If the author doesn't mind i may rewrite this at some point.
Manishblogs: Your plugin folder is not writeable by the user who runs the webserver, Like garymardell said, it (has to) create a an own database file. If your running a linux server, and the apache user is www-data, do the following: cd (yorVanillaDir) chmod -R 770 plugins/Van2Chat chown -R www-data plugins/Van2Chat chgrp -R www-data plugins/Van2Chat This should fix the problem.
@garymardell: Yes, it uses vanillas sql functions ( C('Database.Name') etc. ), but since text.php (the file accessed by the ajax query) cant use these functions, i have to create the database.php.
Since this is my first plugin, and im not very familar with Vanillas plugin system, maybe you can help to remove the database.php?
Thanks, you saved me hours of googleing, im currently writing the settings page,and was wondering why it doeant show up in the dashboard... (direct call via url works) ==> 'SettingsPermission' ;-)
Comments
Not entirely sure why you get the database details from the current config file and then write them to a new file, you already just got the values. If the author doesn't mind i may rewrite this at some point.
Like garymardell said, it (has to) create a an own database file.
If your running a linux server, and the apache user is www-data, do the following:
cd (yorVanillaDir)
chmod -R 770 plugins/Van2Chat
chown -R www-data plugins/Van2Chat
chgrp -R www-data plugins/Van2Chat
This should fix the problem.
@garymardell:
Yes, it uses vanillas sql functions ( C('Database.Name') etc. ), but since text.php
(the file accessed by the ajax query) cant use these functions, i have to create the database.php.
Since this is my first plugin, and im not very familar with Vanillas plugin system, maybe you can help to remove the database.php?
I'll have a look at the ajax query...
Thanks for feedback, Caerostris
Plugin currently doesnt work in subdirectories.
This version is working, really.
The only thing i have to fix is the database.php, but its working!
403 Permission Denied
You do not have permission for this request /plugins/Van2Chat/text.php
is wrong configured or (if your using linux), you didnt chown/chmod the file correct..
If you use ubuntu as server OS:
Go to the installation folder of vanilla (mine is /var/www/vanilla-forum)
cd plugins
chmod -R 770 Van2Chat
chgrp -R www-data Van2Chat
chown -R www-data Van2Chat
(www-data is the user which runs apache2, your apache2 user could be diffrent)
If this doesnt work, please send a screenshot to
caerostris@gmail.com
Caerostris
I put together some useful snippets that may be useful. I may split them up and do some proper snippets, spending more time on them.
==> 'SettingsPermission' ;-)