Print Page | Close Window

Wrong Number of Topics & Posts

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=31502
Printed Date: 29 March 2026 at 12:51am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Wrong Number of Topics & Posts
Posted By: swabygw
Subject: Wrong Number of Topics & Posts
Date Posted: 08 September 2017 at 4:00am
Hey, I think I possibly found an issue in function updateForumStats within the functions_common.asp file.  Those SQL queries look like this:
 
SELECT Count(tblTopic.Forum_ID) AS Topic_Count
From tblTopic
WHERE tblTopic.Forum_ID = 1
AND tblTopic.Hide = 0
 
SELECT Count(tblThread.Thread_ID) AS Thread_Count
FROM tblTopic, tblThread
WHERE tblTopic.Topic_ID = tblThread.Topic_ID
AND tblTopic.Forum_ID = 1
AND tblThread.Hide = 0
 
However, sometimes, when a post/topic is deleted, it's not deleted from the database but, rather, the Start_Thread_ID and Last_Thread_ID fields are updated to negative values and the Hide field isn't updated, so the queries above return the total number of posts & topics...including the deleted ones.
 
I have a follow-up question to this: sometimes deleting the post deletes it from the database (delete_post.asp) and sometimes it just updates the Start_Thread_ID and Last_Thread_ID fields to negative values.  In the latter case of the negative values - what file holds that update sql and how does it derive the negative value?  I guess I should ask why it does the negative value thing instead of just deleting the post/topic, too.
 
(I wanted to provide a picture here of how the negative numbers look in my database, but the File Upload icon isn't in the toolbar)
 
 



Replies:
Posted By: WebWiz-Bruce
Date Posted: 08 September 2017 at 7:39am
You should not have negative numbers in the Start_Thread_ID or Last_Thread_ID in the tblTopic table in your database .

If you have negative numbers it means that something went wrong server side saving a new topic and only the subject was saved and the post for the new topic failed to save.

The only time I have seen this occur is when the SQL Server database is full and only a partial save of the topic occurred.

If you have identified orphaned topics in the database they should not be there. They should be removed, but I would not advise to do this without taking a full database backup first.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: swabygw
Date Posted: 08 September 2017 at 12:49pm
Thanks - that explains it.
I have another issue that I identified in that images uploaded via File Upload always appear in a new tab, even though "Same Window" (_self) was chosen - same in any browser.  (I can start a new topic on this, if that's preferred)


Posted By: WebWiz-Bruce
Date Posted: 08 September 2017 at 1:10pm
Sorry I don't know what you mean by images appearing in another tab as images should appear within posts and do not know what you mean by choosing ""Same Window" (_self)" as I am not aware of any such option.

There is an option in the admin area for links added to posts to open a new window when clicked on, but I can't think of what else you might be referring to as this option is for links and not images.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: swabygw
Date Posted: 08 September 2017 at 1:21pm
Ah, I see now - I thought the right side of that popup window also applied to uploads.  I'm guessing that the admin option you're referring to is the "Open Local Links in the same Browser Window".  So, is there a way for a user to upload a picture, from their desktop, and have the picture displayed in the post (not just a link)?


Posted By: WebWiz-Bruce
Date Posted: 08 September 2017 at 2:34pm
When creating a post you use the Insert Image Icon Insert Image

This opens a window used for uploading and/or selecting an image. Once you select an image you click OK to insert the image in to your post in the carrot location.

This works in all desktop and mobile browsers except for Edge where the require javascript methods are disabled within the browser.

Below is an image I have just uploaded

Web Wiz


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: swabygw
Date Posted: 08 September 2017 at 3:42pm

Okay, I'm able to upload from an image from my desktop.  And now my images are showing up correctly in the posting.  Not sure why it didn't work earlier (I was just getting a url link).

P.S., I've successfully implemented Tags and a Tag Cloud in my site...you're welcome to copy it, maybe for a future version.  Just do a file compare on my files and the original downloadable code and you'll find all the mods.  Here's the documentation of the Tags that I implemented:  https://goodies.pixabay.com/jquery/tag-editor/demo. - https://goodies.pixabay.com/jquery/tag-editor/demo.html
 
 
 
 
 


Posted By: WebWiz-Bruce
Date Posted: 11 September 2017 at 7:59am
Thanks for the offer of the Tag Cloud.

However, it is not something that plan to implement as Google will rank you lower for keyword stuffing for the use of Tag Clouds.

Matt Cutt's for the Search Quality group in Google gave a speech on this a few years back since then most webmasters have removed Tag Clouds from their websites to prevent them being penalised by Google.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: swabygw
Date Posted: 11 September 2017 at 2:41pm
No problem.  I've also implemented a new icon in the RTE toolbar to encapsulate code (it also adds line numbers to each line of code).  I would paste a picture here, but the Image Properties window here doesn't have the upload browser buttons.  But, you can see it on my site here:  http://www.enterpriseinterchange.comew_topic_.asp?FID=1 - http://www.enterpriseinterchange.comew_topic_.asp?FID=1 - http://www.enterpriseinterchange.com/new_topic_form.asp?FID=1 . It's the last icon on the top row of icons.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net