Jump to content
FarSe

RST Userbar

Recommended Posts

Nu cred ca se mai poarta userbar-urile insa ma cam plictiseam si de template-uri bootstrap n-am chef sa ma apuc.

http://farse.me/rst/?uname=farse&type=1

index.php?uname=farse&type=1&ceapa.png

Pana acuma are doar un 'type'(nu ma pricep la photoshop).

Va treceti numele dupa cum apare pe profil(ex: rstforums.com/forum/members/farse/ )

Daca cineva se pricepe la photoshop si doreste sa faca ni?te backgrounduri frumoase, sa'mi lase PM cu .png .

PHP:

<?php
$uname = str_replace('/','',$_GET['uname']);
if(!$uname) die("&uname=X&type=1");
$data = file_get_contents('https://rstforums.com/forum/members/'.$uname.'/');
header("Content-type: text/plain");
if(strpos($data,'This user has not registered and therefore does not have a profile to view.')!==false)die("No user found with name $uname");
if(preg_match('$ lastnavbit"><span>(.*?)</span>.*?Likes Received \(([0-9]+)\).*?<dt>Join Date</dt>.*?<dd> (.*?)</.*?<dt>Total Posts</dt>.*?<dd> ([0-9,]+)</$is',$data,$res))
{
$name = $res[1];
$likes = $res[2];
$join = $res[3];
$ndate = date('d M \'\'y',strtotime($join));
$posts = $res[4];
}
if($_GET['type']==1)
{

$img = ImageCreateFromPNG("rstmini.png");
imagettftext2($img, 11, 0.0, 10, 17, "0xFFFFFF", 'fonts/Sansation_Bold.ttf', "$name since $ndate with $posts posts and $likes likes");

header("Content-type: image/png");
ImagePng($img);
ImageDestroy($img);
}else {
echo "Nume:$name\nLikes:$likes\nJoindate:$ndate\nPosts:$posts\n\n\n\n";
}
function imagettftext2( $image , $size , $angle , $x , $y , $color , $fontfile , $text )
{
$negru = "0x000000";
imagettftext( $image , $size , $angle , $x-1 , $y-1 , $negru , $fontfile , $text );
imagettftext( $image , $size , $angle , $x+1 , $y-1 , $negru , $fontfile , $text );
imagettftext( $image , $size , $angle , $x-1 , $y+1 , $negru , $fontfile , $text );
imagettftext( $image , $size , $angle , $x+1 , $y+1 , $negru , $fontfile , $text );

return imagettftext( $image , $size , $angle , $x , $y , $color , $fontfile , $text );
}
?>

Link to comment
Share on other sites

Imi place, mai ales designul lui Gecko. Problema e ca se loveste de regulament daca il punem pe forum.

1. Ac?iuni pentru care ve?i primi avertisment sau chiar ban: offtopic, post dublu(ave?i buton de editare), post inutil, redeschidere topic, insultare membru(atac la persoan?), nume topic inadecvat, informa?ie deja postat?, limbaj inadecvat(IRC style - sh, tz, CAPS, în culori sau agramat total), avatare mari sau care întrec bunul sim?, semn?turi penibile, linkuri cu referrer, imagini dinamice în semn?tur?.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...