2012-01-12, 10:23 PM
Pages: 1 2
2012-01-12, 10:30 PM
What games are you referring to? If it is a plugin you need to sat who made it, and the name of the plugin so everyone can help you even more.
If your referring to forum games (like games within a forum) then you'll just need to find a plugin, or make a user be automatically promoted to a new usergroup to then be allowed access to the forum where the games are located at.
If your referring to forum games (like games within a forum) then you'll just need to find a plugin, or make a user be automatically promoted to a new usergroup to then be allowed access to the forum where the games are located at.
2012-01-12, 10:36 PM
The Plugin that you can download for MyBB Forums, http://w3.gamesection.org/wiki/Downloads
2012-01-12, 10:50 PM
Yes, but not in a pretty way.
Make use of the group promotions system, to move members to group X when they have Y amount of posts.
Install the templates conditionals plugin, and use this in the templates,
This will make games visible only to admins, super moderators, moderators and members with Y amount of posts, where 9 is the group ID.
---
Edit: Or maybe this is simpler,
^ Not sure what you'd use to be exact, someone else will know.
Make use of the group promotions system, to move members to group X when they have Y amount of posts.
Install the templates conditionals plugin, and use this in the templates,
<if in_array($GLOBALS['mybb']->user['usergroup'], array(3,4,6,9)) then>
---game section template---
</if>
This will make games visible only to admins, super moderators, moderators and members with Y amount of posts, where 9 is the group ID.
---
Edit: Or maybe this is simpler,
<if in_array($GLOBALS['mybb']->user['postnum'] <not sure what goes here> then>
^ Not sure what you'd use to be exact, someone else will know.
2012-01-12, 10:52 PM
Where you have put ---game section template--- what do I put in there?
2012-01-12, 10:54 PM
That just represents the template for game section in global templates.
2012-01-12, 10:56 PM
OK thanks but where do I put the code?
2012-01-12, 10:56 PM
Post the game section template here.
2012-01-12, 10:59 PM
I'm not sure which one your refering to I think it's this one
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->gamesection}</title>
{$headerinclude}
{$rating_stylesheet}
<style type="text/css">
.tournaments a:link, .tournaments a:visited, .tournaments a:hover, .tournaments a:active
{
color: #000000;
}
</style>
<script type="text/javascript" src="jscripts/games_rating.js?ver=120"></script>
<script type="text/javascript">
<!--
lang.stars = new Array();
lang.stars[1] = "{$lang->one_star}";
lang.stars[2] = "{$lang->two_stars}";
lang.stars[3] = "{$lang->three_stars}";
lang.stars[4] = "{$lang->four_stars}";
lang.stars[5] = "{$lang->five_stars}";
// -->
</script>
</head>
<body>
{$header}
{$games_menu}
{$stats}
{$categories_bar}
{$tournaments_bar}
{$search_bar}
{$multipages}
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="4" class="thead"><strong>{$lang->gamesection}</strong></td>
</tr>
<tr>
<td class="tcat" width="175" align="center"><strong>{$lang->name}</strong></td>
<td class="tcat" align="center"><strong>{$lang->description}</strong></td>
<td class="tcat" width="250" align="center"><strong>{$lang->menu}</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->champion}</strong></td>
</tr>
{$games_bit}
</table>
{$multipages}
{$online}
{$games_footer}
{$footer}
</body>
</html>
2012-01-12, 11:04 PM
{$games_menu}
{$stats}
{$categories_bar}
{$tournaments_bar}
{$search_bar}
{$multipages}
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="4" class="thead"><strong>{$lang->gamesection}</strong></td>
</tr>
<tr>
<td class="tcat" width="175" align="center"><strong>{$lang->name}</strong></td>
<td class="tcat" align="center"><strong>{$lang->description}</strong></td>
<td class="tcat" width="250" align="center"><strong>{$lang->menu}</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->champion}</strong></td>
</tr>
{$games_bit}
replace with,
<if in_array($GLOBALS['mybb']->user['usergroup'], array(3,4,6,9)) then>
{$games_menu}
{$stats}
{$categories_bar}
{$tournaments_bar}
{$search_bar}
{$multipages}
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="4" class="thead"><strong>{$lang->gamesection}</strong></td>
</tr>
<tr>
<td class="tcat" width="175" align="center"><strong>{$lang->name}</strong></td>
<td class="tcat" align="center"><strong>{$lang->description}</strong></td>
<td class="tcat" width="250" align="center"><strong>{$lang->menu}</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->champion}</strong></td>
</tr>
{$games_bit}</if>
Remember to replace the 9 with whatever the group ID is.
You can also use another if statement to display a message to those with less than 10 posts,
<if in_array($GLOBALS['mybb']->user['usergroup'], array(2)) then>
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead"><span class="smalltext"><strong>Error</strong></span></td>
</tr>
<tr>
<td class="trow1">
You need 10 posts to play games.
</table></if>
Pages: 1 2