hi
I recently have installed an addon to my store and since then I get a blank page. The Debug Error-Logging Utility tool tells me there is a T-class error on line 10 , but I can't find a n error on line 10...
[18-Aug-2009 12:14:32] PHP Parse error: syntax error, unexpected T_CLASS in /home/a8033afr/public_html/includes/classes/zentagcloud.php on line 10
zentagcloud.php file:
Code:
<?php
/*
@ZenWordCloud
Author:
- Nathan Keilar (www.madteckhead.com)
Version 0.1;
The is the project page for the ZenTagCloud. Its in development right now, its open source and I'd love input / contributions.
LINE 10 GOES HERE....????????????????????????
Note: the current version is not recommended for live online stores (where you have something to loose), however by all means try it out on you test site, have a look at the code and give me feedback.
p.s. Don't hold me responsible if something breaks.
What is a Tag Cloud?
A tag cloud (or weighted list in visual design) can be used as a visual depiction of content tags used on a website. Often, more frequently used tags are depicted in a larger font or otherwise emphasized, while the displayed order is generally alphabetical. Thus both finding a tag by alphabet and by popularity is possible. Selecting a single tag within a tag cloud will generally lead to a collection of items that are associated with that tag.
Features:
2/June/07: Displays category titles with random weights
3/June/07: Tags links to you Zen Cart site category pages.
Install:
1. Copy the code from this file to one of the Defined Pages using: Tools > Defined Pages Editor.
2. Ensure that the Defined Pages module is enables under: Tools > Layout Box Controller
3. Visit your site, and go to the defined page you pasted the code into. You should see a list of your sites categorie, with random sizes assigned to each one.
Todo/Wishlist:
- Save weights to database
- Add code to ?category's page? so that visits to category's changes weights
- Incorporate some noise in the category's weights to enable new category's a fair chance.
- Option to read tags from meta data
- Option to weight tags my relevance to current tag. (If you like a, you might like b type of thing)
With some code from:
- Derek Harvey (www.derekharvey.co.uk)
- Zen Cart Team (www.zen-cart.com)
Security Note: I've copied and modified a zen cart function to retrieve data from the db, and I think that by leaving the function embeded with the code if may pose some security risk. I'm open to advice on where to put it for best security practice.
*/
class wordCloud
{
var $gtags = array(); // tags array
/*
* PHP 5 Constructor
*
* @param array $words
* @return void
*/
function __construct($newtags = false)
{
if ($newtags !== false && is_array($newtags))
{
foreach ($newtags as $key => $value)
{
$this->addTag($value[0],$value[1],$value[2]);
}
}
}
Bookmarks