Previous Thread
Next Thread
Print Thread
Page 1 2
#259381 - 10/27/2003 1:14 AM Re: Discouraging people from certain forums? How? [Re: jbiz]  
Joined: Nov 2001
Posts: 11,330
JoshPet Offline
I type Like navaho
JoshPet  Offline
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
for Google.

Sponsored Links
#259382 - 12/09/2003 6:50 PM Re: Discouraging people from certain forums? How? [Re: Daine]  
Joined: Dec 2003
Posts: 2
Mirez Offline
Lurker
Mirez  Offline
Lurker

Joined: Dec 2003
Posts: 2
Josh, implemented the code on our site (threads 6.4b1) and can't get it to work?

// Up their totalposts by 1
// Hack implemented Tue 9th Dec by Mirez
// don't increase the post count in certain forums
if ($Board == 'UBB5') {
$Totalposts = $user['U_Totalposts'];
$CurrTitle = $user['U_Title'];
$Color = $user['U_Color'];
}
else {
$Totalposts = $user['U_Totalposts'] + 1;
$CurrTitle = $user['U_Title'];
$Color = $user['U_Color'];
}


As above, the forums key if deffo UBB5 but it still increments 1 each time??

#259383 - 12/22/2003 8:58 PM Re: Discouraging people from certain forums? How? [Re: calabash23]  
Joined: May 2001
Posts: 562
Anno Offline
Code Monkey
Anno  Offline
Code Monkey

Joined: May 2001
Posts: 562
Austria
It should work...the only thing I could imagine is write
if ($Board == "UBB5") {
instead of
if ($Board == 'UBB5') {

#259384 - 01/26/2004 4:23 PM Re: Discouraging people from certain forums? How? [Re: domain123]  
Joined: Jun 2001
Posts: 363
monkeyra Offline
Junior Member
monkeyra  Offline
Junior Member

Joined: Jun 2001
Posts: 363
uk
Still havent got this hack to work Josh. Mirez is an administrator on my site, he had a go as you can see above, but nothing seems to happen.

#259385 - 01/26/2004 11:50 PM Re: Discouraging people from certain forums? How? [Re: Luka_dup1]  
Joined: Jun 2003
Posts: 1,185
slayer60 Offline
Junior Member
slayer60  Offline
Junior Member

Joined: Jun 2003
Posts: 1,185
New Boston, NH
Are you sure that UUB5 is the keyword for that board. I'm pretty sure that it is case sensative, so even it is ubb5 instead UBB5, that would be enough of a difference.

Sponsored Links
#259386 - 01/27/2004 1:50 AM Re: Discouraging people from certain forums? How? [Re: BrokenToy]  
Joined: Apr 2001
Posts: 3,440
omegatron Offline
Member
omegatron  Offline
Member

Joined: Apr 2001
Posts: 3,440
abingdon,md
UBB5 would be the keyword. That is the base for anyone converting from UBB

#259387 - 01/27/2004 9:27 AM Re: Discouraging people from certain forums? How? [Re: calabash23]  
Joined: Nov 2001
Posts: 11,330
JoshPet Offline
I type Like navaho
JoshPet  Offline
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
Actually - in a recent version the code got changed..... I'm going to report it as a threads bug, as it makes the existing code redundant. But you'll also need to find this:
Code:
<br />        UPDATE {$config['tbprefix']}Users<br />        SET    U_Totalposts = U_Totalposts + 1,<br />               U_Laston     = '$date',<br />               U_Title      = '$UserTitle_q'<br />        WHERE  U_Number   = '{$user['U_Number']}'<br />


Change to this:
Code:
<br />        UPDATE {$config['tbprefix']}Users<br />        SET    U_Totalposts = $Totalposts,<br />               U_Laston     = '$date',<br />               U_Title      = '$UserTitle_q'<br />        WHERE  U_Number   = '{$user['U_Number']}'<br />

#259388 - 01/27/2004 2:41 PM Re: Discouraging people from certain forums? How? [Re: Daine]  
Joined: Jun 2001
Posts: 363
monkeyra Offline
Junior Member
monkeyra  Offline
Junior Member

Joined: Jun 2001
Posts: 363
uk
I get this error when installing the hack. The hack seems to work, but i get the error. Also, it doesnt allow post count in any forum, so i need to tweak the code to only let it miss out certain ones yeah?

[]

SQL ERROR: Tue, Jan 27 2004 07:36:48 -0500 Unable to do_query: UPDATE w3t_Users SET U_Totalposts = Totalposts, U_Laston = '1075225008', U_Title = 'Webmaster' WHERE U_Number = '2'
Unknown column 'Totalposts' in 'field list'

[/]

#259389 - 01/27/2004 3:01 PM Re: Discouraging people from certain forums? How? [Re: Luka_dup1]  
Joined: May 2001
Posts: 562
Anno Offline
Code Monkey
Anno  Offline
Code Monkey

Joined: May 2001
Posts: 562
Austria
=$Totalposts
has to be
='$Totalposts'

#259390 - 05/19/2004 2:26 PM Re: Discouraging people from certain forums? How? [Re: domain123]  
Joined: Jun 2001
Posts: 363
monkeyra Offline
Junior Member
monkeyra  Offline
Junior Member

Joined: Jun 2001
Posts: 363
uk
just like to say, finally got this working. nice little hack, thanks everyone.

Sponsored Links
Page 1 2

Shout Box
Visit Us on Facebook
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Member Spotlight
Mark_S
Mark_S
UK
Posts: 278
Joined: November 2003
Show All Member Profiles 
Forum Statistics
Forums63
Topics37,340
Posts292,674
Members13,755
Most Online1,491
Aug 22nd, 2016
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,774
Greg Hard 5,533
Top Posters(30 Days)
id242 71
JAISP 43
Gizmo 19
Mark_S 18
Slaz 1
Jake V 1
Today's Statistics
Currently Online 706
Topics Created 1
Posts Made 20
Users Online 5
Birthdays 25
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2016 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160824.dev)
Page Time: 0.031s Queries: 16 (0.011s) Memory: 2.8346 MB (Peak: 2.9709 MB) Zlib enabled. Server Time: 2016-08-25 02:39:41 UTC