Current time: 04-24-2014, 01:19 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error by online today
04-07-2009, 02:42 AM (This post was last modified: 04-07-2009 02:44 AM by hitman45.)
Post: #1
error by online today
hi
i installet plugin online today but shown column?why?


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
04-07-2009, 03:27 AM
Post: #2
RE: error by online today
Modify the template for the plugin to have colspan="2" after <td.
Find all posts by this user
Quote this message in a reply
04-07-2009, 03:59 AM
Post: #3
RE: error by online today
(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")."\";");
    }

}

?>
Find all posts by this user
Quote this message in a reply
04-07-2009, 04:03 AM
Post: #4
RE: error by online today
If you PM me your forum URL, admin username+password I can fix it for you.
Find all posts by this user
Quote this message in a reply
04-07-2009, 06:14 AM
Post: #5
RE: error by online today
Why is this in MyBB Suggestions and Feedback? Shouldn't it be in the plugin forum?

Your friendly neighbourhood lurker.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2009, 05:33 PM
Post: #6
RE: error by online today
(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 -
Visit this user's website Find all posts by this user
Quote this message in a reply
04-07-2009, 05:51 PM
Post: #7
RE: error by online today
(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.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-08-2009, 03:02 AM (This post was last modified: 04-08-2009 03:03 AM by hitman45.)
Post: #8
RE: error by online today
hi
finaly i do it
see it! http://www.azarfx.com/forum
regards
Find all posts by this user
Quote this message in a reply
04-08-2009, 03:25 AM
Post: #9
RE: error by online today
o good !
thanks for your assistense Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication