Newbie Spellweaver
- Joined
- Mar 2, 2007
- Messages
- 70
- Reaction score
- 38
Just looking for some feedback
Attachments
You must be registered for see attachments list
Last edited:
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Just looking for some feedback
Do you have an online demo? I would to provide some feedback on the total project.
Maybe I'll look into using Discourse for another project that I have in mind!Consider using Discourse instead of MyBB. MyBB has been notorious for sql injections over the years and hardly follows any best practices.
<?php
/**
* MyBB 1.8
*
* Showteam avatar
*
*/// Make sure we can't access this file directly from the browser.
if(!defined('IN_MYBB'))
{
die('This file cannot be accessed directly.');
}$plugins->add_hook('showteam_start', 'showteam_avatar');function showteamavatar_info()
{
/**
* Array of information about the plugin.
* name: The name of the plugin
* description: Description of what the plugin does
* website: The website the plugin is maintained at (Optional)
* author: The name of the author of the plugin
* authorsite: The URL to the website of the author (Optional)
* version: The version number of the plugin
* compatibility: A CSV list of MyBB versions supported. Ex, '121,123', '12*'. Wildcards supported.
* codename: An unique code name to be used by updated from the official MyBB Mods community.
*/
return array(
'name' => 'Show Team Avatar',
'description' => '',
'website' => '',
'author' => 'd',
'authorsite' => '',
'version' => '1.0',
'compatibility' => '18*',
'codename' => 'showteamavatar'
);
}/*
* _activate():
* Called whenever a plugin is activated via the Admin CP. This should essentially make a plugin
* 'visible' by adding templates/template changes, language changes etc.
*/
function showteamavatar_activate()
{
// Include this file because it is where find_replace_templatesets is defined
require_once MYBB_ROOT . '/inc/adminfunctions_templates.php'; // Edit the showteam template and add our variable to below {$bgcolors}
find_replace_templatesets('showteam_usergroup_user', '#'.preg_quote('<tr class="{$bgcolor}">').'#', '<tr class="{$bgcolor}">\n<td>{$showteam_avatar}</td>');
}/*
* _deactivate():
* Called whenever a plugin is deactivated. This should essentially 'hide' the plugin from view
* by removing templates/template changes etc. It should not, however, remove any information
* such as tables, fields etc - that should be handled by an _uninstall routine. When a plugin is
* uninstalled, this routine will also be called before _uninstall() if the plugin is active.
*/
function showteamavatar_deactivate()
{
// Include this file because it is where find_replace_templatesets is defined
require_once MYBB_ROOT.'inc/adminfunctions_templates.php'; // Remove template edits
find_replace_templatesets('showteam_usergroup_user', '#'.preg_quote('<td>{$showteam_avatar}</td>').'#', '');
}/*
* Displays user's avatar
*/
function showteam_avatar()
{
global $templates, $showteam_avatar;
eval("\$showteam_avatar = \"".$templates->get("postbit_avatar")."\";");
}?>
body {
background-color: #525D63;
text-align: left;
font: 10px Verdana, Arial, Helvetica, sans-serif;
}
body,
h1, h2, h3, h4, h5, h6,
p,
div#status_container ul,
header nav ul,
div#container div#nav ul {
margin: 0;
}
body,
header section h1 a,
header div#status_block p.status_desc a,
header nav ul li a#nav_active,
div#container div#nav ul li a,
.blocker .modal table tbody tr td button {
color: #000;
}
a {
color: #D75C03;
text-decoration: underline;
}
select,
input.textbox,
button,
a.button,
input.checkbox,
textarea {
font-family: inherit;
font-size: inherit;
outline: 0;
}
select,
input.textbox,
button,
a.button,
input.checkbox,
textarea,
div#outer_container,
div#outer_container div#container,
div#status_container ul li div.status_box,
header div#status_block p.status_desc a {
border: 1px solid #000;
}
select,
textarea {
padding: 3px;
}
select,
input.textbox,
input.checkbox,
textarea {
background: #FFF;
}
input.textbox {
padding: 4px;
}
input.error, textarea.error, select.error {
border: 1px solid #A5161A;
color: #A5161A;
}
input.valid, textarea.valid, select.valid {
border: 1px solid #508F54;
}
label.error {
color: #A5161A;
margin: 6px;
padding: 0;
display: block;
}
input.textbox.portal_search {
width: 68%;
}
button,
a.button {
background: #1373A9;
padding: 3px 0 3px 10px;
cursor: pointer;
}
button,
a.button,
button span.arrow,
a.button span.arrow,
div#status_container,
div#status_container ul li a,
header div#status_block p.status_desc a span.arrow,
header nav ul li a,
main section#navigation h2,
main section.table thead tr td,
main section#top_story thead tr td,
main section#top_story tbody tr td,
.blocker .modal table thead tr td {
color: #FFF;
}
button,
a.button,
label.error,
header div#status_block,
header nav ul li a,
div#container div#nav ul li a,
main section#navigation h2,
main section.table thead tr td,
main section#top_story thead tr td,
main section#ads thead tr td,
main footer,
.blocker .modal table thead tr td {
font-weight: bold;
}
button,
a.button,
div#status_container ul li a,
header section h1 a,
header div#status_block p.status_desc a,
header nav ul li a,
main section#navigation p a,
main section.table thead tr td a,
main footer section.float_right div p a {
text-decoration: none;
}
input.checkbox,
div#status_container ul li a span#status_icon_1,
div#status_container ul li a span#status_icon_2,
div#status_container ul li a span#status_icon_3,
header nav ul li a span#nav_icon_1,
header nav ul li a span#nav_icon_2,
header nav ul li a span#nav_icon_3,
header nav ul li a span#nav_icon_4,
header nav ul li a span#nav_icon_5,
header nav ul li a span#nav_icon_6,
header nav ul li a span#nav_icon_7 {
vertical-align: middle;
}
div#outer_container {
background-color: #FFF;
width: 1016px;
margin: 0 auto 12px;
padding: 3px;
}
div#outer_container div#container {
background-color: #47839D;
}
.wrapper {
padding: 12px;
}
.wrapper,
header div#status_block,
main section.table tbody tr td div.post,
main footer {
overflow: hidden;
}
.clear,
main footer {
clear: both;
}
.float_left {
float: left;
}
.float_right {
float: right;
}
div#status_container {
background-color: #555;
width: 1022px;
margin: 12px auto 0;
border: solid #000;
border-width: 1px 1px 0;
}
div#status_container,
main section#navigation h2,
main section.table thead tr td,
main section#top_story thead tr td,
.blocker .modal table thead tr td {
height: 34px;
}
div#status_container ul,
header nav ul,
div#container div#nav ul {
list-style: none;
}
div#status_container ul,
header nav ul,
div#container div#nav ul {
padding: 0;
}
div#status_container ul li {
width: 338px;
height: inherit;
margin-top: 6px;
}
div#status_container ul li,
div#status_container ul li a span#status_icon_1,
div#status_container ul li a span#status_icon_2,
div#status_container ul li a span#status_icon_3,
header div#status_block p.status_desc a,
header nav ul li a span#nav_icon_1,
header nav ul li a span#nav_icon_2,
header nav ul li a span#nav_icon_3,
header nav ul li a span#nav_icon_4,
header nav ul li a span#nav_icon_5,
header nav ul li a span#nav_icon_6,
header nav ul li a span#nav_icon_7,
header nav ul span#nav_right,
main section.table tbody tr td span.forum_status,
main section.table tbody tr td div.subforumicon,
main section.table tbody tr td div.trow_threads_posts,
.blocker:before,
.blocker .modal {
display: inline-block;
}
div#status_container ul li div.status_box {
background-color: #444;
width: 325px;
height: 20px;
line-height: 18px;
margin: 0 auto;
text-align: center;
}
div#status_container ul li a {
background-color: #666;
padding: 4px 10px 12px;
border: solid #000000;
border-width: 1px 1px 0;
}
div#status_container ul li a:focus {
padding: 4px 10px 16px;
}
div#status_container ul li a span#status_icon_1,
div#status_container ul li a span#status_icon_2,
div#status_container ul li a span#status_icon_3 {
background-image: url(images/status_icon.png);
height: 23px;
}
div#status_container ul li a span#status_icon_1 {
background-position: 0;
width: 25px;
}
div#status_container ul li a span#status_icon_2 {
background-position: -25px 0;
width: 27px;
}
div#status_container ul li a span#status_icon_3 {
background-position: -52px 0;
width: 22px;
}
header,
div#container div#nav,
main section#top_story tbody tr td,
.blocker .modal {
position: relative;
}
header section {
background: url(images/header.png) round;
height: 150px;
border-bottom: 1px solid #000;
}
header section,
div#container div#nav ul,
main footer {
width: inherit;
}
header section h1 a {
font-size: 26px;
top: 35px;
left: 40px;
}
header section h1 a,
header p#header_desc,
header section a#header_play,
header nav,
div#container div#nav ul,
main section#top_story tbody tr td div,
.blocker .modal a.close-modal {
position: absolute;
}
header p#header_desc {
top: 65px;
left: 40px;
}
header div#status_block {
background: rgba(242, 242, 242, 0.5);
width: 326px;
max-height: 122px;
margin: 0 auto;
padding: 5px;
border: solid #000;
border-width: 0 1px 1px;
}
header div#status_block h2 {
padding: 5px;
font-size: inherit;
display: block;
}
header div#status_block h2,
main section#top_story,
main section.table,
main section#ads {
background-color: #FFF;
}
header div#status_block p.status_desc {
border-top: 1px dashed black;
margin: 6px 0;
padding: 6px 0;
text-align: right;
}
header div#status_block p.status_desc img#frank {
margin: -26px 10px 0;
}
header div#status_block p.status_desc img#avatar {
margin: -46px 0 0;
}
header div#status_block p.status_desc a {
background-color: #d7d7d7;
margin-bottom: 6px;
padding: 3px 0 3px 10px;
}
header div#status_block p.status_desc a span.arrow,
button span.arrow,
a.button span.arrow {
background-color: #FF8015;
margin-left: 10px;
padding: 3px 6px;
border-left: 1px solid #000;
}
header section a#header_play {
background-image: url(images/header_play.gif);
width: 105px;
height: 106px;
top: 15px;
right: 165px;
}
header nav {
bottom: 4px;
left: 12px;
}
header nav ul {
vertical-align: text-top;
}
header nav ul li {
display: inline;
}
header nav ul li a {
background-color: #D75C03;
margin-right: -4px;
padding: 8px 12px 8px 8px;
display: inline;
text-shadow: 2px 2px 2px #000;
text-transform: uppercase;
border: solid #000;
border-width: 1px 0 0 1px;
}
header nav ul li a#nav_active {
background-color: #FFCE00;
text-shadow: none;
padding: 12px 12px 12px 8px;
border-width: 1px 1px 0;
}
header nav ul li a span#nav_icon_1,
header nav ul li a span#nav_icon_2,
header nav ul li a span#nav_icon_3,
header nav ul li a span#nav_icon_4,
header nav ul li a span#nav_icon_5,
header nav ul li a span#nav_icon_6,
header nav ul li a span#nav_icon_7 {
background-image: url(images/nav_icon.png);
height: 19px;
margin-right: 1px;
}
header nav ul li a span#nav_icon_1 {
background-position: 0;
width: 20px;
}
header nav ul li a span#nav_icon_2 {
background-position: -20px 0;
width: 19px;
}
header nav ul li a span#nav_icon_3 {
background-position: -39px 0;
width: 17px;
}
header nav ul li a span#nav_icon_4 {
background-position: -56px 0;
width: 15px;
}
header nav ul li a span#nav_icon_5 {
background-position: -71px 0;
width: 16px;
}
header nav ul li a span#nav_icon_6 {
background-position: -87px 0;
width: 19px;
}
header nav ul li a span#nav_icon_7 {
background-position: -106px 0;
width: 21px;
}
header nav ul span#nav_right {
background-image: url(images/nav_right.gif);
width: 8px;
height: 29px;
margin-bottom :-10px;
}
div#container div#nav {
width: 1016px;
height: 25px;
}
div#container div#nav ul {
background-color: #FFCE00;
height: inherit;
line-height: 22px;
text-indent: 23px;
left: -2px;
border: solid #000000;
border-width: 0px 1px 1px;
}
div#container div#nav ul li {
color: #930930;
display: inline;
}
main section#navigation p {
color: #9CC;
margin-bottom: 6px;
}
main section#navigation p,
main section#navigation h2,
main section#top_story thead tr td,
main section.table thead tr td,
.blocker .modal table thead tr td {
padding: 0 10px;
}
main section#navigation p a,
main section.table thead tr td a {
color: inherit;
}
main section#navigation h2 {
background-color: #083D55;
line-height: 34px;
text-transform: uppercase;
}
main section#navigation h2,
main section#top_story,
main section.table,
main section#ads {
margin-bottom: 12px;
}
main section#navigation h2,
main section.table thead tr td,
main section#top_story thead tr td,
main footer,
.blocker .modal table thead tr td {
font-size: 11px;
}
main div#main_content {
width: 793px;
}
main section#top_story {
padding: 6px 6px 6px 0;
}
main section#ads {
width: 173px;
margin-left: 12px;
}
main section.table,
main section#ads,
main section#ads thead tr td,
main footer,
.blocker .modal {
padding: 6px;
}
main section.table table,
main section#ads table,
main section#ads tbody tr td img {
width: 100%;
}
main section.table thead::after {
height: 6px;
display: table-row;
content: "";
}
main section#top_story thead tr td {
background-color: #222;
text-transform: uppercase;
border-left:6px solid #FFF;
border-collapse: separate;
}
main section.table thead tr td {
background-color: #D75C03;
}
main section.table thead tr td.brown_alert {
background-color: #8C3C02;
}
main section.table thead tr td.red_alert {
background-color: #A5161A;
}
main section.table thead tr td.green {
background-color: #508F54;
}
main section#ads thead tr td {
background-color: #000;
color: #555;
text-align: center;
}
main section.table thead tr td span {
font-weight: normal;
display: block;
}
main section#top_story tbody tr td {
background-color: #004979;
border-left: 6px solid #FFF;
border-collapse: separate;
}
main section#top_story tbody tr td img {
width: 100%;
}
main section#top_story tbody tr td div {
top: 6px;
right: 10px;
left: 10px;
}
main section.table tbody tr.trow1 {
background-color: #9DD1E7;
}
main section.table tbody tr.trow2 {
background-color: #E6EFEF;
}
main section.table tbody tr.trow_shaded {
background-color: transparent;
}
main section.table tbody tr.trow_deleted,
.post.deleted_post {
background-color: #E8DEFF;
}
main section.table tbody tr.trow_selected,
main section.table tbody tr .trow_selected {
background-color: #FFFBD9;
color: #333;
}
main section.table tbody tr.trow1 a,
main section.table tbody tr.trow2 a,
main section.table tbody tr.post_bit td div.post div.post_author a {
color: #47839D;
}
main section.table tbody tr.trow1 td,
main section.table tbody tr.trow2 td,
main section.table tbody tr.trow_shaded td,
.blocker .modal table tbody tr td {
padding: 6px 10px;
}
main section.table tbody tr.trow_shaded td img {
margin-right: 6px;
}
main section.table tbody tr td span.forum_status {
height: 32px;
width: 32px;
}
main section.table tbody tr td span.forum_on {
background: url(images/forum_on.gif) no-repeat;
}
main section.table tbody tr td span.forum_off {
background: url(images/forum_off.gif) no-repeat;
}
main section.table tbody tr td span.forum_offclose {
background: url(images/forum_offclose.gif) no-repeat;
}
main section.table tbody tr td span.forum_offlink {
background: url(images/forum_offlink.gif) no-repeat;
}
main section.table tbody tr td div.subforumicon {
background: url(images/mini_status_sprite.png) no-repeat 0 0;
height: 10px;
width: 10px;
margin: 0 6px;
}
main section.table tbody tr td div.subforum_minion {
background-position: 0 0;
}
main section.table tbody tr td div.subforum_minioff {
background-position: 0 -10px;
}
main section.table tbody tr td div.subforum_minioffclose {
background-position: 0 -20px;
}
main section.table tbody tr td div.subforum_miniofflink {
background-position: 0 -30px;
}
main section.table tbody tr td div.trow_threads_posts {
margin: 0 3px;
}
main section.table tbody tr td div.trow_threads_posts img {
margin-bottom: 3px;
display: block;
}
main section.table tbody tr td div.editor_control_bar {
background: #fff;
border: 1px solid #ccc;
}
main section.table tbody tr td div.post .editor_control_bar {
background: #f5f5f5;
}
main section.table tbody tr.trow_shaded.post_bit td img {
margin-right: 0;
}
main section.table tbody tr td div.post div.post_author {
background-color: #9DD1E7;
padding: 6px 10px;
overflow: inherit;
}
main section.table tbody tr td div.post.classic div.post_author {
width: 112px;
}
main section.table tbody tr td div.post div.post_author img.buddy_status {
vertical-align: middle;
margin-top: -4px;
margin-left: 3px;
}
main section.table tbody tr td div.post div.post_author div.author_avatar {
background-color: #FFF;
margin-right: 6px;
padding: 6px;
border: 1px solid #47839D;
}
main section.table tbody tr td div.post.classic div.post_author div.author_avatar {
width: 67px;
margin: 0 auto;
float: none;
}
main section.table tbody tr td div.post div.post_author div.author_avatar a div.author_avatar_img {
background-color: #E6EFEF;
padding: 6px;
}
main section.table tbody tr td div.post div.post_author div.author_avatar a div.author_avatar_img div {
background-position: -6px -17px;
}
main section.table tbody tr td div.post div.post_author div.author_information,
main section.table tbody tr td div.post div.post_author div.author_statistics {
padding: 6px 0;
}
main section.table tbody tr td div.post.classic div.post_author div.author_information {
text-align: center;
}
main section.table tbody tr td div.post div.post_author div.author_statistics {
width: 154px;
margin-top: 15px;
}
main section.table tbody tr td div.post.classic div.post_author div.author_statistics {
width: 112px;
border-top: 1px dashed #47839D;
}
main section.table tbody tr td div.post div.signature {
margin-top: 5px;
border-top: 1px dotted #ddd;
padding: 10px 0 4px 0;
}
main section.table tbody tr td div.post.classic div.post_content {
width: 578px;
}
main section.table tbody tr td div.post div.post_head {
background-color: #E6EFEF;
margin-bottom: 12px;
padding: 6px 10px;
}
main section.table tbody tr td div.post div.post_body {
font-size: 11px;
margin-bottom: 12px;
padding: 6px 10px;
}
main section.table tbody tr td div.post div.post_meta {
padding: 0 10px;
}
main section.table tbody tr td div.post div.post_controls {
background-color: #E6EFEF;
padding: 10px;
overflow: inherit;
clear: both;
}
main section.table tbody tr td div.post div.post_controls a.postbit_multiquote_on {
background-color: #116795;
text-decoration: underline;
}
main section.table tbody tr td div.post:not(.deleted_post) .postbit_qrestore,
main section.table tbody tr td div.post:not(.deleted_post) .status_type,
main section.table tbody tr td div.post.deleted_post .postbit_mirage {
display: none;
}
.ignored_post {
border-top: 3px solid #333;
padding: 15px;
}
.ignored_post .show_ignored_post {
margin-top: -15px;
}
.ignored_post .show_ignored_post a.button span {
background-position: 0 -400px;
}
main section.table tbody tr td div.deleted_post_hidden {
border-top: 2px solid #000;
padding: 15px;
}
main section.table tbody tr td div.deleted_post_collapsed {
border-top: 3px solid #000;
padding: 15px;
}
main section.table tbody tr td div.deleted_post_collapsed div.show_deleted_post {
margin-top: -6px;
}
main section.table tbody tr td div.deleted_post_collapsed div.show_deleted_post a.button span {
background-position: 0 -400px;
}
main footer {
background-color: #0A4362;
color: #7295AA;
}
main footer section.float_left {
width: 243px;
height: 74px;
margin-right: 10px;
border-right: 1px dashed #7295AA;
}
main footer section.float_left div {
margin-top: 16px;
margin-left: 65px;
}
main footer section.float_left div h3 {
font-size: 20px;
}
main footer section.float_right {
width: 724px;
height: 74px;
}
main footer section.float_right div {
margin-top: 26px;
}
main footer section.float_right div p a {
color: #47839D;
}
You and your rounded corners. When it's released, you can make everything rounded inside global.css; just like this:Consider user rounded coners on Pop-ups Alerts
When do u expect a finished copy of this to be released?
I couldn't say when it'll be released; I'm a 1 man team and I just do this project in my spare time
What code are you referring to, exactly!Can u post the updated code for this?
<?phpif(!defined('IN_MYBB'))
{
die('This file cannot be accessed directly.');
}$plugins->add_hook('index_start', 'forcelogin');
$plugins->add_hook('no_permission', 'forcelogin');function forcelogin_info()
{
return array(
'name' => '(holo) Force Login',
'description' => 'Forces the user to login before accessing index.php',
'website' => '',
'author' => '',
'authorsite' => '',
'version' => '1.0',
'compatibility' => '18*',
'codename' => 'forcelogin'
);
}function forcelogin_activate()
{
// Do nothing
}function forcelogin_deactivate()
{
// Do nothing
}function forcelogin()
{
global $mybb;
if($mybb->user['uid'] == 0)
{
header('Location: member.php?action=login');
}
}?>