Raised This Month: $51 Target: $400
 12% 

Admin Display from SB


Post New Thread Reply   
 
Thread Tools Display Modes
bouncer
Veteran Member
Join Date: Apr 2009
Old 11-03-2010 , 09:18   Re: Admin Display from SB
Reply With Quote #21

I meant the code in the admins.php, how would it be structured then?
__________________


bouncer is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 11-03-2010 , 09:31   Re: Admin Display from SB
Reply With Quote #22

ic, its that the option your going to go for then?

i cant be certain, but i would imaging you start off storing the query

$community_id = cast(mid(steam_id,9,1) as unsigned) + cast('76561197960265728' as unsigned) + cast(mid(steam_id, 11,10)*2 as unsigned)

but change the steam_id to authid, not definate though

Last edited by Rizla; 11-03-2010 at 09:35.
Rizla is offline
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 11-03-2010 , 14:30   Re: Admin Display from SB
Reply With Quote #23

Hi there

Thx for sharing this m8

I do run into some problems (see link below)
http://onlyfriends.be/admins/admins.php

I CHMOD'ed cache folder to 777
I changed everything you asked for.

Any ideas why this isin't working?

Last edited by Groger; 11-03-2010 at 14:34.
Groger is offline
Gippo
AlliedModders Donor
Join Date: Oct 2008
Old 11-03-2010 , 17:31   Re: Admin Display from SB
Reply With Quote #24

Probably you didn't change the table name to sb_admins or something.
Gippo is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 11-03-2010 , 17:42   Re: Admin Display from SB
Reply With Quote #25

its connecting ok and the query is running but its returning no results, it cant find the data so the query is returning what it 'found':

No resultsWed Nov 3 22:19:21 CET 2010

chances are you have entered the wrong group or not selected the rights ones or soemthign. if your sure they are ok then post up your admins.php and ill take a look

it wont be the cache, that should still print the data but will show a php or sql error (i forget which) and it just means it wont save a page copy.
Rizla is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 11-03-2010 , 17:48   Re: Admin Display from SB
Reply With Quote #26

So any fix for the "add friend" option? can anyone post a new admin.php with that fix?
__________________


bouncer is offline
Gippo
AlliedModders Donor
Join Date: Oct 2008
Old 11-03-2010 , 18:13   Re: Admin Display from SB
Reply With Quote #27

There is nothing wrong with the admin.php. As you can see on my link at the second page.
Gippo is offline
bouncer
Veteran Member
Join Date: Apr 2009
Old 11-03-2010 , 18:15   Re: Admin Display from SB
Reply With Quote #28

You might not have the issue but if you read back in the pages you would notice that others have issue with add friend.
__________________


bouncer is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 11-03-2010 , 18:55   Re: Admin Display from SB
Reply With Quote #29

that last one from me was for groger.

as 8088 said it was probably due to lack of support for 64bit integers or smth, its beyond my skill otherwise i would post. hopefully someone can help and post up a version.
Rizla is offline
8088
Veteran Member
Join Date: Jan 2008
Old 11-03-2010 , 20:41   Re: Admin Display from SB
Reply With Quote #30

To let MySQL do the math, the query should look like this:
Code:
SELECT user,authid,srv_group,gid,
CAST(MID(authid,9,1) AS UNSIGNED) + CAST('76561197960265728' AS UNSIGNED) + CAST(MID(authid, 11,10)*2 AS UNSIGNED) AS friendid
FROM ADMINS_TABLE
WHERE srv_group = 'SERVER GROUP 1' OR srv_group = 'SERVER GROUP 2' OR srv_group = 'SERVER GROUP 3'
ORDER BY gid ASC
To use it, admins.php, between "//prepare the query" and "//there are no result", should be something like this:
PHP Code:
$sql "SELECT user,authid,srv_group,gid,
                CAST(MID(authid,9,1) AS UNSIGNED) + CAST('76561197960265728' AS UNSIGNED) + CAST(MID(authid, 11,10)*2 AS UNSIGNED) AS friendid
                FROM ADMINS_TABLE
                WHERE srv_group = 'SERVER GROUP 1' OR srv_group = 'SERVER GROUP 2' OR srv_group = 'SERVER GROUP 3'
                ORDER BY gid ASC"
;

//perform the query and store the resource in '$query'
$query mysql_query($sql);

//see if there are any results at all
if(mysql_num_rows($query) > 0)
{
    
//there is one or more results, start printing the table
    
print '<div align="center">
<a href="LINK TO YOUR BANNER">
<img src="YOUR BANNER SRC" alt="" title=""></a></div>

<p>ENTER YOUR INTRO TEXT HERE</p></div align="center"><table border="0" cellpadding="2" cellspacing="2" width="100%">'
;
    
    
//fetch every possible row from the resource and do nice stuff with it
   
while($info mysql_fetch_assoc($query))
    {   
        
//create a link to the Steam community profile
        
$site 'http://steamcommunity.com/profiles/'.$info['friendid'];
  
        
//print the table row with all the info
        
print '<tr><td><img src="http://www.steamprofile.com/profile/simple/steam/'.$info['authid'].'.png" ></td><td align="center"><a href="steam://friends/add/'.$info['friendid'].'">Add as Friend</a></td><td align="center"><a href='.$site.'>Steam Community Page</a></td><td>'.$info['srv_group'].'</td></tr><tr><td colspan="4"><hr></td></tr>';
    }
    
//close the table
    
print '</table><br><div align="center"><p><small>Special thanks to Voogru for the conversions, 8088 on Allied Modders for helping to fix. Steamprofile.com for their images. Depictation.net for their cache and whoever else I forgot! Sorry.<br><br>&copy; 2010 TmF Gaming</p></small><br><br></div></div>';

__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode