Modified Cool Poll Module for Joomla 1.5
So we we're trying to build a poll on one of our websites and we ended up finding this great module developed by Gospodin Bodurov which is a great alternative as it is to the poll module that comes with Joomla. Basically, this cool module allows you to display the poll results on the same page as the module.
What did we do to modify it? Well, we added a html/css bar graph to go along with this module so you can easily turn your poll results into a great looking graph. It includes a few parameters to change the colors and text of the bars and you can easily change any of the other attributes to the graph through css modifications.
Here's the download right here and we hope you enjoy it. You can see a demo of it in action to the left here.
CoolPoll Modified Demo
Quick Joomla Template Tutorial |
|
The first important step is to make sure that your folder/file structure is correct. You want a folder named "css" with a css file in it named "template.css". You want an xml file named "templateDetails.xml" (make sure it is spelled and capitalized that exact way, or it won't work) and an html file named "index.html". You want to link the template.css to your index.html file.
The next step is to build your template like you would any other normal html/css page using index.html and template.css. The trick is to get it exactly the way you want it to look, including sample text and images. I prefer to make my template just straight html and css so it is light and modular. I will demonstrate my technique, which may not be best for everyone.
There are a few things to keep in mind as you build your template. You will not be able to use a relative path to any images, such as "../image.jpg" but rather will have to link to it in this way "http://www.test.com/image.jpg". There is an alternative, but using the media manager in Joomla and this is my preferred way.
My approach to making templates is to view the template as a framework in which the modules and components can be plugged into. I use the "Custom HTML" module to add an images, including the logo, so that none of the images are hard coded into template and can be easily changed from the Joomla interface rather then having to change the actual template file. So now that you have your web page all assembled what I do is click "Save As" and save it as a php file named "index.php".
Once this is done you will want to replace everything between the <head></head> tags including the tags themselves with the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Now that you have your new header in, what you have to do is take out all the content and images and replace them with "Module Positions" (not the official term I guess, but it's what I use and it makes sense to me). These module positions are defined by the following text:
Where it says name, you must put in the name for that module position, this one is named "logo". You place these wherever on the page you will want to put a module.
Now that you have the module positions it is time to put in the main component position. Where you put the component position will be where the output from Joomla will go (output as in whatever you choose for that menu item to link to ie: blog, contacts, VirtueMart component.). The main component position is defined by the following text:
You just place this wherever you wish for your main component output to show up. So far you should have something that looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Now your index.php file is finished and you are almost finished. What you need to do now is to build your templateDetails.xml file. Copy and paste the following text into your templateDetails.xml file:
<?xml version="1.0" encoding="iso-8859-1"?> Make the appropriate changes to the upper fields and for every module position you have in your index.php file make sure to add a new line of "<position>position name</position>" or else it will not be available when you install it.
Now you have all the files ready. You need to add two more files to the root directory of your template however, a Favicon and a Screenshot. You can add screen shot of your template or you can use the blank one I have found to be useful, you can find it below as well as a sample Favicon to use as well.
Now that you have all your files set, load them all into a zip file and name it whatever you like. Go to the installer in the back end of your Joomla installation and install it.
Good luck all!
|