Jump to content


Welcome to DevFuse Forums


Sign In  Log in with Facebook

Create Account
Welcome to DevFuse Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of DevFuse Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.
 
Guest Message by DevFuse

(View All Products)Featured Products

  • Donations


    Help fund your forum with donations, setup goals and track member donations. Offer rewards for members donating.
  • Timeslips


    Have your members submit their race times and share with others.
  • Videos


    Allows your members to submit their own videos for community viewing. Support is included for all the major video sites.
  • Forms


    Build your own forms for your members without coding experience. Support included for pm, email and topics.
  • Collections


    Build a community database of items for your members. Full features custom fields included.

Photo

[IPS] [DNO33] Post Anonymously


This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 News Bot

News Bot

    Dedicated Member

  • Members
  • PipPipPipPipPip
  • 1,909 posts
  • IP.Board Version:N/A

Posted 14 November 2012 - 07:17 PM

With this members are able to post in forums anonymously. All posts posted with the anonymous function will be tied to one account that you define in the Admin CP. You will be able to check the true identity behind posts in the Mod CP. Posts posted will have a generated hash in them, to be able to tell members in discussions apart. (Please read further details on this in the attached readme).

This is developed and used with the thought of letting members be able to share or ask about sensitive / personal topics in specific forums. The users will not need to be logged out to ask as a guest and you will not have to enable guest posting. That's how we use it, you may use it differently Posted Image


Main Author: Preben at Mediehuset Tek (Modern version, Mads developed the initial version)


Features
  • Members of the user groups you allow will be able to post anonymously in the forums you choose
  • An md5-hash will be added to these posts to be able to tell members apart. Read the attached readme for details
  • Support is in place to have this work with quick reply, but it will require one file change and a template change
Installation
This hook requires one hook xml-file to be uploaded from the AdminCP. It also includes one file to upload.


How can I get this to work with quick reply?
You need to do a file change in the file public/js/ips.topic.js . To do this you need file access on the server where your board is installed.

Spoiler


In the file ips.topic.js, find: /* Fetch post contents */
var Post = ipb.textEditor.getEditor( ipb.topic.fastReplyId ).getText();
var isRte = ipb.textEditor.getEditor( ipb.topic.fastReplyId ).isRte();

Add this below:


var _postAsAnon = false;

if(document.getElementById('_postAsAnon')) {
var _postAsAnon = document.getElementById('_postAsAnon').checked;
}
A little bit further down, in the same file, find:
parameters: {
md5check: ipb.vars['secure_hash'],
Post: Post.encodeParam(),
isRte: isRte
},Change it to this:
parameters: {
md5check: ipb.vars['secure_hash'],
Post: Post.encodeParam(),
isRte: isRte,
_postAsAnon: _postAsAnon
},

Save the file.

Now you need to change a template bit in your templates. In your skins, find the template group Topic View, then open the template bit TopicViewTemplate.

Look for this, near the end of the template:

{parse editor="Post" options="array( 'type' => 'full', 'minimize' => 1, 'isTypingCallBack' => 'ipb.topic.isTypingCallBack', 'height' => 180, 'autoSaveKey' => 'reply-' . $topic[tid], 'warnInfo' => 'fastReply', 'modAll' => $topic['_fastReplyModAll'] )"}
<br />


Below it, add this:
<if test="custom_hw_anonhook:|:1 == 1"></if><!-- HW_CUSTOM custom anon hook point -->

Save the template. If you've done everything correctly you should now be able to reply anonymously with quick reply aswell.



Background: This is a popular feature we currently have installed on three different large Invision Power Boards we host, two of them 3.3 and one of them 3.2. First version was developed in March 2010 and it have been used and improved on two of the forums since then. (NOTE: This public version will not work on 3.2).


We hope that by sharing some of what we develop it will help us gain new ideas and more insight into developing for the Invision Power Systems. If any other developers have any hints or tips on changes that should be done to the code etc., then please let us know! Posted Image

View Resource