Author |
Topic Search Topic Options
|
swabygw
Newbie
Joined: 02 September 2017
Status: Offline
Points: 12
|
Post Options
Thanks(0)
Quote Reply
Topic: Wrong Number of Topics & Posts 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)
Edited by swabygw - 08 September 2017 at 5:02am
|
|
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
swabygw
Newbie
Joined: 02 September 2017
Status: Offline
Points: 12
|
Post Options
Thanks(0)
Quote Reply
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)
|
|
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
swabygw
Newbie
Joined: 02 September 2017
Status: Offline
Points: 12
|
Post Options
Thanks(0)
Quote Reply
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)?
|
|
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
|
Post Options
Thanks(0)
Quote Reply
Posted: 08 September 2017 at 2:34pm |
When creating a post you use the Insert Image Icon
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
|
|
|
swabygw
Newbie
Joined: 02 September 2017
Status: Offline
Points: 12
|
Post Options
Thanks(0)
Quote Reply
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
Edited by swabygw - 08 September 2017 at 3:55pm
|
|
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|