Installing the Graffiti CMS Training Theme
Overview
There has been some discussion and confusion on the Graffiti CMS support forum about how to install the Training theme, as well as how to use SQL Server with the theme instead of VistaDB. There is documentation on how to install the Training theme in the readme.txt file included with the download, and there is minimal documentation on how to use the DataMover utility to convert databases from one platform to another, and from an older version of Graffiti to a newer version here. But there isn't anything to tie them together cleanly.
Until we are able to get the documentation added to the website, below please find detailed steps on how to install the Training theme, as well as convert its data storage to SQL Server. Hopefully this will help to bridge the gap.
Note that the approach below is for the following circumstances:
- Graffiti CMS version 1.2
- Running Graffiti locally with Graffiti_Demo.exe, not IIS
- SQL Server 2005
Prerequisites for running Graffiti CMS locally
The details for system requirements to run Graffiti can be found here, but essentially you need to have the following on your machine:
- Windows operating system
- .NET Framework 2.0 or higher
Install Graffiti
Step 1. Download a fresh version of Graffiti CMS from http://graffiticms.com. The download link is currently http://get.graffiticms.com/download/
Step 2. Place the .ZIP file onto your local machine and extract the contents.
Step 3. Navigate to the extracted Graffiti\New Install\Web folder and double-click Graffiti_Demo.exe. The sample Graffiti website using the Default theme should appear in your browser.
Step 4. Click on each of the menu items in the navbar to ensure they are working (Home, Sample Content, Blog, About This Site, and Contact Us)
Step 5. On the Home page, click on the post title "A Shorter Post"and verify that you are brought to the sample-content/a-shorter-post/ link, and that the content is present with no errors.
Step 6. Retrieve the admin user's password from the web.config file. The administrative user is the main user for the site. The username is admin, and the password can be found in the web.config file, on this line:
<add key="Graffiti:User:DefaultPassword" value="f2af7xxx"/>
Note that the value is different for each download of Graffiti! Also note that this value is stored in the database. So, if you change your web.config to use a database that was not included with your download of the base install of Graffiti, the admin password will likely be different for that database.
Step 7. Verify that you can log in to the site by navigating to the /login URL, or by clicking on "please use this link" on the Home page. Use the admin username and password from Step 6.
Install the Training theme
Now that Graffiti is installed, and it's been demonstrated that it is working correctly, it is time to install the Training theme. The Training theme can be downloaded from inside the Graffiti Control panel (/graffiti-admin/presentation/themes), or from the Graffiti Marketplace. These steps will show you how to download it from the Graffiti Control Panel.
Step 8. Navigate to Control Panel --> Presentation -- Themes.
Step 9. Click on "Search online themes...", and then the Training theme.
Press the Download Theme button to download Training.zip locally.
Step 10. Extract the contents of Training.zip and overlay the files onto your Graffiti installation.
Files:
App_Data
-- Training.vdb3
Files
-- themes
---- training
------ images (29 files)
------ media ( 4 files)
------ utils (3 files)
------ (17 files)
When you are done, you will now have Training.vdb3 in your App_Data folder, and in your Graffiti\New Install\Web\files\themes folder you will have 2 folders listed: default and training
Step 11. Update the web.config file to use the Training.vdb3 database. Locate the <connectionStrings> section towards the top of the file, and replace your current connection string with the following line:
<add name="Graffiti" connectionString="Data Source=|DATADIRECTORY|\Training.vdb3" />
Step 12. Be sure that Graffiti is configured to use the VistaDB provider under the <appSettings> section in the web.config file. If it is not, replace it with the line below:
<add key="DataBuddy::Provider" value="DataBuddy.VistaDBProvider, DataBuddy"/>
Step 13. In the browser, check Control Panel --> Presentation -- Themes and make sure that the Training theme is selected. (The selected theme will have a blue box around it.) If it is not selected, click on the thumbnail image to select it.
Step 14. Click on Site Options - Utilities - Rebuild pages
Then choose Start Building.
Step 15. When Step 14 is complete, the Training theme should now be fully installed. Click on "Go back to site", and navigate through the site to ensure that things seem to be working OK.
Configure the Training theme to use SQL Server
Now that Graffiti is installed, and the Training theme is working with the VistaDB version of the database, you may decide to use SQL Server as the database engine instead.
Step 16. Open Microsoft SQL Server Management Studio in SQL Server 2005, and create a new database called GraffitiTraining.
Step 17. From the Graffiti\New Install\Data folder, locate a SQL script file called Graffiti_SQL_Schema.sql. Run this script against your new GraffitiTraining database.
Step 18. Update the web.config file to use your new SQL Server GraffitiTraining database. Locate the <connectionStrings> section towards the top of the file, and replace your connection string with the following line:
<add name="Graffiti" connectionString="server=(local);uid=;pwd=;Trusted_Connection=yes;database=GraffitiTraining"/>
Step 19. Configure Graffiti to use the SQL Server 2005 provider by looking under the <appSettings> section in the web.config file and change the DataBuddy::Provider line to this:
<add key="DataBuddy::Provider" value="DataBuddy.SQL2K5DataProvider, DataBuddy"/>
Step 20. Go back to your browser and press the Refresh button. Note that the page is essentially blank and the default theme is being used. This is because there is no data in your GraffitiTraining database…so there are no posts to show and no theme selected.
Step 21. In your file system, navigate to \Graffiti\Tools\Migrations, then click on DataMover.exe to start up this utility.
Change the Source Database to VistaVB , then click the Browse button to navigate to your App_Data folder and choose the Training.vdb3 file.
Change the Destination Database to SQL Server, and then copy in your connection string from the Web.config file:
server=(local);uid=;pwd=;Trusted_Connection=yes;database=GraffitiTraining
Press the Copy Data button, then the Yes button to confirm that you want to continue.
If this DataMover process fails at any point, and you get unexpected or continued errors when trying to rerun it, you should reboot your computer to free any locked files. The destination database *must be empty* in order for DataMover to succeed, so please be sure to delete the destination database and recreate it.
Step 22. When the DataMover process is completed, refresh your browser, and you should now see the Training site
Conclusion
While 22 steps may seem overwhelming, when you break it down I hope you can see that it's not terribly involved. The key is to take it slowly and to verify each step of the way that the step has been executed successfully.




