I was recently asked how to clone the SmartSection module for XOOPS, so I thought I would document the process here on my blog. (XOOPS is another favorite CMS I use for my clients when they want a CMS)
- Download SmartSection (http://smartfactory.ca/
- Duplicate the smartsection module folder (this is the folder with all the module files in it – the folder you will put into the “modules” directory within your XOOPS install)
- Now it is time to do a few “find and replaces” with your favorite text editor. (I prefer TextWrangler) For the sake of an example, I am going to name my cloned version of the SmartSection module SmartJappler. Within the entire duplicated folder, find and replace every instance of the following with the name of your newly cloned module. **Make sure you are replacing every instance in all the files**
- Find: smartsection and replace it with smartjappler (your module name here)
- Find: SMARTSECTION and replace it with SMARTJAPPLER (your module name here)
- Find: SmartSection and replace it with SmartJappler (your module name here)
- Find: Smart Section and replace it with Smart Jappler (your module name here)
- Find: SSECTION and replace it with SJAPPLER (your module name here)
- Find: Smartsection and replace it with Smartjappler (your module name here)
- You also need to change the template file names in your duplicated folder to match your cloned module name. In the SmartJappler (or whatever you renamed the module) find the /templates/ folder and rename all files that have “smartsection” in the file name to “smartjappler” (or whatever you renamed the module). **Make sure all files in /templates/ and /templates/blocks/ have the new file names. (ex. smartsection_rss.html would be renamed to smartjappler.html)
- Last but not least, you will need to do one more find and replace within one file: /sql/mysql.sql. Again, with your favorite text editor, find all instances of: smartsection_ and replace it with the name of your module. In my case I would replace it with smartjappler_.
Once you have completed these steps, upload the duplicated folder (now your cloned module) and install it though the XOOPS Admin panel. Questions, comments? Let me know!
I was recently asked to recommend and comment on some good CSS practices for a client and I thought I would pass some of them.
- Use a table of contents. I always start my stylesheet(s) with a table of contents so I can easily locate particular styles in the future. I would recommend breaking your stylesheet into a few main areas like: header, main content, navigation, footer. The more sections you put in, the easier it is to read and edit at a later date.
- Use a table of contents. If you notice your stylesheet is getting out of control (over 1,000 lines) consider using multiple style sheets. You could have one master style sheet, another for forms, another for specific pages, etc. You would then either link to a stylesheet that would have links to all the styleheets using
@importor you could call in the stylesheets on a page by page basis statically or dynamically.
- Start with a known, debugged code if possible. I have a library of layouts that I use when beginning a new project that I know work in multiple platforms on multiple browsers. I will be publishing these as soon as I have some free time.
- Do not rely on CSS hacks, unless it is a last resort. Believe it or not, most things can be done with CSS code that will validate. As soon as you rely on hacks, your code becomes unpredictable with new browser releases. Stick to valid code that you know will work with past and future builds of browsers. There are a lot of hacks out there which seem like a quick and easy fix, but you will pay for it down the road.
I hope this helps! CSS is a little tricky and sometimes very frustrating, but in the end…clean code is very rewarding.
We have recently updated our portfolio and made it available. All of our recent web development work is now available for visitors and potential customers to look at.
I have been creating more CMS web site solutions using WordPress over the last year and and have collected some great resources along solid product right out of the box, it is highly configurable, there are endless plugins, and everything is well documented. So, if you are ever looking to build a web site using WordPress and want to do it for yourself I would recommend using:
Please update your address books, Sandbox Development and Consulting Inc. now has a new phone number: 847.348.0428.
We are happy to announce we now offer network monitoring services to clients who demand high availability of their servers and networks.
With increasing hosting demands, Sandbox Development and Consulting has decided to partner with Liquid Web for all our hosting needs.