goma smile Posted March 22, 2010 Report Share Posted March 22, 2010 (edited) Labdien, es vēlētos uztiasīt piemēram kā šajā formā. Sakrājot noteiktu topiku skaitu tev atiecīgi mainās zvaigzņīšu aplīšu skaits.... ja tev ir 10 posti tev ir 1 zvaigznīte kad 25 tad 2 zvaigznītes... kā to panāt ? $array = array(1 - 10 => "1.png", 11-26 => "2.png"); echo $array[8]; // 1.png Kaut kā tā ? Edited March 22, 2010 by goma smile Quote Link to comment Share on other sites More sharing options...
Battery Posted March 23, 2010 Report Share Posted March 23, 2010 (edited) vienkāršs variants: if($post_count >= 1 && $post_count <= 10){echo "1star.jpg";} utt. Edited March 23, 2010 by Battery Quote Link to comment Share on other sites More sharing options...
mounkuls Posted March 23, 2010 Report Share Posted March 23, 2010 Hmm, perlā tā "1-10" "11-25" ideja varētu arī šancēt, bet php nesanāk laikam. Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 23, 2010 Report Share Posted March 23, 2010 glabā db visu title posts nūbs 0 pro 10 super pro 100 un tad velkam ārā where user_posts > posts ORDER BY desc LIMIT 1 Quote Link to comment Share on other sites More sharing options...
2easy Posted March 23, 2010 Report Share Posted March 23, 2010 (edited) un arrayā tāpat var glabāt array(1 => 10, 2 => 25) un algoritms: kamēr postu skaits mazāks par value ($v), iet tālāk ar foreach (array(1 => 10, 2 => 25) as $k => $v) else paņem/izdod key ($k) un break; Edited March 23, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
goma smile Posted March 23, 2010 Author Report Share Posted March 23, 2010 Atrisināju paldies vissiem kas palidzēja. Quote Link to comment Share on other sites More sharing options...
mounkuls Posted March 23, 2010 Report Share Posted March 23, 2010 un arrayā tāpat var glabāt array(1 => 10, 2 => 25) un algoritms: kamēr postu skaits mazāks par value ($v), iet tālāk ar foreach (array(1 => 10, 2 => 25) as $k => $v) else paņem/izdod key ($k) un break; nu var jau vienkārši $status='beginer'; $status=($posts>0)?'1.statuss':$status; $status=($posts>10)?'2.statuss':$status; $status=($posts>25)?'3.statuss':$status; //..... //..... //..... echo 'statuss:'.$status; Quote Link to comment Share on other sites More sharing options...
goma smile Posted March 23, 2010 Author Report Share Posted March 23, 2010 Un sakara uz šo tēmu vai kāds nepateiktu kur varētu atrast gatavas zvaigznītes uz postu līmeni .... Es jau 2 dienu meklēju nevar izdomāt tagu ar ko google meklēt Quote Link to comment Share on other sites More sharing options...
briedis Posted March 23, 2010 Report Share Posted March 23, 2010 Un sakara uz šo tēmu vai kāds nepateiktu kur varētu atrast gatavas zvaigznītes uz postu līmeni .... Es jau 2 dienu meklēju nevar izdomāt tagu ar ko google meklēt eeee... rating? Tik meklēšanas opcijās izvēlies bilžu lielumu kā ikona/small, tad atbilstošāki rezultāti leks ārā... Quote Link to comment Share on other sites More sharing options...
marcis Posted March 23, 2010 Report Share Posted March 23, 2010 www.iconfinder.net Quote Link to comment Share on other sites More sharing options...
Pentiums Posted March 23, 2010 Report Share Posted March 23, 2010 iconfinder.net ir must have Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.