liam1412 Posted December 12, 2006 Share Posted December 12, 2006 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 More sharing options...
JoeP Posted December 12, 2006 Share Posted December 12, 2006 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 More sharing options...
liam1412 Posted December 12, 2006 Author Share Posted December 12, 2006 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 More sharing options...
JoeP Posted December 12, 2006 Share Posted December 12, 2006 Good Luck! I do this sort of thing for a living and I'm lazy - if there's anything around that will do the job I tend to use it! Link to comment Share on other sites More sharing options...
liam1412 Posted December 12, 2006 Author Share Posted December 12, 2006 Thanks. I think Im gonna need it. lol. So any clue on what im wanting to do then Link to comment Share on other sites More sharing options...
JoeP Posted December 12, 2006 Share Posted December 12, 2006 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 More sharing options...
liam1412 Posted December 12, 2006 Author Share Posted December 12, 2006 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: Link to comment Share on other sites More sharing options...
JoeP Posted December 12, 2006 Share Posted December 12, 2006 Hang on, let me start the charging clock. Seriously - if you're new to PHP and Javascript, I'd really consider taking an existing package and learn from changing it. To get these things right is 'non-trivial'. Link to comment Share on other sites More sharing options...
liam1412 Posted December 12, 2006 Author Share Posted December 12, 2006 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. 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 More sharing options...
JoeP Posted December 12, 2006 Share Posted December 12, 2006 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. 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.