Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error by online today
#1
hi
i installet plugin online today but shown column?why?


Attached Files Thumbnail(s)
   
Reply
#2
Modify the template for the plugin to have colspan="2" after <td.
Reply
#3
(04-07-2009, 03:27 AM)Tom Loveric Wrote:  Modify the template for the plugin to have colspan="2" after <td.
hi
what i put(colspan="2") in php cod below and ?
PHP Code:
<?php
/**
 * MyBB 1.4
 * Copyright © 2008 Samuel
 */

// 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""onlinetoday_run");

function 
onlinetoday_info()
{
    return array(
        
"name"            => "Online Today",
        
"description"    => "Shows you who has been online in the last 24 Hours",
        
"website"        => "http://gally.x10hosting.com/mybb/",
        
"author"        => "Samuel",
        
"authorsite"    => "http://gally.x10hosting.com/mybb/",
        
"version"        => "1.1",
        
"guid"             => "3fcc54ee559b73e0778e137eddcd6301",
        
"compatibility" => "14*"
    
);
}

function 
onlinetoday_activate()
{
    global 
$db$mybb;
    
    
$query $db->simple_select("settinggroups""COUNT(*) as rows");
    
$rows $db->fetch_field($query"rows");
    
    
$insertarray = array(
        
'name' => 'onlinetoday'
        
'title' => 'Show Users Who Have Been online Today'
        
'description' => 'Options on the online today plugin'
        
'disporder' => $rows+1
        
'isdefault' => 0
    
);
    
$db->insert_query("settinggroups"$insertarray);
    
$group['gid'] = $db->insert_id();
    
    
$insertarray = array(
        
'name' => 'onlinetoday_active',
        
'title' => 'Enable Show Users Who Have Been Online Today Plugin?',
        
'description' => 'Enable Show Users Who Have Been online Today Plugin?',
        
'optionscode' => 'onoff',
        
'value' => 1,
        
'disporder' => 0,
        
'gid' => $group['gid']
    );
    
$db->insert_query("settings"$insertarray);
    
    
rebuild_settings();
    
    include 
MYBB_ROOT."/inc/adminfunctions_templates.php";
    
    
find_replace_templatesets("index_boardstats"'#{\$whosonline}(\r?)\n#'"{\$whosonline}\n{\$online_today}\n");
    
    
$insert_array = array(
        
'title' => "online_today_index",
        
'template' => "<tr>
    <td class=\"tcat\"><strong>{\$lang->whos_online_today}</strong></td>
</tr>
<tr>
    <td class=\"trow1\"><span class=\"smalltext\">{\$lang->online_note_today}<br />{\$onlinemembers}</span></td>
</tr>"
,
        
'sid' => "-1",
        
'dateline' => TIME_NOW
    
);
    
    
$db->insert_query("templates"$insert_array);
    
}

function 
onlinetoday_deactivate()
{
    global 
$db$mybb;
    
    include 
MYBB_ROOT."/inc/adminfunctions_templates.php";
    
    
find_replace_templatesets("index_boardstats"'#{\$online_today}(\r?)\n#'""0);
    
    
$db->delete_query("templates""title = 'online_today_index'");
    
    
$db->write_query("DELETE FROM ".TABLE_PREFIX."settings WHERE name IN(
        'onlinetoday_active'
    )"
);
    
    
$db->delete_query("settinggroups""name = 'onlinetoday'");
    
    
rebuild_settings();
}

function 
onlinetoday_run()
{
    global 
$db$mybb$templates$theme$lang$online_today;
    
    
$lang->load("onlinetoday");
    
    
$online_today '';
    if(
$mybb->settings['onlinetoday_active'] == "1")
    {
        
$onlinedate time() - 24*60*60;
        
$query $db->simple_select(
            
"users"
            
"uid, username, usergroup, displaygroup",
            
"lastactive > $onlinedate ORDER BY username ASC"
        
);
        
$comma '';
        
$onlinecount 0;
        while(
$user $db->fetch_array($query))
        {
            ++
$onlinecount;
            
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
            
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);
            eval(
"\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit"10)."\";");
            
$comma ", ";
        }
        
$memberword = ($onlinecount != 1) ? $lang->online_member_plural $lang->online_member_singular;
        
$lang->online_note_today $lang->sprintf($lang->online_note_todaymy_number_format($onlinecount), $memberword24);
        eval(
"\$online_today = \"".$templates->get("online_today_index")."\";");
    }

}

?>
Reply
#4
If you PM me your forum URL, admin username+password I can fix it for you.
Reply
#5
Why is this in MyBB Suggestions and Feedback? Shouldn't it be in the plugin forum?
Your friendly neighbourhood lurker.
Reply
#6
(04-07-2009, 06:14 AM)Joshua Mayer Wrote:  Why is this in MyBB Suggestions and Feedback? Shouldn't it be in the plugin forum?

Moved -
Reply
#7
(04-07-2009, 05:33 PM)Ghazala_Wali Wrote:  
(04-07-2009, 06:14 AM)Joshua Mayer Wrote:  Why is this in MyBB Suggestions and Feedback? Shouldn't it be in the plugin forum?

Moved -

I think we can see that...
Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#8
hi
finaly i do it
see it! http://www.azarfx.com/forum
regards
Reply
#9
o good !
thanks for your assistense Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)