MyBB Community Forums

Full Version: Post Warning Notification (Icon).
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
how to change to see the members?
(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.
(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
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
(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.
can you change code to all member see it
(2012-09-23, 07:28 PM)euantor Wrote: [ -> ]Ok, take a peak at this: http://euantor.com/4-reducing-mybb-plugi...he-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
(2012-09-28, 10:26 AM)lexy Wrote: [ -> ]can you change code to all member see it
http://community.mybb.com/thread-126575-...#pid917803
(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
Any chance this plugin works in 1.8.*?

Is great to show to users what kind of behavior they must avoid.
Pages: 1 2 3 4