1. IMPORTANT : Nouvelles mesures de sécurité - 2. Règles pour obtenir de l'aide dans les forums de support - 3. Restrictions des droits pour le groupe "Support suspendu"

Il est obligatoire de respecter les Règles de MyBB.fr : Version abrégée ou Version complète pour obtenir du support sur nos forums.

Les membres ayant un site/forum contrevenant aux règles de MyBB.support seront placés dans le groupe "Support suspendu" et ne bénéficieront plus du support du staff. Nous recommandons aux autres membres d'agir de même. Il ne s'agit pas d'un bannissement, le membre retrouvera son statut "normal" dès que sa situation sera conforme aux règles.

Nouveau : un Wiki en français : plus de détails.
Avant de soumettre votre problème, consultez-le, ainsi que la FAQ, sans oublier le moteur de recherche interne.


Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
user online à homepage
Mots-clés » user, online, homepage
06-11-2013, 20:21,
#1
user online à homepage

comment puis-je insérer les utilisateurs en ligne à homepage?

Url homepage exemple: http://www.homepage.it
Url forum exemple: http://www.homepage.it/forum

page homepage.it ne pas présenter le fichiers de MyBB

désolé pour mon pauvre francais
Répondre
06-11-2013, 23:26, (Modification du message : 06-11-2013, 23:31 par Nitrome.)
#2
RE: user online à homepage
Salut, ciao Smile

Si j'ai bien compris, tu demande comment installer le forum sur ton site ?
Tu dois suivre ces instructions http://mybb.fr/thread-3136.html
Bon courage Wink

Se ho capito bene, si sta chiedendo come installare il forum sul tuo sito?
È necessario seguire queste istruzioni http://mybb.fr/thread-3136.html
Buona fortunaWink

Désolé pour mon pauvre italien Tongue
Répondre
06-11-2013, 23:49,
#3
RE: user online à homepage
Not really Tongue
Can I speak english? Big Grin

I try/want to show the user online in the homepage of my forum. I have the homepage, for example, in the page http://www.homepage.it and my forum in the page, for example, http://www.homepage.it/forum

The page http://www.homepage.it is a simple page built with HTML and CSS code. I want show to this page the user online in the forum (Qui est en ligne)

I try to make this code but don't work:

Code PHP :
<?php

define
('IN_MYBB'1);
require 
"forum/global.php";

$whosonline '';
if(
$mybb->settings['showwol'] != && $mybb->usergroup['canviewonline'] != 0)
{
    
// Get the online users.
    
$timesearch TIME_NOW $mybb->settings['wolcutoff'];
    
$comma '';
    
$query $db->query("
        SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
        FROM "
.TABLE_PREFIX."sessions s
        LEFT JOIN "
.TABLE_PREFIX."users u ON (s.uid=u.uid)
        WHERE s.time>'
$timesearch'
        ORDER BY u.username ASC, s.time DESC
    "
);

    
$forum_viewers = array();
    
$membercount 0;
    
$onlinemembers '';
    
$guestcount 0;
    
$anoncount 0;
    
$doneusers = array();

    
// Fetch spiders
    
$spiders $cache->read("spiders");

    
// Loop through all users.
    
while($user $db->fetch_array($query))
    {
        
// Create a key to test if this user is a search bot.
        
$botkey my_strtolower(str_replace("bot="''$user['sid']));

        
// Decide what type of user we are dealing with.
        
if($user['uid'] > 0)
        {
            
// The user is registered.
            
if($doneusers[$user['uid']] < $user['time'] || !$doneusers[$user['uid']])
            {
                
// If the user is logged in anonymously, update the count for that.
                
if($user['invisible'] == 1)
                {
                    ++
$anoncount;
                }
                ++
$membercount;
                if(
$user['invisible'] != || $mybb->usergroup['canviewwolinvis'] == || $user['uid'] == $mybb->user['uid'])
                {
                    
// If this usergroup can see anonymously logged-in users, mark them.
                    
if($user['invisible'] == 1)
                    {
                        
$invisiblemark "*";
                    }
                    else
                    {
                        
$invisiblemark '';
                    }

                    
// Properly format the username and assign the template.
                    
$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 $lang->comma;
                }
                
// This user has been handled.
                
$doneusers[$user['uid']] = $user['time'];
            }
        }
        elseif(
my_strpos($user['sid'], "bot=") !== false && $spiders[$botkey])
        {
            
// The user is a search bot.
            
$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
            
$comma $lang->comma;
            ++
$botcount;
        }
        else
        {
            
// The user is a guest.
            
++$guestcount;
        }

        if(
$user['location1'])
        {
            
$forum_viewers[$user['location1']]++;
        }
    }

    
// Build the who's online bit on the index page.
    
$onlinecount $membercount $guestcount $botcount;
    
    if(
$onlinecount != 1)
    {
        
$onlinebit $lang->online_online_plural;
    }
    else
    {
        
$onlinebit $lang->online_online_singular;
    }
    if(
$membercount != 1)
    {
        
$memberbit $lang->online_member_plural;
    }
    else
    {
        
$memberbit $lang->online_member_singular;
    }
    if(
$anoncount != 1)
    {
        
$anonbit $lang->online_anon_plural;
    }
    else
    {
        
$anonbit $lang->online_anon_singular;
    }
    if(
$guestcount != 1)
    {
        
$guestbit $lang->online_guest_plural;
    }
    else
    {
        
$guestbit $lang->online_guest_singular;
    }
    
$lang->online_note $lang->sprintf($lang->online_notemy_number_format($onlinecount), $onlinebit$mybb->settings['wolcutoffmins'], my_number_format($membercount), $memberbitmy_number_format($anoncount), $anonbitmy_number_format($guestcount), $guestbit);


?>

And I insert out of the code php this variables to show the user online:

Code :
{$onlinemembers}

but don't work, any suggestions?



However the guide you sent me for install a mybb forum is very well done
Répondre
07-11-2013, 0:11,
#4
RE: user online à homepage
Oh sorry I don't know how to do that, i'm a noob in php and mysql^^

And admins will help you only if you put your real forum url here (or by private message), it's one of this forum's rules to get support Wink

Répondre
07-11-2013, 1:01,
#5
RE: user online à homepage
Good evening dimitru.

To receive support for MyBB in English, I invite you to ask your question on the official MyBB community forums at http://community.mybb.com/

As you are on the French translation and support board, our team will not be able to give you any help in English nor Italian here. Thanks for your comprehension. Smile

Cordialement,
Saphir,
Modérateur MyBB.support.
Répondre
07-11-2013, 13:40, (Modification du message : 07-11-2013, 13:40 par dimitru.)
#6
RE: user online à homepage
I ask on the official MyBB community, but don't reply Sad
so I had the idea of ​​asking here
Répondre




Utilisateur(s) parcourant ce sujet : 1 visiteur(s)

Contact | MyBB.support | Retourner en haut | Retourner au contenu | Version bas-débit (Archivé) | Syndication RSS
 Utilitaire de traduction fourni par Regentronique