Jump to content

Help with my PHP forum


liam1412

Recommended Posts

Whats the best way to go about changing a post status images based on several peices of info!

 

I have a box for an image that I want to be different based on the current status of a post

 

For example

 

I will have these images

 

Standard Envelope

New Posts (Since last visit)

Hot Topic

Hot topic with new posts (since last visit)

Thread you have posted in

locked topic

 

and so on........

 

Can anyone tell me what is the bast way to go about this. I presume it would be some sort of switch stetment. Any hints for a good database setup for this. And also databse setup for subscribed threads etc.

 

I currently have

 

forum_topic

with the fields topic_id, topic, topic_text, topic_username, topic_start_date_time, topic_view, topic_reply

 

forum_answer

with the fields ans_topic_id, ans_id, ans_text, ans_username, ans_datetime

 

Any help with this woud be as always greatly appreciated.

 

Thanks

 

Not asking for the code to be written just a pointer in the right direction

Link to comment
Share on other sites

Are you writing the Forum from the bottom up, rather than using an existing piece of Forum sofwtare like vBulletin or phpBB?

 

If you are, I'd SERIOUSLY rethink that path - there's a lot of existing expertise invested in open source packages that you might be able to use on your site.

Link to comment
Share on other sites

Na I decided I wanted to do it all the way from the start. I like to throw myself in at the deep end and to be honest I have learnt so much from doing it. I know there are some good software packages out there but it owuldn't be half as much of a challenge doing it that way. besides I want to do this for a living so I want to know all the ins and outs of wrinting my own software.

Link to comment
Share on other sites

Well, the first thing you need to do is to consider adding some sort of status fields to thread and post tables - basically to say whether the thread or post is open, locked, 'soft deleted', etc.

 

Don't store the username as a user name. Store a reference to it. Will take less space and allow you to cope with people who want to change their names.

 

Subscribed threads - store the user id and a thread id, at teh very minimum.

Link to comment
Share on other sites

Mmmm this maybe more of a mission than I thought............I think i may just go crazy. WHile we are on about programming tho. How do you make those fantastic buttons that input the code for the smiley at the point were you are typing or the code and quote tags that wrap around highlighted text. Javascript I presume but I HAT JAVASCRIPT :rant: :rant:

Link to comment
Share on other sites

IThe only trouble is they are all written in object orientated code. Which obviously is far superior. But haven't even looked at that yet as I think that woul dbe a bit oout of my depth. I downloaded one called mercury board and did not have clue what anything was doing so I didn't know what to change.:huh: Do you know what. I think I may just stick to been anadmin assistant. Im sure the boredom is only as likely to make me go cuckoo as trying to learn all this.

Link to comment
Share on other sites

IThe only trouble is they are all written in object orientated code. Which obviously is far superior. But haven't even looked at that yet as I think that woul dbe a bit oout of my depth. I downloaded one called mercury board and did not have clue what anything was doing so I didn't know what to change.:huh: Do you know what. I think I may just stick to been anadmin assistant. Im sure the boredom is only as likely to make me go cuckoo as trying to learn all this.

 

It does take a bit of time to get on top of coding and software development - that's why we can charge the rates we do. ;)

 

But seriously - if you genuinely want to do this for a living, then unfortunately 'grunt' work is the only way to do it. It's a hard job at teh beggining, but it gets easier - sreiously!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.