MyBB-Plugins Forums

Full Version: User Bar 1.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Although everybody can see this section and its threads and posts, only gold subscribers can download attachments. Click here to subscribe.

This PHP script (it's not a plugin) outputs an image with the following info about the user:
  • User Name
  • Posts
and at the bottom right corner, displays the URL of the board.
Of course, you can add more things if you want.
The image is composed of 2 images, the background and the gloss so the gloss is above the text not below.

Demo:
http://forums.consoleworld.net/userbar.php?uid=1

[Image: userbar.php?uid=1]
Awesome Plugin!!
I really thank you Nervo!
you tha man
^^
Very nice one, thank you.
Warning [2] require_once(./inc/init.php) [function.require-once]: failed to open stream: No such file or directory - Line: 17 - File: inc/plugins/userbar.php PHP 5.2.9 (Linux)
File Line Function
/inc/plugins/userbar.php 17 errorHandler->error
/inc/plugins/userbar.php 17 require_once
/admin/modules/config/plugins.php 285 require_once
/admin/index.php 380 require

Fatal error: require_once() [function.require]: Failed opening required './inc/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bluntwa1/public_html/forum/inc/plugins/userbar.php on line 17
This is not a plugin, it must be placed in the root of your MyBB installation
aaahaay.. PHP text to images.. i love it Big Grin
kewl Big Grin

mine..
[Image: userbar.php?uid=32]
Can make it show up only when you typed the uid and username?

Can you cast an eye what i've just written?:
PHP Code:
<?php
if (!$mybb->input['uid'] AND !$mybb->input['username'])
{
    return;
}
else if (
$mybb->input['uid'])
{
    
$user $db->fetch_array($db->simple_select("users""username,postnum"'uid='.intval($mybb->input['uid'])));
}
else
{
    
$user $db->fetch_array($db->simple_select("users"'username,postnum'"username='".$db->escape_string($mybb->input['username'])."'"));
}
?>
(09-28-2009, 07:59 PM)habs Wrote: [ -> ]kewl Big Grin

mine..
[Image: userbar.php?uid=32]

How did you add rep and points?
@Julek12 you should use elseif not else if
Replace return with exit or die()

It should be something like:
PHP Code:
<?php
if ($mybb->input['uid'])
{
    
$user $db->fetch_array($db->simple_select("users""username,postnum"'uid='.intval($mybb->input['uid'])));
}
elseif (
$mybb->input['username'] != "")
{
    
$user $db->fetch_array($db->simple_select("users"'username,postnum'"username='".$db->escape_string(trim($mybb->input['username']))."'"));
}
else
{
    die();
}
?>
Pages: 1 2 3 4 5 6