Announcement

Collapse
No announcement yet.

Displaying forum post counts but not allowing access

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

  • #16
    Thanks a lot Zach, thats the best solution!!!

    Comment


    • #17
      Post the contents of these templates:

      phpinclude_start
      forumhome_forumbit_level1_post
      forumhome_forumbit_level2_post

      Comment


      • #18
        Originally posted by Jake Bunce
        Post the contents of these templates:

        phpinclude_start
        forumhome_forumbit_level1_post
        forumhome_forumbit_level2_post
        Hi Jake,
        here's what I have: (sorry I don't know how to include the code in the separate box here?)

        _________________________________________________________________
        1. "phpinclude_start"

        // Example of how to include a seperate file:
        // ob_start();
        // require("yourheader.html");
        // $header = ob_get_contents();
        // ob_end_clean();
        // IF FORUMHOME OR FORUMDISPLAY PAGE
        if (THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay')
        {
        ****// GET FORUM COUNTERS
        ****$forumcounts= $DB_site->query("SELECT forumid, replycount, threadcount
        ********FROM " . TABLE_PREFIX . "forum
        ********");

        ****// SET VALUES
        ****while ($forumcount = $DB_site->fetch_array($forumcounts))
        ****{
        ********$forumreply[$forumcount[forumid]] = $forumcount[replycount];
        ********$forumthread[$forumcount[forumid]] = $forumcount[threadcount];
        ****}
        }

        _________________________________________________________________
        2. "forumhome_forumbit_level1_post"

        <tbody>
        <tr align="center">
        <td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">

        <table cellpadding="0" cellspacing="0" border="0">
        <tr>
        <td><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
        <td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
        <td>
        <div>
        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
        <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
        </div>
        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
        <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
        <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
        </td>
        </tr>
        </table>

        </td>
        <td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
        <td class="alt1">{$GLOBALS[forumthread][$forum[forumid]]}</td>
        <td class="alt2">{$GLOBALS[forumreply][$forum[forumid]]}</td>
        <if condition="$vboptions['showmoderatorcolumn']">
        <td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
        </if>
        </tr>
        </tbody>
        <if condition="$childforumbits">
        <tbody>
        $childforumbits
        </tbody>
        </if>
        _________________________________________________________________
        3. "forumhome_forumbit_level2_post"

        <tr align="center">
        <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
        <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
        <div>
        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
        <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
        </div>
        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
        <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
        <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
        </td>
        <td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</td>
        <td class="alt1">{$GLOBALS[forumthread][$forum[forumid]]}</td>
        <td class="alt2">{$GLOBALS[forumreply][$forum[forumid]]}</td>
        <if condition="$vboptions['showmoderatorcolumn']">
        <td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
        </if>
        </tr>
        $childforumbits

        Comment


        • #19
          The asterisks shouldn't be in your phpinclude_start template (********).

          Comment


          • #20
            Originally posted by Jake Bunce
            The asterisks shouldn't be in your phpinclude_start template (********).

            I am so sorry, but the asteriks weren't there actually
            Somehow, they just "showed up" when I was posting them here. I promise.

            Comment


            • #21
              In that case everything looks fine. If you want me to take a look then send me a private message with a URL and admin login to your forums.

              Comment


              • #22
                FYI to others:

                There were a bunch of weird "E" characters where the asterisks are in the above code. I replaced the weird characters with tabs. It's working now.

                Comment


                • #23
                  Jake,
                  I tried both options you posted, and in both cases guests still had full access to the forums. They could see every post in the forums. Is there something you have to do prior to adding this code?

                  Thanks!
                  Bob Hubbard
                  WebMaster, SilverStar WebDesigns Inc.

                  Comment

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