Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 885
0 Users 7 Guests Online
Forum Index » PHP + MySQL » The New Forum
Posted on Tuesday 18th November 200 at 08:39 PM
UrbanTwitch
templates/default/images/noavatar.png's Avatar
Senior Member
Remember SkillMaster's forum? Well I upgraded and added a lot more.

http://cookyx.com/forum.php

Going to have to be logged in to post, of course.

Wutcha think?
Posted on Tuesday 18th November 200 at 08:58 PM
Dava
templates/default/images/noavatar.png's Avatar
Active Member
not bad
Posted on Monday 22nd December 2008 at 09:59 PM
Nathan
templates/default/images/noavatar.png's Avatar
Active Member
nice when will you be uploading ?
Posted on Tuesday 23rd December 200 at 01:31 PM
Vic Vance
templates/default/images/noavatar.png's Avatar
Active Member
Hey Urban please help me on mines, I m not asking you do do the whole thing for me but you know your last post infofrmtion it updates when someone makes a new tpic or replys to an older topic and the last post information updates. I really need mines to update the last post information if someone replyies to an older topic because at the moment it just updates if someone makes a new topic pleasee help:

this is how my code looks like

PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// MAIN FORUM
//*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

switch ($_GET['action']) {
    default:
        $fetch1 = mysql_query("SELECT * FROM `forum_category`");
        while ($category = mysql_fetch_array($fetch1)) {

            echo "<div class='box'>
                    <div class='forum_bar'> <img src='/images/icons/bullet4.gif' /> Smart CMS Community</div>
                    </div><br>";

            $fetch2 = mysql_query("SELECT * FROM `forum_topic` WHERE `cat_id` = '$category[id]'");
            while ($topic = mysql_fetch_array($fetch2)) {
                $getTopics = mysql_num_rows(mysql_query("SELECT * FROM `forum_thread` WHERE `thr_id` = '$topic[id]';"));
                $getReplies = mysql_num_rows(mysql_query("SELECT * FROM `forum_posts` WHERE `fid` = '$topic[id]';"));
                $getLatestTopic_a = mysql_query("SELECT * FROM `forum_thread` WHERE `thr_id` = '$topic[id]' ORDER BY `id` DESC LIMIT 1");
                $getLatestTopic = mysql_fetch_array($getLatestTopic_a);
                $timeago = date("jS F Y - h:i A", $getLatestTopic['timeposted']);

                echo "<div id='forum_cat'>
                           <div class='forum_contant'>
                        
                           <div class='boxtitle'>Category: $category[name]<a href='?page=home&action=forum&id=$topic[id]'>&nbsp;&nbsp;&nbsp;<img src='images/default/form_enter.gif'  border='0'></a></div>


                        <div class='sub_forum'>$topic[name]</div>
                           <div class='forum_image'><img src='$topic[icon]' /></div>
                           <div class='forum_top'>Topics Made: $getTopics &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; Replies Made: $getReplies</div>
                           <div class='forum_description'>";
                if (mysql_num_rows($getLatestTopic_a) == 0) {
                    print "<fieldset>
                                        <legend>Last Post</legend>
                                          In: No Posts Made
                                          By: -<br>
                                        </fieldset>";
                } else {
                    $getTopicReplies_query = mysql_query("SELECT *  FROM `forum_posts` WHERE `thr_id` = '$getLatestTopic[id]';");
                    $getTopicReplies_num = mysql_num_rows($getTopicReplies_query);
                    $getTopicReplies = mysql_fetch_array($getTopicReplies_query);
                    if(($getLatestTopic['timestamp'] > $getTopicReplies['timestamp']) || $getTopicReplies_num == 0 ){
                        print "<fieldset>
                             <legend>Last Post</legend>
                          In: <a href=\"?page=forum&action=forumdisplay&id=$getLatestTopic[id]\">$getLatestTopic[title]</a>
                          By: <a href='?page=members&user=$getLatestTopic[poster]'>$getLatestTopic[poster]</a><br></fieldset>";
                    }else{
                        print "<fieldset>
                             <legend>Last Post</legend>
                          In: <a href=\"?page=forum&action=forumdisplay&id=$getLatestTopic[id]\">$getLatestTopic[title]</a>
                          By: <a href='?page=members&user=$getTopicReplies[poster]'>$getTopicReplies[poster]</a><br></fieldset>";
                    }
                }
                print "</div>
                                <div class='bottom'></div>
                           
               
                        </div>
                            </div>";

            }
            echo "<div class='clearer'></div>"; // give space sunder the forums
        }

        $rows = mysql_num_rows($fetch1);
        if ($rows == 0) {
            echo ("<center><b>Forum is Empty<b></center>");
        }
        break; // end of main forum section
Posted on Tuesday 23rd December 200 at 01:44 PM
Nathan
templates/default/images/noavatar.png's Avatar
Active Member
just wait for urban to upload his, im sure it wont be to far away
Posted on Tuesday 23rd December 200 at 04:51 PM
Vic Vance
templates/default/images/noavatar.png's Avatar
Active Member
Ohh I did not know he was going to upload his, tht would be real cool if he does I am not making up bad comments to be rude at SkillMaster's tutorail, but honestly it is badly coded I was soon going to post how to get the view topic in shape but now I wont becuase urban will post his. Thanks
Posted on Thursday 25th December 20 at 08:26 PM
UrbanTwitch
templates/default/images/noavatar.png's Avatar
Senior Member
Mmhm.. soon!
Posted on Friday 26th December 2008 at 01:16 PM
Vic Vance
templates/default/images/noavatar.png's Avatar
Active Member
thanks allot UrbanTwitch
Posted on Tuesday 6th January 2009 at 04:55 PM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
Ok i'm jelous i tried for weeks to get the stickys topics to stay at the top and the other threads follow by newest post but i couldn't work it out.

Fancy giving me a hand?
Posted on Monday 19th January 2009 at 02:50 AM
Nathan
templates/default/images/noavatar.png's Avatar
Active Member
i dont think he is gonna post it, its been to long