Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
floppy
Newbie
Newbie



Joined: Sep 11, 2006
Posts: 92

PostPosted: Mon Jul 09, 2007 3:22 pm Reply with quote

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
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
floppy
Newbie
Newbie



Joined: Sep 11, 2006
Posts: 92

PostPosted: Mon Jul 09, 2007 6:35 pm Reply with quote

Sorry for the off topic forum spam montego. Me and Guardian just having a good time lol.

Anyway I got this sorted with a few kinks. Its a good project though.

http://www.clan-themes.co.uk/article166-xbox-360-vs-playstation-3-online-gaming.html

The tag cloud is at the bottom of the article.
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1294

PostPosted: Mon Jul 09, 2007 9:07 pm Reply with quote

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 
View user's profile Send private message Visit poster's website
floppy
Newbie
Newbie



Joined: Sep 11, 2006
Posts: 92

PostPosted: Mon Jul 09, 2007 9:20 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 383

PostPosted: Tue Jul 10, 2007 7:24 am Reply with quote

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.
 
View user's profile Send private message
floppy
Newbie
Newbie



Joined: Sep 11, 2006
Posts: 92

PostPosted: Mon Jul 23, 2007 3:30 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 383

PostPosted: Tue Jul 24, 2007 1:45 am Reply with quote

Thats excellent news, well done on a good job!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch