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.

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

View previous topic View next topic Go down

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

Post by gunsmaker on 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

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

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

Post by _Twisted_Mods_ on 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_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

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

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

@_Twisted_Mods_ , ok i can wait.

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

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

Post by _Twisted_Mods_ on 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_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

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

Post by gunsmaker on 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.

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

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

Post by brandon_g on 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


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5355
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

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

Post by gunsmaker on 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.

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

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

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

sorry but this is a bump

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

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

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

bump

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

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