Demo

Probiere ClanSphere aus und teste daran herum. Demo

Codepaste - Details
Weitere Infos zum Codepaste

Name Balkenfarbe / Forum Rank
Autor de nerv
CMS-Version ClanSphere 2007
Datei board/rankimg.php
Datum 22.03.2007 um 17:57 Uhr
Beschreibung Farbänderung des Fortschritsbalkens im Forum

um eine Farbe einzustellen in den betreffenden scripten an den image link &color=R:G:B anhängen. ( R, G, B steht für rot grün und blau jeweils 0 bis 255)

Bsp: forum
functions.php
return cs_html_img("mods/board/rankimg.php?width=100");
ersetzen mit
return cs_html_img("mods/board/rankimg.php?width=100&color=150:50:50");

wenn nix übergeben wird bleibt die alte Farbe grün
Alter Code Alter Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
1. / 2. / ... 
<?php
$width 
$_GET['width'];
Header"Content-type: image/gif");
        if(
$width 100)
            
$width 100;
        
        
$im imagecreate(101,6);
    
$white ImageColorAllocate($im,255,255,255);
    
$green ImageColorAllocate($im12,246,0);
      
$grey ImageColorAllocate($im192,192,192);
      
      
ImageRectangle($im,0,0,100,5,$grey);
      
ImageFilledRectangle($im,1,1,$width-1,4,$green);
  
  
ImageGif($im);
  
ImageDestroy($im);
    
?>
Neuer Code Neuer Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
1. / 2. / ... 
<?php
Header
"Content-type: image/gif");

$width $_GET['width'];


if(
$width 100$width 100;

$im imagecreate(101,6);
$bg ImageColorAllocate($im,255,255,255);
$border ImageColorAllocate($im192,192,192);

if(!empty(
$_GET['color'])){
    
$color explode(":"$_GET['color']);
    
$c ImageColorAllocate($im$color[0],$color[1],$color[2]);
}else{
    
$c ImageColorAllocate($im12,246,0);
}
ImageRectangle($im,0,0,100,5,$border);
ImageFilledRectangle($im,1,1,$width-1,4,$c);
  
ImageGif($im);
ImageDestroy($im);
    
?>
Zurück - Übersicht

Kommentare: 2
Seite [1]
megaloo

26.01.2008

Ort: -
Beiträge: 2
# 1 - 27.08.2007 um 19:06 Uhr

also bei mir klappt's nicht.

also der generiert die farbe nicht die ich da gepasted hab. nur wenn ich in die addressleiste eintippe, dann klappt es. www.page.de/mods/board/rankimg.php?width=100&color=150:50:50
Miraculix

--

Ort: Füssen
Beiträge: 453
# 2 - 24.11.2008 um 22:57 Uhr

hab das mal wieder ausgegraben.

es reicht wenn man in der rankimg.php zeile 10 ändert und seine Wunschfarbe eingibt.

zb: $green = ImageColorAllocate($im, 120,0,0);

greetz miraculix


Bitte Login benutzen, um Kommentare zu schreiben.