Перейти к содержимому


[DNO33] Post Anonymously

  • Авторизуйтесь для ответа в теме
В этой теме нет ответов

#1 Оффлайн   IpbZona Bot


  • Пользователи
  • Репутация
    • Cообщений: 29

Отправлено 15 Ноябрь 2012 - 05:17

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 Изображение

Main Author: Preben at

Пожалуйста Войдите или Зарегистрируйтесь чтобы видеть скрытое содержание

(Modern version, Mads developed the initial version)

  • 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
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.


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! Изображение

Пожалуйста Войдите или Зарегистрируйтесь чтобы видеть скрытое содержание