Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Add Things To My Site


15 replies to this topic

#1 BooZker

    Mad Scientist of 2006

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 750 posts
  • Gender:Male
  • Location:Washington State in the USA
  • Interests:my wife Samantha, HTML, CSS, PHP, computers, magic, playing cards, and making movies.

Posted 04 January 2007 - 09:16 PM

My sites basic outline is done, and have a few of the tutorials up, but before i go any further i want to see how i add these things to my site so i can add them in case they will be in includes so i dont have to go through dozens of pages and add them.

1. Comments. How do i make them and what program languages can i use to create them. An example of where i would put them would be at this link at the bottom of the page:

http://boozkerstweaks.trap17.com/tutorials...ng_programs.php

Do you even think i should add a comments section?

2. Rating system. How could i make a rating system on my site? I would want it so there is no users and it just uses a cookie OR use the same users from my forums. Is this possible and how. And example rating system would be like here:

http://www.amazon.com/gp/product/B000JY1DR...e=ATVPDKIKX0DER

But of course make the stars nicer looking, but how can i make something like that on my site?

Lastly and the biggest question of all is how can i set these things so you can't do them unless you login and it's the same login name and password and user accounts as the forums. So if you make a forum account you can then add comments and rate them and do not have to make a new name.

Sorry i am new to PHP and MySQL. To be honest i have no clue how to use those things other then PHP includes and when i try to learn i get more confused then before. I know CSS and HTML fluently and getting to know Javascript pretty well.

#2 rldowling03

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 260 posts
  • Location:Adelaide, Australia
  • Interests:Games

Posted 05 January 2007 - 12:42 AM

First of all, i think it would be a great idea to allow users to comment on your tutorials to let you know any feedback they have on if it was or wasnt helpful... etc..

As for the ratings, im not sure exactly how to do it, but if i'm right you want it so the users have to login to rate on it??? Well im sure you can find a script like it, at php.resourceindex.com, i think thats the site, it has lots of pre made php scripts to easily add to your site.

#3 BooZker

    Mad Scientist of 2006

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 750 posts
  • Gender:Male
  • Location:Washington State in the USA
  • Interests:my wife Samantha, HTML, CSS, PHP, computers, magic, playing cards, and making movies.

Posted 05 January 2007 - 03:50 AM

OK thanks a lot. I will be sure to check it out. Do you know if i could connect the phpbb forum and then my website for comments and ratings?

EDIT: I looked on the site and i couldnt find any type of rating system other then for pictures. Have you ever seen a rating system other then picture rating on that site?

Edited by BooZker, 05 January 2007 - 04:02 AM.


#4 rvalkass

    apt-get moo

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,107 posts
  • Gender:Male
  • Location:Devon, England
  • Interests:At the moment, Physics mainly!
  • myCENT:69.42
  • Spam Patrol

Posted 05 January 2007 - 06:54 AM

I would use PHP and MySQL to store the information on ratings and comments. You would need two separate tables, one for ratings and one for comments. For the ratings you will need to store their user id, the post id and the rating. Comments is a similar thing: user id, post id, comment.

Using the user information from your forums should not be that difficult. Without looking at the tables the user data is stored in I can't say exactly how it would work, but it shouldn't be too difficult.

The rating system you have found for images would contain the same major code as a rating system for blog posts, you would just need to change a couple of things to adapt it to work for blog posts rather than images.

#5 BooZker

    Mad Scientist of 2006

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 750 posts
  • Gender:Male
  • Location:Washington State in the USA
  • Interests:my wife Samantha, HTML, CSS, PHP, computers, magic, playing cards, and making movies.

Posted 05 January 2007 - 11:33 AM

So PHP comments and ratings? Do you know of where i could get a tutorial on how to do this even? I will look in the morning because its 3:30 am, but remember i am VERY new to PHP. All i know are includes. Do you know of any FREE pre-made scripts?

#6 fffanatics

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 936 posts
  • Location:West Chester, PA

Posted 05 January 2007 - 02:43 PM

Well as for a tutorial i can not really help you but to break it down into terms you might be able to understand i will try and help. For the comment part, you would create a new php table. This table would have a field for the comment id, story id (so that you can pull all the comments just for the matching story) and the comment along with any other data you would like to include like the date, time, etc. You would write a script that would take this information and store it into the table but you have to make sure you store the story id number. Then to display the comments, just grab the data from the comment table that has the same story id number and display it.

As for the ratings, you could actually just add that as a member of the comments table and then average everyone's rating for the story and display the total rating along with the rating per users comment.

If you have any other implementation questions, feel free to PM me and ill help you out.

#7 rvalkass

    apt-get moo

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,107 posts
  • Gender:Male
  • Location:Devon, England
  • Interests:At the moment, Physics mainly!
  • myCENT:69.42
  • Spam Patrol

Posted 05 January 2007 - 07:31 PM

I have never seen a tutorial for comments or ratings becuase most CMSs and blogging solutions have things like that built in. The few tutorials out there don't go into a lot of detail and don't look too reliable. I am willing to help you to write your own, or can write one for you if you want. You can reach me on MSN, email or PM (details in my profile, or PM me), I've got quite a bit of free time this weekend.

If you do decide to go it alone then the main things you will need to research will be the MySQL functions and the echo construct. For readability and security reasons, you should read up on nl2br and htmlspecialchars. Remember, if you need any help then contact me and I shall guide you through it.

#8 BooZker

    Mad Scientist of 2006

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 750 posts
  • Gender:Male
  • Location:Washington State in the USA
  • Interests:my wife Samantha, HTML, CSS, PHP, computers, magic, playing cards, and making movies.

Posted 06 January 2007 - 03:07 AM

OK i PMed you rvalkass. Thanks.

#9 Shahrukh

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 139 posts
  • Gender:Male
  • Interests:Promoting Islam
  • myCENT:81.13

Posted 13 July 2010 - 09:13 PM

Why not use a blog software like wordpress or pixie?

That will give you well-developed, well-tested, optimised code for free with lots of plugins and pre-built themes; you can make your own too.

P.S. I would highly recommend wordpress.

#10 deadmad7

    Privileged Member

  • KS GFX Crew
  • PipPipPipPipPipPipPipPipPip
  • 869 posts
  • Gender:Male
  • Location:Standin' right behind you...
  • Interests:Ultra Pwning...
  • myCENT:66.04

Posted 14 July 2010 - 11:49 AM

View PostShahrukh, on 13 July 2010 - 09:13 PM, said:

Why not use a blog software like wordpress or pixie?

That will give you well-developed, well-tested, optimised code for free with lots of plugins and pre-built themes; you can make your own too.

P.S. I would highly recommend wordpress.
Wordpress isn't the only thing you should use. Here, I broke it down for you -

USE WORDPRESS if you don't anything about codes and want your site to look normal and simple and clean.
USE JOOMLA if you want your site to break barriers in web design and have a powerful website.
USE DRUPAL if you want to control your users and content to the max and to have a great looking site too.
USE MAMBO if you want the same effect as joomla except in a idiot-proof way and less add ons for your site.

I hope it helps you...




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users