Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Creating a site with words that display in ranked order.
Old 08-18-2009, 07:01 PM Creating a site with words that display in ranked order.
Junior Talker

Posts: 4
Trades: 0
I came up with an idea that i will not specificily describe, that involves having a page that displays a series of words in a paragraph format by this i mean something along the lines of:

Word Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word
Word Word Word Word Drow Word Word Word
Word Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word

For now that is all i plan on working on and filling up these words and expanding the size of the database of words.
But there is a major part to it that i do not know how to do.

I would like, every single word to be a link / action. When someone clicks on a word - the word is given a vote. This vote will move this word up according. By this i mean.
When the page is loaded for the first time. It will be shown as above. each word will have a score of: 1 When the first user clicks on the word: Drow, it will be given a score of: 2. Meaning that this will move to being the first word in the list. Like:

Drow Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word
Word Word Word Word Word Word Word Word

This means that the second person that views the website will see it in this order. And so on, meaning the more people that vote. The higher up certain words will get. untill all the words are in an order of most voted for and most popular.

I have enough knowledge of coding to maintain such a website, and create other basic sites. But scripiting these actions was beyond me. and was wondering, is it possible.
And wether anyone could help me atall?
If you need me to be more specific, let me know.
LukeDefect is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-18-2009, 07:37 PM Re: Creating a site with words that display in ranked order.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
just make the link pass the id of the word back to the script, add a "vote" for it then redisplay the new order of words.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-18-2009, 07:39 PM Re: Creating a site with words that display in ranked order.
Junior Talker

Posts: 4
Trades: 0
I understand how the method behind it would work; and how it could be done. But i'm struggling with the coding side of it. Infact i really have no idea at the moment, i'm reading up on a few things, but nothing's really helping me at the moment.
LukeDefect is offline
Reply With Quote
View Public Profile
 
Old 08-18-2009, 07:44 PM Re: Creating a site with words that display in ranked order.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
and the code that you are strugling with would be??

asp, asp.net, php, python, perl, coldfusion, java, jscript or something else?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-18-2009, 07:48 PM Re: Creating a site with words that display in ranked order.
Junior Talker

Posts: 4
Trades: 0
I thought the best method for this would be Javascript.
To be honest, i know enough for basic website creation and maintaince, but when it comes to more depth coding i'm begining to struggle.
What would be the best code to do this in, and what would be a good way to go about doing it?
LukeDefect is offline
Reply With Quote
View Public Profile
 
Old 08-18-2009, 07:57 PM Re: Creating a site with words that display in ranked order.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
So you are not actually struggling with it; More a case of you don't know where to start.

javascript? Nope. javascript is a client side environment which has no access to databases to store your words and votes in.

The best code?

For me it would be ASP or asp.net (now I've finally got around to getting to grips with it). with php coming in third

For you;
Whatever your hosting supports.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-18-2009, 08:05 PM Re: Creating a site with words that display in ranked order.
Junior Talker

Posts: 4
Trades: 0
My host supports Php, so i geuse i'll be working with that.
but i was wondering, do you have any idea how i would start doing what i'm after?

Last edited by LukeDefect; 08-18-2009 at 08:15 PM..
LukeDefect is offline
Reply With Quote
View Public Profile
 
Old 08-19-2009, 06:33 AM Re: Creating a site with words that display in ranked order.
lizciz's Avatar
Webmaster Talker

Posts: 744
Name: Mattias Nordahl
Location: Sweden
Trades: 0
You'll want a database with a table containing all the words. The table needs an ID, the actual word, and a score. So three fields.

When displaying the page you pull all the words from the database, ordering them by score, then print them to the page as links to a page such as 'add_score.php?id=12345' (where the id is that word's ID). That page increses the score of that word in the database, and then sends you back to the page where the words are displayed.

If you still can't figure it out with this little help, you're gonna need to read up on the basics of database handling. This isn't a very hard thing to create so you should be fine with some beginners PHP/MySQL tutorial. Either that or ask someone very nicely to make it for you.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Creating a site with words that display in ranked order.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27409 seconds with 12 queries