Previous Thread
Next Thread
Print Thread
Rate Thread
#213692 02/13/2002 10:31 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
This is a revised version of Sitstay's Mark All Read hack. It works for 5.5 , and includes installation instructions.

It includes another hack also from Sitstay, which will mark all read automatically for new users so the forums will load fast and they start fresh.

Max
Attachments
44338-markallread.zip (0 Bytes, 16 downloads)

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Grazi []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

This one does make a huge difference in forum speed... I'll update the one we have here []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Apr 2000
Posts: 76
Journeyman
Journeyman
Joined: Apr 2000
Posts: 76
I get this error on MARK ALL READ:

In reply to:

SQL ERROR: Unable to do_query: SELECT Bo_Keyword, Bo_Last FROM w3t_Boards WHERE Bo_Total > 0 AND ()
You have an error in your SQL syntax near ') ' at line 5
Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sdsrdom/wwwthreads-php/markallread.php on line 141

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sdsrdom/wwwthreads-php/mysql.inc.php on line 83




any ideas?


i run sdstreetracing.com and streetracing.com
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
I have that too!!

If you compare the (working) adduser-script with the (not-working) markallread-script, you find that [:red] difference:

// Grab all the boards in the database
$query = "
SELECT Bo_Keyword[:red], Bo_Last
FROM w3t_Boards
WHERE Bo_Total > 0
$groupquery
";
$boards = $dbh -> do_query($query);
[:red] $total = mysql_num_rows($boards);


Maybe that extra code is the problem?

Another problem is that inside the function there is a part of non-php HTML... that looks also unproper to me.

Last edited by caymuc; 02/14/2002 5:45 PM.
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
No, I think I found it :

Should be:

$userob = new user;
$user = $userob -> authenticate("$Username","$Password","U_Username, U_Password, U_Groups, U_TimeOffset");

Sponsored Links
Maze_Brendan #213697 02/14/2002 10:55 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Sorry... user authentication was incorrect... my apologies. This is my installed version which works. The name of the file should be markallread.php. The difference is:
after:
// Get the user info
you need to have:
$Username = $w3t_myname;
$Password = $w3t_mypass;

Regards,
Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
See my post above, marked "CORRECTION" ... sorry about that.
Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Thanks caymuc,

The other way is to do what I described above, in my post entitled "Correction" ... it's my working version on 5.5

Regards,
Max

Maze_Brendan #213700 02/15/2002 6:22 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
forgot to attach
Attachments
44410-markallread4.txt (0 Bytes, 43 downloads)

Joined: Apr 2000
Posts: 76
Journeyman
Journeyman
Joined: Apr 2000
Posts: 76
Thanks, this is what fixed it along with what Max Put in.



i run sdstreetracing.com and streetracing.com
Sponsored Links
Joined: May 1999
Posts: 90
Member
Member
Offline
Joined: May 1999
Posts: 90
Err... I just grabbed it and for some reason I fail to see the reason for this:
 $Board = 'websites';    // edit this board name to one on your site

// ---------------------------------------
// Set a cookie, or register a session var
if ($config[tracking] == "sessions") {
session_register('w3t_visit');
$w3t_visit .= "-$Board=$Last-";
}
else {
$w3t_visit .= "-$Board=$Last-";
setcookie("w3t_visit","$w3t_visit",0);
}
Why do we need to set the last time for a board?

[EDIT] I always keep forgetting something: you'll also have to add $config to the 'global' line of the domarkallread function (otherwise the test for cookie/session mode will not work properly)

Techster #213703 03/17/2002 12:32 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
I asked Sitstay the same question at the time... he gave an answer, frankly it was over my head.
Max

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
could someone please explain to me where to put
format: $phpurl/markallread.php?Cat=$Cat&action=markallread
when using 5.5.1?

I keep getting errors no mater where i place this piece of script.

cheers

lanet #213705 03/18/2002 12:47 PM
Joined: May 1999
Posts: 90
Member
Member
Offline
Joined: May 1999
Posts: 90
Actually, you need to place a line like:
<a href="$phpurl/markallread.php?Cat=$Cat&action=markallread" $target>Mark all read</a>$spacer
in ubbt.inc.php. You should look around line 347 -- there are a bunch of lines like that.

Techster #213706 03/18/2002 5:36 PM
Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
Thanks razvan,

This seems to make sense for 551

cheers


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)