TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 19, 2024, 03:27:10 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 100
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 99
  • Total: 99

Where do I find this in the code and how can insert it in...

Started by shawnlg, October 16, 2007, 10:40:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shawnlg

Could you give me a direction on how I would learn how to do that ispecifically  with your application.  I would manually do it once but I see that field constantly chaning.  Thanks!

IchBin

Well if you're only going to do it once it will probably be pretty simple. The problem being that if you have another article loaded up on your page, and then you want to grab the rating from another article? I need you to be very specific about what you need so I know what to put in the Database call.

All it is is something like this:

$query = db_query("SELECT tables_rows FROM articles WHERE id = article_id#", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query){
    echo $row['rating_stuff'];
}


Thats the basics of it.

shawnlg

The closest thing I can show you right now it what I am doing..  Check out this link..

http://www.scifiandgod.com/content/index.php?page=Star%20Trek%20-%20The%20Next%20Generation%20-%20The%20First%20Season

You see how there is a list of star trek episodes?  Under the user rating I would like those to be dynamic based on how the author chooses on the article pages.  The list there will all be hyperlinked to a specific article.

There will be one of these pages for each of many programs.  If it not too much trouble if you could give me a step by step process of what to change based on the code you sent me.  Thanks so much for your help.  You have done way more than I expected.

IchBin

So basically, you're listing all the shows in your category in the article. You want the list to grab the rating for each article in the category list? Or are you asking for a user to be able to give a rating to your list of shows?

shawnlg

Yes, the first one I want to grab the rating in a list format.  The rating will always change based on the feedback I get on the article page.  Thanks!

IchBin

hmm... I'm still not clear on this. The rating, is this the rating that they will give the article? Or a rating that is not built into the TP article?

shawnlg

I have changed the text so they are rating the show not the article.  Essentially and normally it would be the article rating I want them to rate the resource not the article though.

IchBin

If you're not going to use the rating system from the article to appear there dynamically, then that means you're going to need a custom form for them to be able to vote. Thats what I'm getting at. Which means creating another field or table in the database. Basically, you're looking at another mod or something. At this point, not something I have the time to do.

shawnlg

I think we are missing each other.  I understand what you are saying about if I was going to use a new form but I am going to use the same form and database call already built in.  I just changed the text on the page for them to think they are voting for the resource not the article..  Look at this page..

http://www.scifiandgod.com/content/index.php?page=Star%20Trek%20-%20The%20Next%20Generation%20-%20The%20Naked%20Now

Do you see where it says on the page "Give this show or movie a rating of".  Normally it would have said give this article a rating of...  Just changed the text so they think they are voting on the show.

I agree the other way would have been a lot more work.  Any good resources that are free on working with php and sql?  I think that will help me immensely.

Shawn Larson

IchBin

No I can't see your text changed as a guest. If you're going to put each show in its own article, and then grab the ratings from each article thats do-able. Let me see what I can do over the next couple days if the Boss lets up on me. :)