| Author |
Message |
floppy
Newbie


Joined: Sep 11, 2006
Posts: 83
|
Posted:
Mon Jul 09, 2007 3:22 pm |
|
OMG my brain hurts
Alright I need to return multiple values from a foreach statement without using echo or print. If I used either of those it works great, but not inside the article box where I want it.
| Code: |
// loop through the tag array
foreach ($tags as $key => $value) {
// calculate font-size
// find the $value in excess of $min_qty
// multiply by the font-size increment ($size)
// and add the $min_size set above
$size = round($min_size + (($value - $min_qty) * $step));
return "<a href=\"#\" style=\"font-size: " . $size . "px;\" title=\"" . $value . " things tagged with " . $key . "\">" . $key . "</a>";
}
}
//End Tag Cloud |
|
_________________ http://www.t3gamingcommunity.com |
|
|
 |
floppy
Newbie


Joined: Sep 11, 2006
Posts: 83
|
Posted:
Mon Jul 09, 2007 6:35 pm |
|
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 954
|
Posted:
Mon Jul 09, 2007 9:07 pm |
|
Oh my.... the head is hurting... LOL. Hey, no problem, if it wasn't you two, it would only be the Search Engines hitting the site. Oh, take that back, and the Downloads module. Haa Haa. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
floppy
Newbie


Joined: Sep 11, 2006
Posts: 83
|
Posted:
Mon Jul 09, 2007 9:20 pm |
|
Now I just gotta figure out what the bonuses of it are. How to use it properly and all that what not.
Right now it links straight back to the article. I am not sure that is the best SEO approach. |
_________________ http://www.t3gamingcommunity.com |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 309
|
Posted:
Tue Jul 10, 2007 7:24 am |
|
You could always use both classes - the dynamic meta tag and the dynamic cloud one.
The dynamic meta tag class could be used for creating an array where it finds the same word more than 2 or three times in the page text and that array is used to form the words in the tag cloud.
That gives you a basic but functional boost in keyword count.
The problematic bit as you have found is making the cloud 'tag' links actually do something worthwhile.
You could utilise the wordlist in the phpbb tables or better still use the crafted link to conduct a search using the search module by passing the 'tag' array value thats clicked into the search box $var..
Just thinking out loud.
The object (no pun intended) is that the SE sends a refererr to your site from keywords a user has searched for, a tag cloud will give you a boost for that keyword or keyphrase and then provide a link to content related to that keyword or keyphrase which in turn then gives much more relevance to that keyword as associated data is grouped tightly together. |
_________________ Spam Stopper - Comments Modules - Security News - Script Installer |
|
|
 |
floppy
Newbie


Joined: Sep 11, 2006
Posts: 83
|
Posted:
Mon Jul 23, 2007 3:30 pm |
|
I took your advice on this one and simply generated single words from the articles to form my tag cloud. (well I sorta took your advice)
I picked single words because they just look better and generate more words for the cloud.
Then on click I pass them to search and google indexes them. Therefor returning lots of pages with relevant material. Yeah I am actually getting search traffic from this. Kinda blows my mind. |
_________________ http://www.t3gamingcommunity.com |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 309
|
Posted:
Tue Jul 24, 2007 1:45 am |
|
|
|
 |
|
|