[How To] Add Warnings Count in a Member's posts

How-to's, little tricks, tutorials, code examples (snippets) and read-me's.

Re: [How To] Add Warnings Count in a Member's posts

Postby stitch626 » 19 Jan 2008, 13:34

Please correct me if I am wrong, but the way I understand this code is:

If you are moderator or you are the user who posted (author) and the warnings is NOT equal to 0, then show the warnings.
Code: Select all
<!-- IF U_MCP or S_USERNAME eq postrow.POST_AUTHOR and postrow.POSTER_WARNINGS neq 0 -->

Now if this is the case, then it doesn't work properly, because if you are a moderator it will show the warning link on everyones post even if warnings are equal to 0. It seems to work good for the regular user but I only would like the warnings to show for moderator & admin ONLY if there is a warning issued for that user, but still want the user with the warning to still be able to see the warning too.

I thought I had this working once before :scratch:
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7


Re: [How To] Add Warnings Count in a Member's posts

Postby Sniper_E » 19 Jan 2008, 13:45

@ Stitch: I think you forgot the quotes.
Code: Select all
<!-- IF U_MCP or S_USERNAME eq "postrow.POST_AUTHOR" and postrow.POSTER_WARNINGS neq 0 -->
I have not ever tried that variable in this. Tell us if it works for you.

@ Skyler: viewtopic.php?p=29285#p29285

@ belial: I'll add a screenshot on the first post. There isn't one there?
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [How To] Add Warnings Count in a Member's posts

Postby stitch626 » 19 Jan 2008, 13:54

By adding those quotes it actually removed the warning link from the warned users post if you are logged in as the user, but if you are admin or moderator it shows up in all posts again even if the warnings are equal to 0.

Oh well nice try. I will keep fooling with it unless you have any other ideas.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: [How To] Add Warnings Count in a Member's posts

Postby Sniper_E » 19 Jan 2008, 14:23

Code: Select all
<!-- IF U_MCP and postrow.POSTER_WARNINGS neq 0 -->
This shows for moderators and administrators ONLY IF the warning count is above 0. This we know.

Maybe you need to do this to add the eq part to it.
Code: Select all
<!-- IF U_MCP and postrow.POSTER_WARNINGS neq 0 or S_USERNAME eq "postrow.POST_AUTHOR" and postrow.POSTER_WARNINGS neq 0 -->
Try that and let us know how it goes.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [How To] Add Warnings Count in a Member's posts

Postby stitch626 » 19 Jan 2008, 14:41

:clapping: Yea! that works! the only thing I had to change is I had to remove the quotes. Otherwise it wouldn't show for the warned user.

Thanks Ed. Your my hero. :)
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: [How To] Add Warnings Count in a Member's posts

Postby Sniper_E » 19 Jan 2008, 14:48

That's true.... the postrow.POST_AUTHOR is the variable, not a "Name", so it wouldn't go in quotes.
I'll have tokeep that in mind.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [How To] Add Warnings Count in a Member's posts

Postby Sniper_E » 19 Jan 2008, 19:54

saw wrote:I hope a mod will be made, and we will not be forced to edit the database when we want to remove a warning.
I'm with saw on that! A mod for this would be awesome!!!
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [How To] Add Warnings Count in a Member's posts

Postby NMI » 11 Jul 2008, 08:47

Will this work as is for Glacier based styles? Like Borg Invasion?
Or has there been a mod made for this?
Image
Image
Image
Image
The price of freedom is eternal vigilance. - Thomas Jefferson
User avatar
NMI    
Supporter
Supporter
 
Posts: 110
Joined: 19 Oct 2007, 14:15
Location: Illinois
Favorite Team: Chicago Bears
Gender: Male
phpBB Knowledge: 5

Re: [How To] Add Warnings Count in a Member's posts

Postby NMI » 29 Jul 2008, 00:55

Bueller?


Last bumped by NMI on 29 Jul 2008, 00:55.
Image
Image
Image
Image
The price of freedom is eternal vigilance. - Thomas Jefferson
User avatar
NMI    
Supporter
Supporter
 
Posts: 110
Joined: 19 Oct 2007, 14:15
Location: Illinois
Favorite Team: Chicago Bears
Gender: Male
phpBB Knowledge: 5

Previous

Return to Tutorials and How-Tos

Who is online

Users browsing this forum: Discovery Bot and 6 guests