Sponsored Content
The Lounge What is on Your Mind? Changes to the Forums (Pages and Stats) Post 303026676 by Neo on Saturday 1st of December 2018 11:46:37 AM
Old 12-01-2018
Changes to the Forums (Pages and Stats)

Hey.

So... here are the changes.

1. The current home page of the forum is now based on a algo (below) which shows a thread based on this SQL

Code:
$select_limit = 1; 
$reply_count = 3; 
$thread_array = array(); 
$forum_id = 30;  //shell programming 
$query = 'SELECT * FROM thread WHERE forumid = ' . 
$forum_id .' AND visible=1 AND replycount > ' . 
    $reply_count . ' ORDER BY threadid DESC LIMIT ' . $select_limit; 
$latest_thread = $db->query_first_slave($query); 
$featured_threadid= $latest_thread['threadid'];

In other words, the home page shows one of the latest threads from the Shell Programming and Scripting forum that has a reply count of greater than 3. I will add some more logic to this later.


2. The original home page is now accessible from the navbar on each page and is called "Forum" or "Forums"

Code:
https://www.unix.com/forum.php

In the future, after I fix some links anchors, I will change the above link to:

Code:
https://www.unix.com/forum/

3. The stats which were at the top of the forums, are now included at the top of each search page results. This means if you view "Thanked Posts" or "Today's Posts" or "Newest Posts" or even do a keyword search, you will get the same results as before but the status will appear at the top.

The reason for this change is as follows:

The Advanced Stats on the home page caused SEO engines and analyzers to complain that there are too many links, so we need to move this off the home page. So, I moved it to the top of each search result page for now.

Also, the old home page was is very static (without the stats) so I moved that page off the home page (but make it available as /forum) and then made the home page more dynamic showing the latest busy thread.

That's about it... except for some minor changes to the editors which I will explain in another post.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

I/O Stats Metrics

What do others use for measuring I/O statistics? I'd like something versatile, as in being able to watch (like iostat, but easier to trend), generate load (like iozone, but more realistic), and perform somewhat generalized benchmarks (like bonnie, but more current.) It would scale from a few... (0 Replies)
Discussion started by: LivinFree
0 Replies

2. AIX

system stats

I recieved this out put below soemhow. Unfortunatly I did not write down the command I used to get it. Can someone tell me what command I use to gather these stats? OS = AIX 5.3 64Bit System Model: IBM,7026-6H1 Machine Serial Number:... (2 Replies)
Discussion started by: rocker40
2 Replies

3. AIX

IO Stats

Aix 5.3 I am trying to view the IO stats. I do the sar 5 5 but that is the WIO and si different than the IO stats right? I am just blanking on this. I know there is a command that I used to run that brings up a whole bunch of live stats that run live such as mem and so on just can't rememeber... (4 Replies)
Discussion started by: rocker40
4 Replies

4. AIX

can I use ps to log overall system stats.

Hi I'm writing a script to get overall system memory and cpu utilization in percentages, much like in top or with AIX's topas. Could I use 'ps' to get the same, I know I can get such results for a particular or group of PIDs but I haven't been able to figure out how I could use 'ps' to give me... (10 Replies)
Discussion started by: thebytegrill
10 Replies

5. What is on Your Mind?

Tapatalk Stats for Forums (Android v. iPhone)

Interesting... for both the iPhone and Andriod phones, so far browsing forums using the Tapatalk apps is rare. Seems folks like the web (browser) format better. With new tablets coming out, I think this trend (browser on tablets v. special apps) will continue. I was surprised, however, that... (0 Replies)
Discussion started by: Neo
0 Replies

6. Shell Programming and Scripting

Using Stats in Php

So, I have a php program that i need to delete ALL files in a directory that are older than a certain age. <?php /* Get file stat */ $stat = stat('/apps/security/ajaba'); This is as far as I've been able to get. I know in shell programming you can easily do something like this. but I'm... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Linux

Stats on subdirectories

Please help me with a shell script to get the stats on many subdirectories (sub1), (sub2) etc under a mother directory (big) /big | |_______sub1 |_______sub2 |_______sub3 --------- I want to know 1. What is the last file accessed in each subdirectory with date and by whom 2.... (2 Replies)
Discussion started by: digipak
2 Replies

8. What is on Your Mind?

Moved Advanced Stats to Search Results Pages

FYI, today I moved the "Advanced Stats" page from the forum home page to the search results pages. This means that at the top of the search results like "Today's Post" and "New Posts" and keyword searches, the stats will appear at the top of that page instead of the home page. The reason of... (3 Replies)
Discussion started by: Neo
3 Replies
EXECUTE(7)                                                         SQL Commands                                                         EXECUTE(7)

NAME
EXECUTE - execute a prepared statement SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ] DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre- pared statement must have been created by a PREPARE statement executed earlier in the current session. If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of their parameters; the name of a prepared statement must be unique within a database session. For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)]. PARAMETERS
name The name of the prepared statement to execute. parameter The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the data type of this parameter, as was determined when the prepared statement was created. OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE. EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation. COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a somewhat different syntax. SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)] SQL - Language Statements 2010-05-14 EXECUTE(7)
All times are GMT -4. The time now is 05:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy