Announcement

Collapse
No announcement yet.

Managing Forum Announcements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Managing Forum Announcements

    My site is currently set up so that when I make an announcement, I make it a "global" announcement, so that it appears at the top of each forum. I do this because many of our users are bookmarked directly into a specific forum, and do not hit the main index page at all. So I post a global announcement so they all get a chance to see it, and I set it to expire after 15 days. I then go in and edit the announcement, changing it from global to a specific Announcements forum I have set up. This way the announcements are on file, for anyone who comes along later and wants to check to see what has happened. This system works fairly well for us, except for one thing.

    Since the Announcements forum contains only "announcements", versus regular posts, the post count that displays on the index page is always "0". Is there any way, short of copy/paste from the announcement text to a new post, to convert the announcements over to actual threads, or to have the announcements count as posts in the forum? (In the screen shot, you can see that the Announcements forum lists zero posts. There are currently three announcements in that forum, but few of our users realize that.)

    Or, alternately, how do other folks manage their announcements? We need them to be global for a while, to make sure everyone sees them, and then we want to archive them.
    Attached Files

  • #2
    You can use the announcement count instead of the post count by adding a query to your phpinclude_start template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start

    Add this code:

    PHP Code:
    $announce_forumid 26;

    $announce_count $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "announcement WHERE forumid = $announce_forumid"); 
    Change $announce_forumid appropriately.

    Then go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_forumbit_level2_post

    Add the red code:

    Code:
    	<td class="alt1"><if condition="$forum[forumid] == $GLOBALS[announce_forumid]">{$GLOBALS[announce_count][count]}<else />$forum[threadcount]</if></td>
    	<td class="alt2"><if condition="$forum[forumid] == $GLOBALS[announce_forumid]">{$GLOBALS[announce_count][count]}<else />$forum[replycount]</if></td>
    	<td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
    	<if condition="$vboptions['showmoderatorcolumn']">
    	<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
    	</if>
    I tested this and it works.

    Comment


    • #3
      Jake, thanks so much for this assist. Works very nicely. My apologies for not getting back to this sooner...I was in the middle of some other work, and had to wait 'til I'd finished it before I could circle back here.

      Much appreciated!

      Comment


      • #4
        Change $announce_forumid appropriately.
        how to change ?

        Comment


        • #5
          Change $announce_forumid appropriately.
          does it mean :
          http://www.mydomain.com/myforums
          ???

          Comment


          • #6
            Change it to the forumid of the forum that contains your announcements. This forum will display its announcement count instead of its reply / thread counts.

            For example, if your announcement forum has a forumid of 1 then change that link to say:

            PHP Code:
            $announce_forumid 1

            Comment


            • #7
              what happen if I make a Global Announcement ? all forums have the same announcement ?

              Comment


              • #8
                Originally posted by ZeroCool09
                what happen if I make a Global Announcement ? all forums have the same announcement ?
                You can include global announcements in the count by changing the phpinclude_start code to this. Changes are marked in red:

                Code:
                $announce_forumid = 26; 
                
                $announce_count = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "announcement WHERE forumid = $announce_forumid OR forumid = -1");

                Comment


                • #9
                  and the $announce_forumid = ? for global announcements ?

                  Comment


                  • #10
                    if I have forumsid 1 = forums contained forumid = 2
                    like :
                    *

                    Comment


                    • #11
                      Originally posted by ZeroCool09
                      and the $announce_forumid = ? for global announcements ?
                      Keep that set to the forumid of your announcement forum (the forum for which you want the announcement count to show instead of the reply / thread count).

                      Comment


                      • #12
                        Originally posted by ZeroCool09
                        if I have forumsid 1 = forums contained forumid = 2
                        like :
                        *
                        I don't understand.

                        Comment


                        • #13
                          if my forums tree like that

                          * forums = forumsid = 1 (parent)
                          *** announcements = forumsid = 2 (child)
                          *** members' opinions = forumsid = 3 (child)
                          * learning = forumsid = 4 (parent)
                          *** English = forumsid = 5 (child)
                          *** Math = forumsid = 6 (child)
                          * relax = forumsid = 7 (parent)
                          *** Music = forumsid = 8 (child)
                          *** Chatting = forumsid = 9 (child)

                          and I want to make a global announcement which will appear in all forums (both parent and child forums)
                          so what will I fill in
                          $announce_forumid = ????

                          Comment


                          • #14
                            You can make a global announcement in your:

                            Admin CP -> Announcements -> Add New Announcement

                            Under the Forum option select All Forums.

                            This has nothing to do with the code I posted in this thread. The code I posted is to show an announcement count for a certain forum instead of the reply / thread counts.

                            Comment


                            • #15
                              so it means if I make a globle announcement, the users will see nothing if they only view the index ? is there any hacks that could makes the announcement to be displayed as normal posts ? (still be announcements but show in index as new posts ?)
                              apply for global announcements .

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X