Delete banned users

classic Classic list List threaded Threaded
52 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Pedro
What I have done was: take the banned users off the other group lists.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Pedro
In reply to this post by mywaytoo
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

mywaytoo
In reply to this post by Pedro
Pedro <Nabble> wrote
What I have done was: take the banned users off the other group lists.
They are still in 'All Users'... Is that where you check to see if people have already registered or not?

Is there some way that we, admins, could have an area to store all of our known spammers, names and email addresses, to help each other out???

Thank you...
Anne
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

mywaytoo
In reply to this post by Pedro
I can't cope with most things at the moment, let alone coding! I've got a broken leg, but should be having it fixed soon (too scared to say when in case they cancel it!!!). I'll have another look later in the year...
Anne
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
In reply to this post by Pedro
Yes, Pedro, I saw. Thank you..
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
In reply to this post by Pedro
I'd like to do this, but I have to understand very well, before.  I don't understand this step:
http://support.nabble.com/Extra-Profile-Fields-tp7586937p7586938.html
....and even the other steps are not easy for those who is not expert. I will follow the next post to try to understand better.
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Pedro
Did you understand the step 2 ?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
No, Pedro. In that Topic you said "I will explain it better later", but where did you explain it? Thank for your attention....Ciao
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

juanete
This post was updated on .
Hi Silvana.

I've done it in the following way and administrators can see the IP of the users on your profile:

1- At the bottom of your app-> See "Edit this page" or "naml".
2- At the engine wheel -> "Go to Advanced Editor" .
3- Add new file named "extra_profile_fields"
4- add the following code:
<macro name="extra_profile_fields" requires="user,servlet">
    <n.set_local_user.this_user />
    <!-- Listing the fields already filled -->
     <n.this_user.list_extra_fields/>
</macro>

<macro name='list_extra_fields' requires='user'>
    <!-- Ip property-->
    <n.if.this_user.has_property name="ip">
        <then>
            <br/>
            <strong>IP: </strong><n.this_user.get_property name="ip"/>
        </then>
    </n.if.this_user.has_property>
</macro>
5-  Then, edit your "profile_header" macro.

On line 13 the following code searches:
...
                <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">  
                    <then>  
                        <strong>Email</strong>: <n.local_user.user_email/>  
                    </then>  
                </n.if.both>
...
And paste between the tags "then" the following line:
                            <n.local_user.extra_profile_fields/>
Must be as follows:
...
                    <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">
                        <then>
                            <strong>Email</strong>: <n.local_user.user_email/>
                            <n.local_user.extra_profile_fields/>
                        </then>
                    </n.if.both>
...
The complete code for the macro is:
<override_macro name="profile_header" requires="user">
    <n.set_local_user.this_user />
    <n.block.>
        <div class="second-font shaded-bg-color rounded" style="font-size:170%;padding:.2em .5em;margin-left:.1em">
            <n.local_user.name/>
        </div>
        <table>
            <tr valign="top">
                <td><n.local_user.avatar size="big"/></td>
                <td style="width:100%;padding-left:.5em">
                    <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">
                        <then>
                            <strong>Email</strong>: <n.local_user.user_email/>
                            <n.local_user.extra_profile_fields/> <!--PASTE THIS LINE TO SHOW THE IP-->
                        </then>
                    </n.if.both>

                    <n.if.local_user.is_banned>
                        <then>
                            <n.local_user.banned_label/>
                        </then>
                        <else>
                            <n.local_user.registration_label/>
                            <n.local_user.list_current_groups/>
                            <n.if.not.local_user.is_deactivated>
                                <then.local_user.send_email_to_user_link/>
                            </n.if.not.local_user.is_deactivated>
                        </else>
                    </n.if.local_user.is_banned>

                    <!-- If this is the profile of the visitor -->
                    <n.if.visitor.equals.local_user>
                        <then>
                            <!-- if the user is authenticated -->
                            <n.if.local_user.is_authenticated>
                                <then.local_user.authenticated_self_profile_header/>
                                <else>
                                    <div style="margin-top:.5em">
                                        <t><n.register_link.>Register now</n.register_link.> if you want to edit your profile, receive posts via email,control your starred items or have access to your global profile.</t>
                                    </div>
                                </else>
                            </n.if.local_user.is_authenticated>
                        </then>
                        <else>
                            <n.if.visitor.can_manage_banned_users>
                                <then>
                                    <div style="margin-top:.5em">
                                        <img src="/images/icon_blocked.png" class="image16" style="margin:0 1px"/>
                                        <n.if.local_user.is_banned>
                                            <then><a href="[n.local_user.unban_path/]"><t>Unban this user</t></a></then>
                                            <else><a href="[n.local_user.ban_path/]"><t>Ban this user</t></a></else>
                                        </n.if.local_user.is_banned>
                                    </div>
                                </then>
                            </n.if.visitor.can_manage_banned_users>
                        </else>
                    </n.if.visitor.equals.local_user>
                </td>
            </tr>
        </table>
    </n.block.>
</override_macro>
6-  For Getting the ip address from a visitor, Edit the macro "new_post".

Below the line 10:
...
            <else>
...
Paste the following line:
                <n.visitor.set_property name="ip" value="[n.now.long_format/] : [n.visitor_ip_address/]" />
