MyBB Community Forums
Post Warning Notification (Icon). - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: Post Warning Notification (Icon). (/thread-126575.html)

Pages: 1 2 3 4


RE: Post Warning Notification (Icon). - Postovi - 2012-09-27

how to change to see the members?


RE: Post Warning Notification (Icon). - crazy4cs - 2012-09-28

(2012-09-27, 10:44 PM)Postovi Wrote: how to change to see the members?
Open the plugin (pwn.php) file, find and remove this line:

 && is_moderator($fid)

Save it.


RE: Post Warning Notification (Icon). - asad3man - 2012-09-28

(2012-09-23, 05:43 PM)Yaldaram Wrote: You're making a very big query Unadkat. You do not have to use users and posts tables since you can directly fetch the warned post from its pid on postbit from warnings table.

Anyway, querying on each post is too weighty. I would suggest to create a column in posts table, and then update this column when warning issues and on warning expires. You can then simply use $post['column_name'] and check if its true then shows the icon and if its false removes the icon.

(2012-09-23, 07:08 PM)crazy4cs Wrote:
(2012-09-23, 05:43 PM)Yaldaram Wrote: You're making a very big query Unadkat. You do not have to use users and posts tables since you can directly fetch the warned post from its pid on postbit from warnings table.
Yes, I think I gave it a try but just pid didn't worked, so I added uid, I will retry it and give it a try tomorrow. Yes, that unfortunately runs around 9-10 queries on showthread. I also tried caching it, but I'm not too good with cache and unfortunately that didn't worked, if you've any suggestion for cache, that would be appreciated.

Quote:Anyway, querying on each post is too weighty. I would suggest to create a column in posts table, and then update this column when warning issues and on warning expires. You can then simply use $post['column_name'] and check if its true then shows the icon and if its false removes the icon.
This seems a great idea, I think I shall also try to do this, thanks. Smile

Both are awesome users , Not they are? Remember me Crazy Toungue


RE: Post Warning Notification (Icon). - lexy - 2012-09-28

tell me this notification its only for admins or all member can see it??

also you can add in ACP option one notice box where admin can add some words about warned user


RE: Post Warning Notification (Icon). - crazy4cs - 2012-09-28

(2012-09-28, 08:14 AM)lexy Wrote: tell me this notification its only for admins or all member can see it??

also you can add in ACP option one notice box where admin can add some words about warned user
Only admins, super moderators and moderator of the forum, in which the thread is situated can only see it (default MyBB way).

And no, the second part will be too complex to add notes for each user, then I'll have to hook into when giving warning as well and then display it.


RE: Post Warning Notification (Icon). - lexy - 2012-09-28

can you change code to all member see it


RE: Post Warning Notification (Icon). - Leefish - 2012-09-28

(2012-09-23, 07:28 PM)euantor Wrote: Ok, take a peak at this: http://euantor.com/4-reducing-mybb-plugin-queries-in-the-postbit

It should help you cut the query count to just one if you do it right. Also, why are you looking up the uid from the user's table? Just use $post['uid'] unless I'm missing something by skim reading on my phone.


I went to look at the post as I was interested in this - um, there is no CODE sample there Big Grin


RE: Post Warning Notification (Icon). - crazy4cs - 2012-09-28

(2012-09-28, 10:26 AM)lexy Wrote: can you change code to all member see it
http://community.mybb.com/thread-126575-post-917803.html#pid917803


RE: Post Warning Notification (Icon). - Postovi - 2012-09-28

(2012-09-28, 05:17 AM)crazy4cs Wrote:
(2012-09-27, 10:44 PM)Postovi Wrote: how to change to see the members?
Open the plugin (pwn.php) file, find and remove this line:

 && is_moderator($fid)

Save it.

thank you very much Smile


RE: Post Warning Notification (Icon). - palhanow - 2016-06-09

Any chance this plugin works in 1.8.*?

Is great to show to users what kind of behavior they must avoid.