The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Tapatalk Conditional Use Based on Usergroup
It seems that Tapatalk removed the AdminCP function of restricting its use to specific usergroups a few revs ago. My co-admin just did an update, and now anybody is able to login via Tapatalk (which we do NOT want
ONLY our paid members).
How and where can I put an "if" condition that allows logging-in via Tapatalk ONLY if the member is in a specific (42) usergroup? Ideally, I would like the fault message to say "At this time, Tapatalk use is only available for paid members. Please see our home page for information on how to become a paid member." vBulletin version 4.2.3 PHP version 5.4.45 MySQL version 5.6.28 Thanks! |
#2
|
|||
|
|||
I downloaded Tapatalk v5.5.2 from May (2015), and I oddly enough can't find this usergroup limitation feature. Are you sure it was there? I remember something similar, but now I'm not too sure.
|
#3
|
|||
|
|||
Quote:
We restrict use of Tapatalk since it bypasses forum permissions on things like signature lines (we have a number of commercial members that would like to "advertise" their businesses in their signature lines for free). Also, Tapatalk users automatically bypass our banner advertisers, so that reduces our "appeal" to banner advertisers since any forum user using Tapatalk complete bypasses any paid advertising via banner advertisement (paid member or not). On top of that, Tapatalk users do not see our marquee messages (usually focused on important matters pertaining to the organization) and vBulletin "notices", as well. The impact of allowing "anyone" to log-into our forums via Tapatalk is huge due to these issues. Up until this point, we restricted it to ONLY paid members?but since this change/update?ANYBODY using Tapatalk can bypass these things, which has a huge financial impact on the organization providing the forums. If we cannot identify a way to reinstate the usage limitations to ONLY paid members, we will be forced to uninstall Tapatalk. Since I really don't want to do that, I am simply looking for a place to put some conditional code to assure that ONLY paid members (usergroup 42) are allowed to use Tapatalk. |
#4
|
|||
|
|||
Have you checked the file "\mobiquo\config\config.php"? It has a setting called "allowed_usergroup".
|
#5
|
|||
|
|||
Yes?it did nothing (although I did confirm that Tapatalk "looks at" this file by creating syntax errors which stops ANY login). However, proper syntax (specifying specific usergroups) does not do anything.
|
#6
|
|||
|
|||
Seeing the config files are clearly being ignored (I've disabled guest mode in it, not being used at all).. I took a little peak at the conf_init.php file. allowed_usergroup is not being used in it, but I assume a IF / ELSE can be used with:
Code:
$config['allowed_usergroup'] == xx I think it's important that one or more of these codes: Code:
defined('IN_MOBIQUO') or exit; class mobiquo_config function get_config() global $vbulletin; $config = array(); $mobiquo_config = $config; return $mobiquo_config; EDIT I've altered the conf_init.php file to set open forum to 0, and it took effect right away in the tapatalk app. As such, get the proper if / else statement in combination with: Code:
$config['allowed_usergroup'] EDIT 2 config.php (in mobiquo) is not being ignored, it's tied up with conf_init.php and I already got some working code already! (newbie code though!) For example, I used allowed_usergroup in combination with open forums mode allowed yes or no.. Open up config.php and edit the line: Code:
'allowed_usergroup' => '42', Code:
if ($config['allowed_usergroup'] == 42){ $config['is_open'] = 1; } else { $config['is_open'] = 0; } This code is not 100% though! It still shows all the sections that are usually allowed for everyone to see, however! Every section will show "no topics" for those are are not in usergroup 42. Most likely best to combine the allowed_usergroup with hide_forum_id. You can use every single code shown in config.php to use as a if/else statement in conf_init.php. With an advanced/expert php coder, you'll get what you want in no time. My 'code' so to speak merely helps you out a little bit. EDIT 3: I have the feeling that allowed_usergroup only applies and works on default vB usergroups. For some reason it doesn't work on custom groups (for me), while it works for eg, registered group, etc. |
2 благодарности(ей) от: | ||
Kane@airrifle, MarkFL |
#7
|
|||
|
|||
Quote:
I tried it, but as I suspected, it appears that the actual vbulletin usergroup is never being referenced, rather, it is simply looking to the config.php file and evaluating a match or mismatch of the allowed_usergroup line. In other words, you could put: Code:
'allowed_usergroup' => '999999', What is missing is an actual vbulletin database query to lookup the sign-in member's usergroup. |
#8
|
|||
|
|||
You could try something like:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|