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 Wed Feb 17, 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.

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Draxion on Wed Feb 17, 2016 6:14 pm

Hi, there

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

Draxion
Forumember

Posts : 361
Reputation : 48
Language : English

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by YoshiGM on Wed Feb 17, 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

YoshiGM
Forumember

Male Posts : 512
Reputation : 76
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 17, 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/

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by YoshiGM on Wed Feb 17, 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


YoshiGM
Forumember

Male Posts : 512
Reputation : 76
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 17, 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

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 17, 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

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Fri Feb 19, 2016 11:26 am

¿¿

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Sat Feb 20, 2016 11:12 pm

??

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by Python on Sat Feb 20, 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 Genesis on Sat Feb 20, 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>');
        }
    });

Genesis
Forum Reviewer
Forum Reviewer

Male Posts : 2331
Reputation : 322
Language : English
Location : Forumountain

http://forumpromocean.com

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 24, 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

hamesashek
Forumember

Male Posts : 71
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 Wed Feb 24, 2016 2:31 pm

Hello,
This code is for punbb forum version.


Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 24, 2016 3:03 pm


hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Wed Feb 24, 2016 11:43 pm

¿¿

hamesashek
Forumember

Male Posts : 71
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 Thu Feb 25, 2016 1:55 am


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

brandon_g
Support Moderator
Support Moderator

Male Posts : 5140
Reputation : 478
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Tue Mar 08, 2016 12:28 am

does not work Shrug

hamesashek
Forumember

Male Posts : 71
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 Tue Mar 08, 2016 1:39 am


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?

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Tue Mar 08, 2016 12:15 pm

@Van-Helsing 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

hamesashek
Forumember

Male Posts : 71
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 Tue Mar 08, 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';

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Tue Mar 08, 2016 4:59 pm

does not work Shrug

hamesashek
Forumember

Male Posts : 71
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 Tue Mar 08, 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?

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Tue Mar 08, 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>');
        }
    });

hamesashek
Forumember

Male Posts : 71
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 Tue Mar 08, 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.

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by hamesashek on Tue Mar 08, 2016 10:51 pm

Thank you to the solution has been successfully

hamesashek
Forumember

Male Posts : 71
Reputation : 1
Language : hamesashek

http://bestk.forumegypt.net

Back to top Go down

Solved Re: How to make "Forum Protected"

Post by SLGray on Tue Mar 08, 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.


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://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