(To fix problems after transferring a localhost database to a live website and other useful functions)
By Lee Sykes
In this tutorial we demonstrate using a Find and Replace SQL procedure to fix problems such as editing image urls after uploading a localhost installation to a live website.
This means that you can automatically adjust any html code within the text / html module across all of the pages in your DotNetNuke installation in a matter of seconds, rather than manually editing each page.
This method can also be used for editing words in the text / html module. For instance, suppose you wish to change your company name, you can apply these SQL techniques to search for the current company name and replace it with a new company name.
Other techniques can include searching for inline CSS code in the text/html module, such as font tags, and deleting all of the code so that all styling comes from the skin.css files.
This is a really powerful technique and full credit goes to Kevin Schreiner at bi4ce.com.
Kevin posted this method in the bi4ce forum
and we demonstrate how you can implement it within your own DotNetNuke sites.
There are 2 methods you can use for implementing the SQL queries, the first is to execute them directly from your DotNetNuke portal and the second is to execute them from SQL Server Express 2005, we demonstrate both methods in this video tutorial.
WARNING: BACKUP YOUR DATABASE BEFORE FOLLOWING THIS TUTORIAL. We recommend you test this tutorial in a localhost test area before applying the techniques to a live production website.
Video 1 - Find and Replace using the DotNetNuke SQL tool
- bi4ce tips and tricks SQL procedure
- How to create the procedure using the SQL tool in DotNetNuke
- How to fix incorrect image URLs
- How to execute the Replace_DesktopHtml procedure in DotNetNuke to correct image URLs
- How to find and replace text within the Text / HTML module across all portals
- How to change the text ‘DNN Creative Magazine’ to ‘The Media Company’
- How to execute the find and replace using the DotNetNuke SQL tool
Time Length: 8min 14secs
Video 2 - Find and Replace using SQL Server Express 2005
- How to Find and Replace on a live site using SQL Server Express to access your hosting providers SQL Server 2005 database
- Opening SQL Server Management Studio Express
- How to connect SQL Server Express to your hosting providers SQL Server 2005 server
- How to view the tables of the live SQL server 2005 database
- How to create the Find and Replace SQL procedure
- How to execute the creation of the Find and Replace procedure
- How to view the new Find and Replace procedure (Replace_DesktopHtml)
- Viewing the live website and the incorrect image URLs using /igfilm_dnn453
- How to execute the procedure to Find and Replace images using /igfilm_dnn453
- Viewing the results of the query
- Viewing the live website with the correct image URLs
- How to find and replace (delete) font tags and any other inline styling in the Text / HTML module
- How to view the contents of the HtmlText table
- How to identify the module id of a text / html module
- How to copy the html code from a text / html module
Time Length: 10min 28secs
Video 3 - How to remove inline CSS code
- Viewing the html code and identifying the code used for the font tags
- How to execute the query to remove the <font size=2 face=Verdana> code
- How to execute the query to remove the </font> code
Time Length: 6min 4secs
Total Time Length: 24min 46secs