logo-radria.gif
   
Blog Download Documentation Forum Tasks Home
Blog Download Documentation Forum Tasks Home
barside-right.gif
barside-left.gif
logo-sql.gif





Vanilla forum package

Vanilla is an open-source, standards-compliant, multi-lingual, fully extensible discussion forum for the web. Click here to visit the official website.

Current version of Vanilla forum has got a default theme and and default Style associated with with.

Package vanilla forum

We can create the package for Vanilla forum in RADRIA using the following steps:

1.First of all we need to download the vanilla forum(Latest version from the official website of vanilla). We will get the downloaded file in the ZIP format. We have to unzip that and we will have the entire coding for the Vanilla.

2. Now in Radria we have to create a new project say for example vanillapkg. For this project we asuume that the database details we set as

 Database name : vanillapkg
 Data base user: vanillapkg_user 
 Password : vanillapkg_pass
 Database Server:localhost

The above mention step2 will appear every time we create a new project in RADRIA.

3. Now once we have created the project named vanillapkg within the RADRIA. We will have a folder called vanillapkg inside the root folder for RADRIA.

4. The folder vanillapkg will has to be given some permission as: sudo chmod a+rw -R /opt/lampp/htdocs/radria/vanillapkg , here /opt/lampp/htdocs/radria/vanillapkg is the path of the project. This may very according to the RADRIA configuration.

5.Now we will create a folder called vanilla inside vanillapkg folder.

6.After creating the folder vanilla we will paste all the unzipped files and folders.

7. Now if we run this project from RADRIA at this point of time we will have a blank page. We will now write /vanilla after the URL and will get the setting page for Vanilla.

8. In the setting page it will ask to enter some database details and some other information. In the databse details we will enter the same details as before i.e.

  Database name : vanillapkg
  Data base user: vanillapkg_user
  Password : vanillapkg_pass
  Database Server:localhost

For the rest of the details user can enter as per requirement. After saving this details we are all set to run vanilla. But this is not the package,as we have just set up the Vanilla in a project. Once the setup is done we can check 2 files for the settings that we have done. /conf/database.php and /conf/settings.php

These 2 files will hold database and setting details.

Now after installing Vanilla and doing the settings we are ready to create the package. To create the package from here on follow the following steps:

–Install contentadmin and package_builder from the RADRIA packages to the project vanillapkg if these are not installed.

–Give the package a name and give any comments. For more details click here

–Then select all the files that are associated with Vanilla and usually as per our project it will be something like vanilla/account.php i.e. all the files which are under vanilla folder.

– Then select the tables which are installed in the database while setting up vanilla. Also click on Store both structure and data as the default ADMIN login will be created. The default ADMIN login is nothing but the user details we provide while setting up the Vanilla.

–At the final step we have write some Install Commands, Upload Commands. These are very important as these commands will configure the package during installation and when it will be uploaded to the server.

–Here in this case will have the following configurations.We will make the database username and password as the default ADMIN username and password. Apart from that we have we have to do some more change like the path setting. These paths are basically defined on the settings.php file. So we will write the following Install commands:

  replace vanilla/conf/database.php 'localhost' '[server]'
  replace vanilla/conf/database.php 'vanillapkg' '[database]'
  replace vanilla/conf/database.php 'vanillapkg_user' '[user_username]'
  replace vanilla/conf/database.php 'vanillapkg_pass' '[user_password]'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/' '[absolute_file_path]vanilla/'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/conf/database.php' '[absolute_file_path]vanilla/conf/database.php'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/library/' '[absolute_file_path]vanilla/library/'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/extensions/' '[absolute_file_path]vanilla/extensions/'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/languages/' '[absolute_file_path]vanilla/languages/'
  replace vanilla/conf/settings.php '/opt/lampp/htdocs/radria/vanillapkg/vanilla/themes/vanilla/' '[absolute_file_path]vanilla/themes/vanilla/'
  replace vanilla/conf/settings.php '/radria/vanillapkg/vanilla/themes/vanilla/styles/default/' '[relative_http_path]vanilla/themes/vanilla/styles/default/'
  replace vanilla/conf/settings.php '/radria/vanillapkg/vanilla/' '[relative_http_path]vanilla/'
  replace vanilla/conf/settings.php 'http://local.sqlfusion.com/radria/vanillapkg/vanilla/' '[absolute_http_path]vanilla/
  replace vanilla/conf/settings.php 'local.sqlfusion.com' '[server_name]'
  sqlquery "update LUM_User set Name = '[user_username]', Password = '[user_password_md5]' where UserID= '1'" ;
  sqlquery "update LUM_Style set Url = '[relative_http_path]vanilla/themes/vanilla/styles/default/' where StyleID = '1'" ;

'/opt/lampp/htdocs/radria/vanillapkg/vanilla/' you can get the information from the settings.php file after you install the vanilla to a project(not the package).Replace the string in settings.php. For your project it may not be the same. So you have to replace those strings.

