Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default PowerPanel Profile add-on to show current DJ-on-air Avatar?

    Hello,

    Is there anyway to grab what DJ is currently on air (from the timetable i should think?) and display the avatar on a page, so I can impliment it onto my site which has a 'Current DJ's Avatar' box.

    Thanks
    +REP

    ;;Tom
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #2
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    <?php
    include("../includes/config.php");
    include(
    "../includes/functions.php");

    $query mysql_query("SELECT * FROM users WHERE level != 'banned'") or die('ERROR '.mysql_error());
    while(
    $rows mysql_fetch_array($query)) {
    if(
    preg_match("/"$rows[username] ."/i"$servertitle)) {
    $name "{$rows[username]}";
    $check mysql_query("SELECT * FROM users WHERE username = '$name'");
    ?>
    <img src="<?php
    $avatar 
    $account["avatar"];

    if(
    $avatar == "") {
    echo(
    "../images/no_ava.gif");
    }
    elseif(
    $avatar == "images/no_ava.gif") {
    echo(
    "../images/no_ava.gif");
    }
    else {
    echo(
    ""$avatar ."");
    }
    ?>" alt="<? echo(""$account["username"] .""); ?>'s avatar" />
    <?php
    }
    }
    ?>
    Something like that
    That grabs the server title checks if the DJ is registered in the panel and then displays their avatar.


  3. #3
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Anyway to grab the name thats on the timetable?

    Because people will use things like:

    DJ Spike | HabboFM.co.uk

    etc etc...

    (This powerpanel thing isn't for HabboFM, its just an example)
    Last edited by Recursion; 16-06-2007 at 09:49 AM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Because people will use things like:

    DJ Spike | HabboFM.co.uk
    Don't worry

    The script basically 'searches' for their username in the stream title.

    So if their username was "Simon" and the stream title was "IYA!!1 DJ SIMON IZ ERE BLASTIN YA TUNEZ!!2", then it would still work I believe.

  5. #5
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    I put that PHP code in a file (such as avatar_show.php) in the root directory of powerpanel?
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  6. #6
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    In /frontend/.

  7. #7
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Thanks Ill give it a try when I reinstall my Panel after that crappy mod >=[
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •