PDA

View Full Version : Profile Report


Elixar
02-27-2014, 09:58 PM
I've looked around and couldn't find anything, so decided to post here.

I'm in need of a mod that would allow members to be able to file a general misconduct report on a user from their profile in the same manner that posts are reported.

Thanks! :)

Elixar
03-01-2014, 06:25 PM
Bump here. :)

Elixar
03-03-2014, 11:54 PM
Bumping to see if anyone can help. :)

ForceHSS
03-04-2014, 12:12 AM
If no one has replied is because no one wants to make it so might be best to try posting in paid section

blind-eddie
03-04-2014, 12:33 AM
I pm'd Elixar, I thought this was a paid request....

ForceHSS
03-04-2014, 12:38 AM
Your a gent eddie

Elixar
03-04-2014, 02:04 AM
Replied to you Eddie.

Elixar
03-07-2014, 01:32 PM
Just bumping this up. :)

blind-eddie
03-07-2014, 04:16 PM
Sorry, when I get home tonight, I will show you what I have... I am having a security token issue with but, the proper info is there to fix it... I thought.

Hopefully someone can look at it to see why.,

Elixar
03-08-2014, 01:28 PM
Sorry, when I get home tonight, I will show you what I have... I am having a security token issue with but, the proper info is there to fix it... I thought.

Hopefully someone can look at it to see why.,

Ah okay. I just bumped it up here if anyone else had an attempt. Eddie you've been a great help though. :)

blind-eddie
03-08-2014, 03:16 PM
Simon Lloyd added this to my 3.8 test site a year or two ago, I don't remember.
He gave me permission to share this with you.

It does however work on 3.8
It is loaded on my heavily modified 3.8 test site

http://blind-eddie.com/forum/member.php?u=1

login: Test Account One
password: 00000000


See post #15 for 4.2 xml

Elixar
03-08-2014, 08:04 PM
That's exactly what I was wanting, booo though to the error. Hopefully someone will be able to assist. :)

Simon Lloyd
03-09-2014, 06:59 AM
Is this correct for vb4value="$bbuserinfo[securitytoken]" take a look at the pm template and see how the security token is delivered there ;)

--------------- Added 1394348506 at 1394348506 ---------------

Also if you want your users to be able to give their own message about the profile..etc there's an easy change to the code to amend that.

Elixar
03-12-2014, 03:39 PM
I won't mess with the code since I'd rather not blow anything up. :D

blind-eddie
03-12-2014, 08:05 PM
I forgot about this, sorry.

It now works with vb4.2.2.

ForceHSS
03-12-2014, 08:29 PM
I forgot about this, sorry.

It now works with vb4.2.2.
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: report_user_info_button in ..../includes/functions.php on line 4591

blind-eddie
03-12-2014, 08:44 PM
That's odd, I do not have that error.
It is the only thing installed on the 4.2.2 test site.

I uninstalled & reinstalled, I can not reproduce that error message.

ForceHSS
03-12-2014, 09:20 PM
Comes up on my site pity would of like to use the plugin

Elixar
03-12-2014, 11:42 PM
I'm getting that error as well.

blind-eddie
03-13-2014, 02:02 AM
Note: I am not getting the error you are getting.

I guess it is not working on 4.2.2 as I thought.
I tested this on a 4.2.2 test site with just me on it, therefore it worked great on my account.
When adding a new member to the equation things changed a bit.
When I reported the other member profile page it would show his name in the pm but, my userid.

I have tried everything but the right thing to get this to show the correct userid but I just can't seem to get it.

In the 4.2.2 xml the following code is the code I am having difficulty with.

<input type="hidden" name="title" value="Reporting Suspect Info" maxlength="85" style="width:60%" tabindex="1" />
<div style="display: none;"><textarea name="message" rows="2" cols="20" style="width:100%; height:100px" tabindex="1" class="tarea">Please check the Profile page of {vb:raw userinfo.username} ({vb:raw vboptions.bburl}/member.php?{vb:raw session.sessionurl}u={vb:raw user.userid}) as it contains offensive material.</textarea>



The "vb:raw user.userid" code is the one I just can not get correct to show the proper userid of the reprted profile.

ozzy47
03-13-2014, 02:11 AM
I think what you want is, {vb:raw prepared.userid} instead of {vb:raw user.userid}

On a side note, the error Warning: fetch_template, is being caused by this line in the XML:

$vbulletin->templatecache['memberinfo_block_ministats'] = str_replace($rui_button,fetch_template('report_use r_info_button'),$vbulletin->templatecache['memberinfo_block_ministats'].$rui_button);

How to fix, off the top of my head I am not sure, have not installed the mod myself.

blind-eddie
03-13-2014, 02:22 AM
I swear I tried prepared.userid... it worked, Thanks oZZy.
Not sure why I am not getting that error.

ozzy47
03-13-2014, 02:24 AM
TBH, it does not work for me at all in vB4.

Elixar
03-13-2014, 02:33 AM
It won't work at all?

ozzy47
03-13-2014, 02:35 AM
Not for me, it actually breaks the sideblock in the users profile.

