Or you could use and or keep working on this [
attachment=42477]
As I assume you already have the css styled for your snippet the rest should work fine for this plug and i dont have your css or your stats plug, just added your provuded snippet on how it could be done in a basic plug for guests on index and portal. It is localized but I only provided english initial lang files. Best of luck.
inc/plugins/anonshare_welcomeguest.php
<?php
/*
* MyBB: AnonShare Welcome Guest
*
* File: anonshare_welcomeguest.php
*
* Author: Vintagedaddyo
*
* MyBB Version: 1.8
*
* Plugin Version: 1.0
*
*
*/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook('index_start','anonshare_welcomeguest');
$plugins->add_hook('portal_start','anonshare_welcomeguest');
function anonshare_welcomeguest_info()
{
global $lang;
$lang->load("anonshare_welcomeguest");
$lang->anonshare_welcomeguest_Desc = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="float:right;">' .
'<input type="hidden" name="cmd" value="_s-xclick">' .
'<input type="hidden" name="hosted_button_id" value="AZE6ZNZPBPVUL">' .
'<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">' .
'<img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">' .
'</form>' . $lang->anonshare_welcomeguest_Desc;
return Array(
'name' => $lang->anonshare_welcomeguest_Name,
'description' => $lang->anonshare_welcomeguest_Desc,
'website' => $lang->anonshare_welcomeguest_Web,
'author' => $lang->anonshare_welcomeguest_Auth,
'authorsite' => $lang->anonshare_welcomeguest_AuthSite,
'version' => $lang->anonshare_welcomeguest_Ver,
'compatibility' => $lang->anonshare_welcomeguest_Compat
);
}
function anonshare_welcomeguest_activate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('index','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('portal','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('index','#'.preg_quote('{$forums}').'#i','{$anonshare_welcomeguest}
{$forums}');
find_replace_templatesets('portal','#'.preg_quote('{$announcements}').'#i','{$anonshare_welcomeguest}
{$announcements}');
}
function anonshare_welcomeguest_deactivate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('index','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('portal','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
}
function anonshare_welcomeguest_lang()
{
global $lang;
$lang->load("anonshare_welcomeguest");
}
function anonshare_welcomeguest()
{
global $mybb;
if($mybb->user['usergroup']==1)
{
global $theme,$lang,$anonshare_welcomeguest;
anonshare_welcomeguest_lang();
$anonshare_welcomeguest='<div class="table-wrap">
<div class="table-cell-mid">
<h1 class="white">'.$lang->anonshare_welcomeguest_hello.'</h1>
'.$lang->anonshare_welcomeguest_create.'
<ul>
<li>'.$lang->anonshare_welcomeguest_discuss.' <span class="white">'.$stats['numusers'].'</span>'.$lang->anonshare_welcomeguest_othermembers.'<span class="white">'.$stats['numthreads'].'</span>'.$lang->anonshare_welcomeguest_topics.'</li>
<li>'.$lang->anonshare_welcomeguest_browse.' <span class="white">'.$stats['numposts'].'</span>'.$lang->anonshare_welcomeguest_posts.'</li>
</ul>
</div>
<div class="table-cell-mid guest-notice-button-col">
<a href="member.php?action=register">
<button class="guest-notice-button-register">
<link class="rippleJS">
'.$lang->anonshare_welcomeguest_createacct.'
</button>
</a>
<div class="spacer-bottom-10"></div>
<a href="member.php">
<button class="guest-notice-button">
<link class="rippleJS">
'.$lang->anonshare_welcomeguest_loginacct.'
</button>
</a>
</div>
</div>';
}
}
?>
inc/languages/english/anonshare_welcomeguest.lang.php
<?php
/*
* MyBB: AnonShare Welcome Guest
*
* File: anonshare_welcomeguest.lang.php
*
* Author: Vintagedaddyo
*
* MyBB Version: 1.8
*
* Plugin Version: 1.0
*
*/
// anonshare_welcomeguest_lang_setting
$l['anonshare_welcomeguest_hello']='Welcome to Anonshare!';
$l['anonshare_welcomeguest_create']='Create a free account today and:';
$l['anonshare_welcomeguest_discuss']='Discuss with: ';
$l['anonshare_welcomeguest_othermembers']='other members in: ';
$l['anonshare_welcomeguest_topics']=' topics.';
$l['anonshare_welcomeguest_browse']='Browse through: ';
$l['anonshare_welcomeguest_posts']=' posts.';
$l['anonshare_welcomeguest_createacct']='Create an account';
$l['anonshare_welcomeguest_loginacct']='Login to account';
?>
inc/languages/engish/admin/anonshare_welcomeguest.lang.php
<?php
/*
* MyBB: AnonShare Welcome Guest
*
* File: anonshare_welcomeguest.lang.php
*
* Author: Vintagedaddyo
*
* MyBB Version: 1.8
*
* Plugin Version: 1.0
*
*/
// anonshare_welcomeguest_plugin_info
$l['anonshare_welcomeguest_Name'] = 'AnonShare Welcome Guest';
$l['anonshare_welcomeguest_Desc'] = 'Shows a welcome box to AnonShare guests on index and portal page.';
$l['anonshare_welcomeguest_Web'] = 'http://community.mybb.com/user-6029.html';
$l['anonshare_welcomeguest_Auth'] = 'Vintagedaddyo';
$l['anonshare_welcomeguest_AuthSite'] = 'http://community.mybb.com/user-6029.html';
$l['anonshare_welcomeguest_Ver'] = '1.0';
$l['anonshare_welcomeguest_GUID'] = '';
$l['anonshare_welcomeguest_Compat'] = '18*';
?>
* I mean I could have injected a stylesheet but I don't have your css that goes with the snippet you provided and my time is limited. And since you are only using the one theme I figured you would just include whatever corresponding css in that theme.
Ideally thus eas provided as a starting point for you to modify to your desires. Anyhoo, just a basic example of a minor modify using existing theme for example sake:
All this basic modify example does is comment out top guest buttons here:
header_welcomeblock_guest
<!--
<span style="color:white;"><strong>Not a member yet? Why not Sign up today </strong></span>
<br />
<a class="button login" href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;"><font color="white"><i style="font-size: 16px;" class="fa fa-check-circle-o fa-fw"></i> Login to account</font></a>
<a class="button2 register" href="{$mybb->settings['bburl']}/member.php?action=register"><font color="white"><i style="font-size: 16px;" class="fa fa-plus-circle fa-fw"></i> Create an account </font></a>
-->
Then a quick little modify of 2 plugin files:
inc/plugins/anonshare_welcomeguest.php
<?php
/*
* MyBB: AnonShare Welcome Guest
*
* File: anonshare_welcomeguest.php
*
* Author: Vintagedaddyo
*
* MyBB Version: 1.8
*
* Plugin Version: 1.0
*
*
*/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook('index_start','anonshare_welcomeguest');
$plugins->add_hook('portal_start','anonshare_welcomeguest');
function anonshare_welcomeguest_info()
{
global $lang;
$lang->load("anonshare_welcomeguest");
$lang->anonshare_welcomeguest_Desc = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="float:right;">' .
'<input type="hidden" name="cmd" value="_s-xclick">' .
'<input type="hidden" name="hosted_button_id" value="AZE6ZNZPBPVUL">' .
'<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">' .
'<img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">' .
'</form>' . $lang->anonshare_welcomeguest_Desc;
return Array(
'name' => $lang->anonshare_welcomeguest_Name,
'description' => $lang->anonshare_welcomeguest_Desc,
'website' => $lang->anonshare_welcomeguest_Web,
'author' => $lang->anonshare_welcomeguest_Auth,
'authorsite' => $lang->anonshare_welcomeguest_AuthSite,
'version' => $lang->anonshare_welcomeguest_Ver,
'compatibility' => $lang->anonshare_welcomeguest_Compat
);
}
function anonshare_welcomeguest_activate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('index','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('portal','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('index','#'.preg_quote('{$forums}').'#i','{$anonshare_welcomeguest}
{$forums}');
find_replace_templatesets('portal','#'.preg_quote('{$announcements}').'#i','{$anonshare_welcomeguest}
{$announcements}');
}
function anonshare_welcomeguest_deactivate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('index','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
find_replace_templatesets('portal','#'.preg_quote('{$anonshare_welcomeguest}
').'#i','',0);
}
function anonshare_welcomeguest_lang()
{
global $lang;
$lang->load("anonshare_welcomeguest");
}
function anonshare_welcomeguest()
{
global $mybb;
if($mybb->user['usergroup']==1)
{
global $theme,$lang,$anonshare_welcomeguest;
anonshare_welcomeguest_lang();
$anonshare_welcomeguest='<table border="0" cellspacing="'.$theme['borderwidth'].'" cellpadding="'.$theme['tablespace'].'" class="tborder">
<thead>
<tr>
<td class="thead">
<strong>'.$lang->anonshare_welcomeguest_hello.'</strong>
</td>
</tr>
</thead>
<tbody>
<tr>
<td class="trow1">
<div class="float_left"><span style="color: #ffffff; font-size: 14px;"><strong><h1>'.$lang->anonshare_welcomeguest_shout.'</h1>
'.$lang->anonshare_welcomeguest_create.'
<ul>
<li>'.$lang->anonshare_welcomeguest_discuss.' '.$stats['numusers'].''.$lang->anonshare_welcomeguest_othermembers.''.$stats['numthreads'].''.$lang->anonshare_welcomeguest_topics.'</li>
<li>'.$lang->anonshare_welcomeguest_browse.''.$stats['numposts'].''.$lang->anonshare_welcomeguest_posts.'</li>
</ul>
</strong>
</span>
</div>
<br />
<div class="float_right">
<span style="color:#ffffff;"><strong>'.$lang->anonshare_welcomeguest_question.' </strong></span>
<br />
<a class="button2 register" href="'.$mybb->settings['bburl'].'/member.php?action=register"><font color="white"><i style="font-size: 16px;" class="fa fa-plus-circle fa-fw"></i>
'.$lang->anonshare_welcomeguest_createacct.'
</font>
</a>
<a class="button login" href="'.$mybb->settings['bburl'].'/member.php?action=login"onclick="$(\'#quick_login\').modal({ fadeDuration: 250, keepelement: true }); return false;"><font color="white"><i style="font-size: 16px;" class="fa fa-check-circle-o fa-fw"></i> '.$lang->anonshare_welcomeguest_loginacct.'</font>
</a>
</div>
<br />
</td>
</tr>
</tbody>
</table>
<br />';
}
}
?>
inc/languages/english/anonshare_welcomeguest.lang.php
<?php
/*
* MyBB: AnonShare Welcome Guest
*
* File: anonshare_welcomeguest.lang.php
*
* Author: Vintagedaddyo
*
* MyBB Version: 1.8
*
* Plugin Version: 1.0
*
*/
// anonshare_welcomeguest_lang_setting
$l['anonshare_welcomeguest_hello']='Welcome to Anonshare!';
$l['anonshare_welcomeguest_shout']='Greetings, Guest...';
$l['anonshare_welcomeguest_create']='Create a free account today and:';
$l['anonshare_welcomeguest_discuss']='Discuss with: ';
$l['anonshare_welcomeguest_othermembers']='other members in: ';
$l['anonshare_welcomeguest_topics']=' topics.';
$l['anonshare_welcomeguest_browse']='Browse through: ';
$l['anonshare_welcomeguest_posts']=' posts.';
$l['anonshare_welcomeguest_createacct']='Create an account';
$l['anonshare_welcomeguest_loginacct']='Login to account';
$l['anonshare_welcomeguest_question']='Not a member yet? Why not Sign up today';
?>
Again this is just to show you that by using what I provided as a base starting point you can modify it to your own desired usages whether simple or complicated.
Like then going on to put a bg image
Tweak fonts, tweak font sizing and expand on it, maybe expand the message, and say expand upon further with say other things you want to add like whatever you are planning with stats calls and whatever else. Hopefully this just got your creative process heading somewgere with it.