The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Only members on a specific region are able to see the specific forum

3 posters

Go down

Only members on a specific region are able to see the specific forum Empty Only members on a specific region are able to see the specific forum

Post by gunsmaker February 27th 2015, 5:11 am

is it possible to only members on a specific region are able to see the specific forum? example : only USA members are able to see forum number /f7-.
like in the forumotion ACP options that only specific gorup members are able to see that specific forum. but i want based on region, only USA and/or other region.

since i saw the thread about region block that only USA peoples are able to register (i forgot to bookmark it xD). and i think its possible but idk how, i'm blind on this kind of things, so i decided to ask it here. xD
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by _Twisted_Mods_ February 27th 2015, 8:39 am

yea u seen it on my forum give me a day or two and ill try to write you something
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2106
Reputation : 333
Language : English
Location : Ms

View user profile http://liquidcode.forumotion.com

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by gunsmaker February 27th 2015, 12:00 pm

@_Twisted_Mods_ , ok i can wait.
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by _Twisted_Mods_ March 2nd 2015, 4:49 pm

ok goto acp>modules>javascript management

create a new script

Title:your choice
placement: homepage

copy the code below

Code:
    $(function(){
        $.getJSON('http://ip-api.com/json', function(data) {
            var   ignorelist = '#Help With Other Scripts #Help With Css';
            var   locforums = ['US:Script Testing','IT:Css For Scripts'];
    var x = data.countryCode;
               $('li.row').each(function(){
                  if(ignorelist.match('#'+$(this).find('.forumtitle').text())){}
                     else{
                        $(this).attr('style','display:none');};
            for(var i=0;i<locforums.length;i++){
               var g = locforums[i].split(':');
               if(x == g[0]){$('li.row:contains('+g[1]+')').attr('style','');   
               };};});});});

Things You Need to Change

Code:
ignorelist 
this is a list of forums the script will ignore meaning they will show no matter what country your from.. just use the title of the forum with a hashtag at the beginning

example


Code:
ignorelist = '#title1 #title2 #title3'



next is
Code:
locforums

this is a list of forums and country codes
US = united states

each forum you want to show for the country should be setup like this

'countrycode:forum title'

and for each one separated with a comma

example

Code:
locforums  = ['US:forum title1','MA:forum title2','NL:Forum title3']


after your done with the settings save
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2106
Reputation : 333
Language : English
Location : Ms

View user profile http://liquidcode.forumotion.com

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by gunsmaker March 2nd 2015, 6:24 pm

@_Twisted_Mods_ , nice, but member from the other region still can see the topics inside the hidden forum (they cant see the hidden forum tho).
if the topics inside the hidden forum can be hide too, it will be better.
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by brandon_g March 2nd 2015, 8:51 pm

Hello,
That is a simple permission problem.

Go into the section in the acp and click on permissions. You will see little tick box(s) that say 'Can read the topics' un tick this for members and set only the groups you want to see it and save.

Hope this helps,
-Brandon


Only members on a specific region are able to see the specific forum Brando10
Remember to mark your topic Only members on a specific region are able to see the specific forum Solved15 when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

Only members on a specific region are able to see the specific forum Scre1476
Team Leader
Review Section Rules | Request A Review | Sticker Points
brandon_g
brandon_g
Manager
Manager

Male Posts : 9896
Reputation : 906
Language : English
Location : USA

View user profile https://www.broadcastingduo.com

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by gunsmaker March 3rd 2015, 4:35 am

brandon_g wrote:Hello,
That is a simple permission problem.

Go into the section in the acp and click on permissions. You will see little tick box(s) that say 'Can read the topics' un tick this for members and set only the groups you want to see it and save.

Hope this helps,
-Brandon

@brandon_g , i want all the usergroups BUT FROM SPECIFIC REGION can only see the selected forum and all topics inside the selected forum. the ACP only set the permission from usergroups only but not the region.
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by gunsmaker March 6th 2015, 11:06 am

sorry but this is a bump
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Only members on a specific region are able to see the specific forum Empty Re: Only members on a specific region are able to see the specific forum

Post by gunsmaker March 9th 2015, 8:46 am

bump
avatar
gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

View user profile http://tcga.forumn.org

Back to top Go down

Back to top

- Similar topics

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