Announcement

Collapse
No announcement yet.

2-for-1 special on thread views?!?

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

  • almighty one
    replied
    Originally posted by k2webfusion
    Did anyone ever find a fix for this issue? One view actually is being counted as 2 on my forum as well. Just posted a new thread about it because I could not find an answer to the question after searching the forums for similar issue. It appears it happens a lot, but no explanation yet. If there's a fix, I haven't found it yet.
    i have the same prob however i have swutiched to he holiday theme for now and all is fine but if i switch to mystandard tems then double views once before it gave 3 to1 instead of 2 to 1 when i upgraded from 2.03 to 2.2.8 it fixed it but then somewhere something was edited and it screwed back up i just take out views and forget it as i consider it another lost feature

    Leave a comment:


  • k2webfusion
    replied
    Did anyone ever find a fix for this issue? One view actually is being counted as 2 on my forum as well. Just posted a new thread about it because I could not find an answer to the question after searching the forums for similar issue. It appears it happens a lot, but no explanation yet. If there's a fix, I haven't found it yet.

    Leave a comment:


  • Shredfest
    replied
    Thanks for the ideas. Freddie, I made the code change you suggested, but it didn't fix the problem. The only two templates I had changed were the header and footer. I reverted the footer back to the original - not fixed. I then reverted the header back - FIXED!

    Here's the modified header code that was causing the problem:

    Code:
    <!-- logo and buttons -->
    <center>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <td valign="top" align="left" background="#000000"><a href="/index.htm"><img src="images/vBulletin_logo.gif" border="0" alt="$bbtitle"></a></td></tr>
      <tr><td valign="bottom" align="center" nowrap background="images/menu_background.gif">
       <!-- toplinks -->
       <a href="usercp.php?s=$session[sessionhash]"><img src="images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0"></a>
       <a href="register.php?s=$session[sessionhash]&action=signup"><img src="images/top_register.gif" alt="Registration is free!" border="0"></a>
       <a href="calendar.php?s=$session[sessionhash]"><img src="images/top_calendar.gif" alt="Calendar" border="0"></a>
       <a href="memberlist.php?s=$session[sessionhash]"><img src="images/top_members.gif" alt="Find other members" border="0"></a>
       <a href="misc.php?s=$session[sessionhash]&action=faq"><img src="images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>
       <a href="search.php?s=$session[sessionhash]"><img src="images/top_search.gif" alt="Search" border="0"></a>
       <a href="index.php?s=$session[sessionhash]"><img src="images/top_home.gif" alt="Home" border="0"></a>
       <!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img src="images/top_logout.gif" alt="Logout" border="0"></a>  -->
       &nbsp;
       <!-- /toplinks -->
      </td>
    </tr>
    </table>
    <!-- /logo and buttons -->
    
    <!-- content table -->
    <table bgcolor="#FFFFFF" width="100%" cellpadding="10" cellspacing="0" border="0">
    <tr>
      <td valign="top">
    Basically all I did was center the buttons. Can anyone spot anything that might cause the doubling up of the page views?

    Thanks,
    Kevin

    EDIT: I also put the buttons in another table row to put a little more space between them and my site's logo and the area for a banner ad.
    Last edited by Shredfest; Mon 27 Aug '01, 6:59pm.

    Leave a comment:


  • Freddie Bingham
    replied
    And try changing this in showthread.php
    Code:
    if ($noshutdownfunc) {
      $DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
    } else {
      $shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
    }
    to
    Code:
    if ($noshutdownfunc) {
      $DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
    } else {
      $shutdownqueries[]="UPDATE thread SET views=views+1 WHERE threadid='$threadid'";
    }

    Leave a comment:


  • Mike Sullivan
    replied
    It's a strange issue that's cropped up once or twice before. The one time, I remember, had something to do with something the guy put in his templates. It made no sense why it was happening, but try reverting your header/footer/phpinclude/showthread templates and see if that helps...

    Leave a comment:


  • reveltaion456
    replied
    Maybe its because conincidentially, someone else viewed the thread at the same time?

    Leave a comment:


  • Shredfest
    replied
    OK, but I still don't understand why entering a thread, then backing out of it causes the views to increment by two. I'm only loading the page that displays the thread once.

    When I do the same thing here, the views only increment by one.

    Help!

    Leave a comment:


  • reveltaion456
    replied
    This is one of the reasons I recommended there only be one view counted per user no matter how many time he visits the thread.

    It didn't go through so now you know.

    Leave a comment:


  • Shredfest
    started a topic 2-for-1 special on thread views?!?

    2-for-1 special on thread views?!?

    Every time I enter a thread, then hit the back button on my browser, the "Views" for that thread has increased by two! I am the only one on the board. Any fix for this?

    Thanks!
Loading...
Working...
X