The complete code for the macro is:
<override_macro name="new_post" parameters="page_name,mailing_list_etiquette,bottom,focus" requires="servlet">
    <n.node_page.>
        <n.handle_new_node_permission_error/>
        <n.if.not.is_submitted_form>
            <then>
                <n.subject_field.set_value value="[n.page_node.default_reply_subject/]" />
                <n.alert_field.set_value value="[n.page_node.alert_default_value/]" />
                <n.init_new_post_custom_fields/>
            </then>
            <else>
                <n.visitor.set_property name="ip" value="[n.now.long_format/] : [n.visitor_ip_address/]" />  <!--PASTE THIS LINE TO GET IP-->
                
                <n.catch_exception. id="save-block">
                    <n.handle_anonymous_submit/>
                    <n.check_antispam_submit bypass="preview"/>
                    <n.check_recent_post_limit/>
                    <n.create_child_of_page_node commit="[n.not.is_preview/]">
                        <subject><n.subject_field.value/></subject>
                        <message><n.message_field.value/></message>
                        <is_html><n.html_format_field.value/></is_html>
                        <type><n.type_field.value/></type>
                        <kind>post</kind>
                        <do>
                            <n.remember_new_node/>
                            <n.if.not.is_preview>
                                <then>
                                    <n.save_post/>
                                    <n.save_new_post_custom_fields/>
                                    <n.new_node.send_node_as_email/>
                                </then>
                            </n.if.not.is_preview>
                        </do>
                    </n.create_child_of_page_node>
                    <n.if.not.is_preview>
                        <then>
                            <n.new_node.save_alert_field/>
                            <n.redirect_to.new_node.url/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><n.page_name/></n.title.>
                <n.focus/>
                <style type="text/css">
                    .title-row {
                        padding:.6em .8em;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
                <n.edit_header first_text="[n.page_name/]" second_text="[n.truncate. size='80'][n.page_node.subject/][/n.truncate.]" />

                <n.if.is_submitted_form>
                    <then>
                        <n.if.has_exception for="save-block">
                            <then.show_new_node_error/>
                            <else>
                                <n.if.is_preview>
                                    <then.new_node.preview/>
                                </n.if.is_preview>
                            </else>
                        </n.if.has_exception>
                    </then>
                </n.if.is_submitted_form>

                <n.subscription_reminder/>

                <n.form. onsubmit="return singleSubmit(this)">
                    <n.type_field.hidden/>
                    <n.mailing_list_notice.mailing_list_etiquette/>

                    <n.reply_form />

                    <div style="margin-top:1em">
                        <n.antispam_submit_button class="toolbar action-button" value="[t]Post Message[/t]"/>
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]"/>
                        <t>or</t>
                        <a href="[n.page_node.url /]"><t>Cancel</t></a>
                    </div>
                </n.form.>

                <n.hide_null.bottom/>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>


Now we just need to know how to block IP address. That I have no idea.

regards
“El software libre construye una sociedad mejor“
"Free software builds a better society"
— Richard Stallman
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
Thank you, juanete, but it is secure that only the administrator can see the IP of the users? This is important for the privacy.
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

juanete
Yes, only the administrator can see. Like the email

So I put between two conditions: the visitor of the profile is administrator [n.visitor.is_site_admin/] and the user is authenticated [n.local_user.is_authenticated/]

                    <n.if.both condition1="[n.visitor.is_site_admin/]" condition2="[n.local_user.is_authenticated/]">  
                        <then>  
                            <strong>Email</strong>: <n.local_user.user_email/>  
                            <n.local_user.extra_profile_fields/> <!--PASTE THIS LINE TO SHOW THE IP-->  
                        </then>  
                    </n.if.both>

I tried it with other users and they do not see
“El software libre construye una sociedad mejor“
"Free software builds a better society"
— Richard Stallman
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
Ok, I did everything you told me, but for now, I do not see anything. Maybe, has to pass some time to see the changes?
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
In reply to this post by juanete
 Hi, juanete. Hours have passed and nothing has changed. In the profiles of the users do not see their IP. I'll send you the pictures of the changes I made to the macro. Look, please, if I have done something wrong. Thank you very much.



I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

juanete
Hi, You can not know the IP of a user who wrote before inserting the function

have to write a new post for the function to get the IP

If no one has written a new post since you modified the code, try to write a new post and then go to your profile to check
“El software libre construye una sociedad mejor“
"Free software builds a better society"
— Richard Stallman
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
Right, what a fool!  Thank you, juanete, I will wait for the next post. Thank you, thank you and thank you ....
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
In reply to this post by juanete
Hi, juanete. Now my users wrote posts, but I don't see their IP.  What is wrong again? Thanks..
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Pedro
This post was updated on .
Is every thing ok here?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
No, Pedro, I don't see the IP of my users. What do you think about? Thanks..
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

Silvana
In reply to this post by Pedro
Can you look at my macro?
I'm Italian. Excuse me if I'll make mistakes writing my posts. Ciao
This is my site: "La chiave nel pozzo"..
..and this is my forum: "La chiave nel pozzo - il forum"
Reply | Threaded
Open this post in threaded view
|

Re: Delete banned users

juanete
Hi Silvana, Are you sure you do not see?

Look under e-mail, behind the date and time of the collection of IP. In the picture is where xxx.xxx.xx.xx:



Hi Pedro, advantage that you are here, can you check the code that I have posted and if it is well done?. It works for me, but if you have any suggestions to improve it, I'd appreciate.

I have not mastered well Naml

Thank
“El software libre construye una sociedad mejor“
"Free software builds a better society"
— Richard Stallman
123