View Full Version : How to add a banner for reported posts
Elixar
03-17-2014, 02:53 AM
I've seen on forums where it will say reported on a post that has been reported, how would I do this? :)
ForceHSS
03-17-2014, 03:14 AM
Not sure what you mean by that but what i done was made a section only admins see make two forums in it then go to admincp/settings/options/User Infractions & Post Reporting Options
Elixar
03-17-2014, 03:18 AM
Not sure what you mean by that but what i done was made a section only admins see make two forums in it then go to admincp/settings/options/User Infractions & Post Reporting Options
I know, I have it set like that. I mean an banner like this:
https://vborg.vbsupport.ru/external/2014/03/37.png
ForceHSS
03-17-2014, 03:24 AM
Looks like a template edit but hard to know from a picture. Not sure if its on here have you searched?
Elixar
03-17-2014, 03:27 AM
Yeah it's a .png file added into the background. Where would I add it?
ForceHSS
03-17-2014, 03:33 AM
What coding have you got done?
Elixar
03-17-2014, 03:34 AM
You mean on the site I pulled it from?
ForceHSS
03-17-2014, 03:35 AM
either that or your site
Elixar
03-17-2014, 03:43 AM
I pulled this from the code:
<td class="alt1" id="td_post_65000441" style="background-image: url('http://*.com/images/misc/reported.png'); background-position: top left; background-repeat: no-repeat;">
ForceHSS
03-17-2014, 03:50 AM
can i get a link to the post pm it to me if you wish
Elixar
03-17-2014, 03:56 AM
You wouldn't be able to see it as it is only visible to Staff.
ForceHSS
03-17-2014, 03:59 AM
so if you are an admin why not ask the owner how it was done
Elixar
03-17-2014, 04:01 AM
I don't with to be chasing up people for it.
I just wanted to see if anyone knew how to do it here.
ForceHSS
03-17-2014, 04:06 AM
Without getting a live link I would say the owner has done it with a custom plugin. That would be the best way to do it
Elixar
03-17-2014, 04:13 AM
I'll look around and see what else can be done.
cellarius
03-17-2014, 02:18 PM
I'm not really sure what ForceHSS is expecting to see on the live site (especially since, from the given code, that site is obviously vB3.x, and this is the vB4 section).
Adding such an image to the background of a post per se is rather trivial with CSS.
The interesting part is how to decide whether the post has been reported or not. If you configure vB to open a thread for reported posts in a hidden staff forum (Admin CP -> vBulletin Options -> User Infractions & Post Reporting Options->Post Reporting Discussion Forum), this can be quite easily achived, there's not even a need for a plugin.
Look at the post table. There's a column named reportthreadid. If a post is reported and a thread created in the staff forum, this table will contain the threadid of that thread.
So, the only thing to do is to check in the postbit (or postbit_legacy) template if that table field is 0 or not. If it is != 0, then a thread has been created, and the post has been reported.
Using an if condition you can use this to add the needed css code.
Try this:
In postbit (or postbit_legacy) template find:
<div class="postbody">
Replace with:
<div class="postbody"<vb:if condition="$post['reportthreadid'] != 0 AND in_array($bbuserinfo['usergroupid'], array(5, 6, 7))"> style="background: url('http://www.smilies.4-user.de/include/Brutal/smilie_b_018.gif') top right no-repeat;"</vb:if>>
Done. This adds a rather martial smiley to the right top of the post background, visible only to usergroups 5, 6 and 7 (admins and moderators).
Of course, you would replace the smiley I used for testing with a more sophisticated banner, and you can do whatever additional css magic you like. And remember: It is essential that you configure vB to open a thread in a staff forum upon a report. E-Mail notification to Admins and Mods is not enough.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.