Elixar
03-13-2014, 02:36 AM
Not for me, it actually breaks the sideblock in the users profile.

Damn, let me try it again.

EDIT: I don't see the Report option on the profile, and I'm getting the error in the header.

ozzy47
03-13-2014, 02:37 AM
TBH I am not even sure how Eddie has it working at all in vB4, with the fetch_template call.

ForceHSS
03-13-2014, 03:16 AM
I see you uploaded a new version eddie in post 15 put the same error is still there
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: report_user_info_button in ..../includes/functions.php on line 4591

ozzy47
03-13-2014, 03:20 AM
Yep, and the funny thing is, it is working on his site, and I have no idea why. :confused:

ForceHSS
03-13-2014, 03:37 AM
maybe because he has no other custom plugins not sure if that is why it works for him

ozzy47
03-13-2014, 03:40 AM
No honestly that should not matter, the fetch_template call has not worked at all in vB4 as far as I know. That is one of the reasons most of the mods for vB3 will not work in vB4. That was replaced by rendering templates and registering variables.

blind-eddie
03-13-2014, 03:40 AM
Humor me a minute...

Open your memberinfo_block_ministats template

Find:
</vb:if> </vb:comment>




Add below:

<!-- Report Profile Start -->
<vb:if condition="$userinfo['userid'] = $bbuserinfo['userid']">
<else />
<script language="Javascript">
function Success(){
ss.innerHTML="Thank you for your submission";
setTimeout("kk()",1000);
}

function kk(){
document.forms[0].submit();
}

</script>

<form action="private.php?do=insertpm&amp;pmid=={vb:raw pm.pmid}"=$bbuserinfo" method="post"name="vbform" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.title.value, 0)">
<div style="display: none;"> $pm[recipients] </div>
<div id="pmrecips" style="display: none"><textarea id="pmrecips_txt" name="recipients" rows="2" cols="50" tabindex="1">blind-eddie; </textarea></div>
<div>
<input type="hidden" name="title" value="Reporting Suspect Info" maxlength="85" style="width:60%" tabindex="1" />
<div style="display: none;"><textarea name="message" rows="2" cols="20" style="width:100%; height:100px" tabindex="1" class="tarea">Please check the Profile page of {vb:raw userinfo.username} ({vb:raw vboptions.bburl}/member.php?{vb:raw session.sessionurl}u={vb:raw prepared.userid}) as it may contain offensive material.</textarea></div>

<div>

<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="{vb:raw pm.pmid}" />
<input type="hidden" name="forward" value="{vb:raw pm.forward}" />
<input type="hidden" name="receipt" value="1" />
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />

<input type="submit" class="button" name="sbutton" value="Report This Info" accesskey="s" onClick="Success()" tabindex="1" />
</div>
</div>
</form>
</vb:if>
<!-- Report Profile End -->

But change blind-eddie in the code above to your username

ozzy47
03-13-2014, 03:44 AM
Yes it works, cause you added the code directly to the template, instead of relying on the plugin to add it. :)

Elixar
03-13-2014, 04:13 AM
So that should make the plugin work?

ForceHSS
03-13-2014, 04:14 AM
If this is the way you done it Eddie without using the plugin, then this is why it is working for you. Maybe someone can recode this for 4.2.2

blind-eddie
03-13-2014, 04:15 AM
No, remove the plugin & follow instructions I posted above to add the code to the template without the need for a plugin.

ForceHSS
03-13-2014, 04:16 AM
Would rather have it as a working plugin

blind-eddie
03-13-2014, 04:17 AM
If this is the way you done it Eddie without using the plugin, then this is why it is working for you. Maybe someone can recode this for 4.2.2

No, it is a plugin on my site, it is working, ozzy checked it out on my test site.
I will give you access if you would like.
I just added the template code so others could use it for now, until it is re-written.

I would rather hard code then use plugins anyday..... how else will you learn how it all works..... I learn everyday.

Elixar
03-13-2014, 04:18 AM
It is good, but was really hoping for the form you could file. Meh, I'll have to make do with another way I guess for now.

ozzy47
03-13-2014, 04:18 AM
We are working out the details to get this properly updated to vB4.

It may be a few days though. :)

Elixar
03-13-2014, 04:19 AM
You're a life save Ozzy, thanks! :)

Thanks to Eddie as well. :)

ForceHSS
03-13-2014, 04:25 AM
We are working out the details to get this properly updated to vB4.

It may be a few days, though. :)
Cool can't wait for the plugin to come out

Simon Lloyd
03-13-2014, 10:51 AM
Make sure you have permissions correct for only members...etc to see the button, in that template code it only prevents the user seeing the button in his own memberinfo block.

ozzy47
03-14-2014, 12:16 AM
Well I got the confirmation, I am able to take this over and fully develop it for vB4 & vB3, thanks to Simon Lloyd for allowing me to do so. He will of course get credit in the mod's thread once it's released. I will get started on this as soon as I can. :)

Elixar
03-14-2014, 12:25 AM
Thanks Ozzy! :)