The paths that you can see in the above Ex: As it is clear from the above commands that we can change all the setting parameter from the commands.

If we do not change the path settings then after creating the package when we install this package to any project and we try to visit the URL urprojectname/vanilla , then for all the links we will have one extra name i.e. /vanillapkg/ for any link. As in vanilla all the links are done with the baseurl and while setting the vanilla the base url will store the project folder name i.e. vanillapkg. We have to remove that vanillapkg folder name while installing the package with our project name where we are installing the package. For every package we have to take care this issues very carefully.

Now next put the following Upload commands

replace vanilla/conf/settings.php '[absolute_file_path]vanilla/' '[remote_absolute_file_path]/vanilla/'
replace vanilla/conf/settings.php '[absolute_file_path]vanilla/conf/database.php' '[remote_absolute_file_path]vanilla/conf/database.php'
replace vanilla/conf/settings.php '[absolute_file_path]vanilla/library/' '[remote_absolute_file_path]vanilla/library/'
replace vanilla/conf/settings.php '[absolute_file_path]vanilla/extensions/' '[remote_absolute_file_path]vanilla/extensions/'
replace vanilla/conf/settings.php '[absolute_file_path]vanilla/languages/' '[remote_absolute_file_path]vanilla/languages/'
replace vanilla/conf/settings.php '[absolute_file_path]vanilla/themes/vanilla/' '[remote_absolute_file_path]vanilla/themes/vanilla/'
replace vanilla/conf/settings.php '[relative_http_path]vanilla/themes/vanilla/styles/default/' '[remote_relative_http_path]vanilla/themes/vanilla/styles/default/'
replace vanilla/conf/settings.php '[relative_http_path]vanilla/' '[remote_relative_http_path]vanilla/'
replace vanilla/conf/settings.php '[absolute_http_path]vanilla/' '[remote_absolute_http_path]vanilla/'
replace vanilla/conf/settings.php '[server_name]' '[remote_server_name]'

These are basically will affect while posting the site live through FTP.

Once we have done with this we can just click next and then can download the package.

As mentioned at the very beginning of this document that vanilla use a default theme and style. We can create our own theme and style for vanilla and also can package that so that we can just install the package to the vanilla so that it should take that style.

We can get more information on how to care the style and theme from the following links: http://lussumo.com/docs/doku.php?id=vanilla:themes http://lussumo.com/docs/doku.php?id=vanilla:styles

Package Vanilla Themes

In the next section we will create a package called vanilla_theme_radria-0.1.pkg for Vanilla. This is nothing but the navigation bar for RADRIA.(as you can see on the top of this page).

For this first we will follow the same procedure as before to install the vanilla in a new project and then we will create a folder called /themes/radria. This is nothing but the new theme. Now inside this folder we will copy the entire styles folder from themes/vanilla/. Now we have a default style for radria theme. We will also copy the files which are necessary to be altered and will paste to the radria folder of /vanilla/themes/ . For our purpose we will change the menu.php file so that it will omit the top blue image and the Vanilla heading and there on the top we should have the Radria navigation. These are nothing but some simple HTML code and will put that above the menu.php file and do necessary CSS changes from the themes/radria/styles/default/ . Once the changes are done we can just check the chages by going to the admin login of vanilla.(Please note here we have not installed the vanilla package for the new package. We have just installed the vanilla forum into the new project and there only we are creating the new theme.)

In the admin login if we go to settings→theme and style we will have default theme as vanilla and style as default. And once we create the new theme we will have radria as one more option for the theme and default as the style.

Now before changing anything just open the /conf/settings.php and see the the configuration and also open the table LUM_Style (LUM_ is selected as the table prefix while installing vanilla)

Just copy the content from settings.php to a text file and close that settings.php. Now change the theme to radria and set the default style and save it.

Now again open the settings.php and you can see that the parameters $Configuration['DEFAULT_STYLE'] and $Configuration['DEFAULT_STYLE'] are changed and also refresh the table and can see that there will be a new row and the vanilla is affected with the new theme.

So we are now ready to create the package for the theme that we have created.

So do the usual procedure to create the package but at the end we have to write some install command if we want that the installed theme should be a default theme for the vanilla. The commands are as: replace vanilla/conf/settings.php '[absolute_file_path]vanilla/themes/vanilla/' '[absolute_file_path]vanilla/themes/radria/' replace vanilla/conf/settings.php '[relative_http_path]vanilla/themes/vanilla/styles/default/' '[relative_http_path]vanilla/themes/radria/styles/default/'

If you do not want that to happen just leave i.e. dont put any command, at this point the default theme will be vanilla. We can change that from admin login.

 
package/application/vanilla_forum.txt · Last modified: 2007/10/15 14:57 by 71.107.4.9
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki