The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How to make "Forum Protected"

View previous topic View next topic Go down

Solved How to make "Forum Protected"

Post by hamesashek on February 17th 2016, 5:59 pm

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome
Screenshot of problem : http://i.imgur.com/bZRWyPu.png
Who the problem concerns : Yourself
When the problem appeared : a week
Forum link : http://bestk.forumegypt.net/login

Description of problem

how to make "forum protected" for not registered members or for members with no rights.
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Draxion on February 17th 2016, 6:14 pm

Hi, there

"Protected" is too general. Can you clarify by what you are trying to do? Thanks!


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1713
Reputation : 223
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by YoshiGM on February 17th 2016, 6:29 pm

Hi,
I think you want to create a private forum with only access to determinate members. You can do that reading this FAQ: http://help.forumotion.com/t138466-permissions#937548

If this not that you want, please explain more Wink
avatar
YoshiGM
Forumember

Male Posts : 655
Reputation : 91
Language : Spanish, English & Italian (16%)
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 17th 2016, 6:38 pm

how to make "forum protected" for not registered members or for members with no rights.

http://i84.servimg.com/u/f84/19/42/21/09/ashamp10.png

Such as that forum
http://socialacademy.forums.fm/
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by YoshiGM on February 17th 2016, 7:05 pm

Try using then this Javascript. It was created by my good friend Sr.Smith, the Manager of the spanish support forum hehe..


Code:
    (function() {$(function() {
            /*** EDITABLE AREA ***/
            var mensage = "Forum Protected";
            /**** END OF EDITABLE AREA ***/

            $('dd.lastpost a[href^="/t"]:first-child:not(last-post-icon)').each(function() {
                var $this = $(this);
                var urlpost = $(this).attr('href');
                var $lastpost = $(this).closest('dd.lastpost');
                $.ajax({
                    url: urlpost,
                    type: 'GET',
                    dataType: 'html',
                    success: function(phtml) {
                        if (!$(phtml).find('div.post').length) {
                            $this.replaceWith('<span class="private-message">' + mensage + '</span>');
                            $lastpost.find('.last-post-icon').remove();
                        }
                    }
                });
            });
    })})();

In the EDITABLE AREA, you can edit the text that is in the latest topic in var mensage.

The text will be displayed if you have activated permits viewing the forum but not read.
I hope this is are you looking for. Wink

avatar
YoshiGM
Forumember

Male Posts : 655
Reputation : 91
Language : Spanish, English & Italian (16%)
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 17th 2016, 7:12 pm

That's what I look for, but does not work ..
Possible describes a method developed
And also how to put the title to be concealed Category
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 17th 2016, 7:15 pm

$('dd.lastpost a[href^="/t"]:first-child:not(last-post-icon)').each(function() {

Are Here are edited it
Here lay the category that is hidden link
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 19th 2016, 11:26 am

¿¿
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 20th 2016, 11:12 pm

??
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Python on February 20th 2016, 11:22 pm

You can use only password protected forum..Confused

http://help.forumotion.com/t76762-create-password-protected-forum

Python
Forumember

Male Posts : 31
Reputation : 5
Language : English

http://punbb.biz

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Vanityy on February 20th 2016, 11:23 pm

Code:
$(function () {
        if (_userdata["session_logged_in"] == 0) {
            var ForumName = 'Name of forum';
            var Message = 'Forum Protected!';
            $('.pun .main-content .statused tr:contains("' + ForumName + '") td.tcr').html('<b>' + Message + '</b>');
        }
    });
avatar
Vanityy
Helper
Helper

Male Posts : 2336
Reputation : 323
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 24th 2016, 1:30 pm

Forumedic wrote:
Code:
$(function () {
        if (_userdata["session_logged_in"] == 0) {
            var ForumName = 'Name of forum';
            var Message = 'Forum Protected!';
            $('.pun .main-content .statused tr:contains("' + ForumName + '") td.tcr').html('<b>' + Message + '</b>');
        }
    });


does not work Shrug
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Van-Helsing on February 24th 2016, 2:31 pm

Hello,
This code is for punbb forum version.

avatar
Van-Helsing
Hyperactive

Male Posts : 2307
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 24th 2016, 3:03 pm

avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on February 24th 2016, 11:43 pm

¿¿
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by brandon_g on February 25th 2016, 1:55 am

hamesashek wrote:

hamesashek wrote:¿¿


Please don't double post. Your post needs to be separated by at least 24 hours before bumping. Please use the edit button instead! ~ brandon_g


Remember to mark your topic when a solution is found.
avatar
brandon_g
Support Moderator
Support Moderator

Male Posts : 5942
Reputation : 547
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on March 8th 2016, 12:28 am

does not work Shrug
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Van-Helsing on March 8th 2016, 1:39 am

hamesashek wrote:

Hello,
I have confused as you said your forum version is phpbb3 and now I visited your forum now and it is punbb.
For which version do you need the code?
avatar
Van-Helsing
Hyperactive

Male Posts : 2307
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on March 8th 2016, 12:15 pm

Van-Helsing wrote:
hamesashek wrote:

Hello,
I have confused as you said your forum version is phpbb3 and now I visited your forum now and it is punbb.
For which version do you need the code?
So it did not work on this version
punbb
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Van-Helsing on March 8th 2016, 3:38 pm

Hello,
The code for punbb is here you must substitute the variable's value var ForumName with your forum's name which you want. Example:

Code:
var ForumName = 'Tips and Tricks';
avatar
Van-Helsing
Hyperactive

Male Posts : 2307
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on March 8th 2016, 4:59 pm

does not work Shrug
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Van-Helsing on March 8th 2016, 5:21 pm

Hello,
I can see only one category on your board index. Can you post the forum url which you are trying the code?
avatar
Van-Helsing
Hyperactive

Male Posts : 2307
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on March 8th 2016, 10:29 pm

Link Forum


This is a Link Forum ...!
An example of the development of the code

Code:

$(function () {
        if (_userdata["session_logged_in"] == 0) {
            var ForumName = '/f1';
            var Message = 'Forum Protected!';
            $('.pun .main-content .statused tr:contains("' + ForumName + '") td.tcr').html('<b>' + Message + '</b>');
        }
    });
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Van-Helsing on March 8th 2016, 10:37 pm

Hello,
You must not use the forum link(/f1) in the variable ForumName but you must write the forum name as I explain previously etc. 'Staff Forum';

Code:

$(function () {
        if (_userdata["session_logged_in"] == 0) {
            var ForumName = 'المنتدى الأول';
            var Message = 'Forum Protected!';
            $('.pun .main-content .statused tr:contains("' + ForumName + '") td.tcr').html('<b>' + Message + '</b>');
        }
    });

I am not sure if I wrote correct the arabic name because I dont know this language Sad but you can correct it. This code is for forum with id /f1-montada try to test it.
avatar
Van-Helsing
Hyperactive

Male Posts : 2307
Reputation : 90
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on March 8th 2016, 10:51 pm

Thank you to the solution has been successfully
avatar
hamesashek
Forumember

Male Posts : 103
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by SLGray on March 8th 2016, 10:53 pm

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 40203
Reputation : 2716
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum