The Lounge What is on Your Mind? Similar Threads: More UNIX and Linux Forum Topics You Might Find Helpful Update Post 303021567 by Neo on Monday 13th of August 2018 01:00:27 AM
This issue is that these "Similar Threads" are built automatically when new threads are created.

The code runs thru the database, scores similar threads primarily based on the title of the threads, sorts the threads based on the scores, and then places a comma separated field of the thread ids in each thread in a DB field for that thread. Before that number was limited to 5 and now it is limited to 10. I may increase if to 15 or even 20 people think it is a good idea.

However, there was a number of logic flaws in the process. The main flaw is that old threads are not updated with "similar ones" unless we manually update the database. This was not done on a regular basis since it was designed to be done manually; but I have it on my calendar to run it once a month.

The second flaw is the algorithm used to create the matches is based mostly on thread titles. This is not bad, but it would be better if it used the thread content or at least the tags. However, this of course will effect performance.

If you are interested, I can post the entire PHP code for this algorithm and you can rewrite it to make it even better. Otherwise, it will be on a future "Neo TODO List" as I'm now focused on tasks related to the layout, tables and responsive design". I can only do so much and juggle so many balls at once, LOL

On my current main TODO list are:

  • Responsive threadbits (search results, forum thread views, etc.).
  • Responsive similar thread (under each thread).

Each of these tasks is fairly simple, since I have done this a few time already:

  • Study the source of a page and determine where to add CSS flex container classes.
  • Add CSS flex container classes to the rows and row items.
  • Write jQuery code to manipulate the DOM for these classes.
  • Test this in "Neo Only Mode" until I get all the parameters working correctly.
  • Check responsiveness from huge (2000px wide) to small (300 px wide) and retest.
  • Make public after "Neo Testing" is done.

It was interesting to do at first, but the more tables I transform to CSS flex, the more boring it becomes, so occasionally I diverge into fixing something else just to keep my sanity, LOL

For example, a few days ago I got bored and decided to add some new "tooltips" to the thread bits using Bootstrap and their tooltip extensions. I need to add this to all threads and forum descriptions and then create some UserCP bools or client side JS code to turn this on and off. I was going to code this inside the browser (Javascript) and not in the UserCP (PHP, server side), but then I will need to use a cookie to "remember" the user selections.

If I do this now (create the cookies), I will end up with 20 more cookies, which I do not want to do, so I want to wait until I have most of the new .JS done, create a single cookie with a JSON configuration string and encrypt this string in the cookie. This is all doable, but I prefer to do this after finishing 80% of the responsible jQuery code I need to write.

In the past, we had up to 3 "coding" admins, or at least 2, and now we are down to me, which is fine. I greatly appreciate all the coding in the past, but as the only "coding guy" these days, I have to follow some logical plan to get this done, while I have the time and interest.

Cheers.
 
Test Your Knowledge in Computers #764
Difficulty: Medium
A cache miss is a failed attempt to read or write a piece of data in the cache, which results in a main memory access with much shorter latency and increased speed.
True or False?

4 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Similar Threads - a new vB3 feature for UNIX.COM

Note the new feature on UNIX.COM, many thread at the bottom of the page have a new feature: Similiar Threads Here is an example on one of Perderabo's posts: https://www.unix.com/showthread.php?t=16337 Kudos to the vB folks for this built-in feature!! Neo (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

Forum Update: Disabled Home Page Forum Statistics for Guests (Not Registered)

Just a quick update; to speed up the forums, I have disabled the forum statistics on the home page for non registered users. No changes for registered users. (0 Replies)
Discussion started by: Neo
0 Replies

3. What is on Your Mind?

Forum Update New Steps for UNIX.com

Dear Everyone, Thank you for all the great comments, feedback and patience during our recent modernization efforts at unix.com. Now, I need to decide where to go next, as we move into the next phase. Some of the ideas I have are: Make the UserCP experience and all those non-public... (6 Replies)
Discussion started by: Neo
6 Replies

4. What is on Your Mind?

Similar Threads Redesign for UNIX.com

Hello. I have redesigned our "similar threads" for a more "clean style" in both the desktop view and the mobile view for the forum "show thread". The new design is a simple straight-forward use of div elements and all the legacy table elements have been removed. The result is a "clean"... (7 Replies)
Discussion started by: Neo
7 Replies

Featured Tech Videos

All times are GMT -4. The time now is 09:13 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy