two different div's in forum. how?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    two different div's in forum. how?

    hello bro. how to make something like this?
    display two different div's alternate to the forum
    i use lava script

    #2
    {
    echo "<div class=\"css1\">$link</div>";
    }else{
    echo "<div class=\"css2\">$link</div>";
    }
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      yeah.. You can set my class that u want and set also in your css file
      our lfe is simple words....
      http://mygenkz.net
      ewanz06@yahoo.com
      PHP Code:
      $output="i am NOoob....";
      $newfile="ewanz.txt";
      $file fopen ($newfile"w");
      fwrite($file$output);
      fclose ($file); 

      Comment


        #4
        this is bit of my forum.php file. what i must chance?
        I know that I put in a good condition if the option else to work. I know that I need to change the very end of this file because the post that was quoted has a different div and the code responsible for it is at the very end


        PHP Code:
        $sql "SELECT id, text, uid, dtpost, quote, filename, filesize, down FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost DESC LIMIT $limit_start$posts_per_page ";
          
        $posts mysql_query($sql);
          while(
        $post mysql_fetch_array($posts))
          {
            echo 
        "<div>";

            
        $unick getnick_uid($post[2]);
            if(
        isonline($post[2]))
            {
              
        $iml "<img src=\"../images/onl.png\" alt=\"+\"/>";
            }else{
                
        $iml "<img src=\"../images/ofl.png\" alt=\"-\"/>";
            }
            if(
        $post[5]=="")
        {
        $attach "";
        }
        else
        {
        $kiraan mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$uid."'"));
        if(
        $kiraan[0]<30)
        {
        $tolak 30 $kiraan[0];
        $attach "<i>$tolak post remaining to see this link!</i><br/>";
        }
        else
        {
        $attach "<a href=\"down2.php?id=$post[0]\">[ Attachment: $post[6] ]</a> - $post[7] Hits!<br/>";
        }
        }

          
        $que mysql_fetch_array(mysql_query("SELECT text, uid, dtpost, filename, filesize FROM ibwf_posts WHERE id='".$post[4]."'"));

            if(
        $que[3]=="")
        {
        $attach2 "";
        }
        else
        {
        $attach2 "<a href=\"down2.php?id=$post[0]\">[ Attachment: $post[6] ]</a><br/>";
        }
                
        $nick getnick_uid($que[1]);
            
        $dto date("d-m-y - H:i:s",$que[2]);
            
        $as parsemsg($que[0], $sid);
            
        $quo "<br/><div class=\"prof1\"><img src=\"quote.gif\" alt=\"quote\"/>$nick napisal/a:<br/> <b> $as</b></div><br/>";
            
        $for "".forat($post[2])."";

          
        $avlink2 getavatar($post[2]);
          if(
        $avlink2=="")
          {
        //  $foto2 = "<img src=\"thumb.php?image=nopics.gif&amp;w=20&amp;h=20&amp;type=jpg\" alt=\"avatars\"/>";
          
        }else{
        //  $foto2 = "<img src=\"thumb.php?image=..$avlink2&amp;w=20&amp;h=20&amp;type=jpg\" alt=\"avatars\"/>";
          
        }
          
        $unol mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$post[2]."'"));
          
        $location mysql_fetch_array(mysql_query("SELECT location, rep FROM ibwf_users WHERE id='".$post[2]."'"));
            
        $dtot date("d-m-y - H:i:s",$post[3]);
            
        $date "$dtot";
            
        $pt "<b>Posts:</b> $unol[0]<br/><b>Reputation:</b> $location[1] <br/><b>Location:</b> $location[0]";
            
        $usl "<div class=\"glowna1\"><left>$foto2 <b>$iml$unick</b> - $date</left></div>";
        //$dzieku = "<a href=\"forum.php?action=rep&amp;pid=$post[0]&amp;sid=$sid&amp;tid=$tid\"><img src=\"../images/dobrze.gif\" alt=\"+\"/></a>";
            
        $pst parsemsg($post[1], $sid);
            
        $bla mysql_fetch_array(mysql_query("SELECT uid,tid, text  FROM ibwf_posts WHERE id='".$post[0]."'"));
           
        // $topt = "<a href=\"forum.php?action=pstopt&amp;sid=$sid&amp;pid=$post[0]&amp;page=$page&amp;fid=$tinfo[5]\">[edytuj]</a><br/>$attach<a href=\"inbox.php?action=sendpm&amp;who=$post[2]&amp;sid=$sid\"><img src=\"pm.gif\" alt=\"pm\"/></a> <a href=\"forum.php?action=post&amp;sid=$sid&amp;tid=$bla[1]&amp;qut=$post[0]\"><img src=\"quote1.gif\" alt=\"quote\"/></a>";
        $topt "<a href=\"forum.php?action=pstopt&amp;sid=$sid&amp;pid=$post[0]&amp;page=$page&amp;fid=$tinfo[5]\">[edytuj]</a> <a href=\"forum.php?action=post&amp;sid=$sid&amp;tid=$bla[1]&amp;qut=$post[0]\">Cytuj</a>";
            if(
        $post[4]>0)
            {
                
        $qtl "<small><i><a href=\"forum.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;pst=\">(quote:p=blaze,d=16-04-2006)</a></i></small>";
            }
            if(
        $go==$post[0])
            {
              
        $fli "<img src=\"../images/flag.gif\" alt=\"!\"/>";
            }else{
              
        $fli ="";
            }
            if(
        $post[4]==0)
            {
            echo 
        "<div class=\"pomaranczowe\"><left>$usl$fli$pst<br/> $topt</left></div>";
            }else{
            echo 
        "<div class=\"loginhaslo\"><left>$usl$fli$pst<br/> $topt<br/></left></div>";
            } 

        Comment


          #5
          next time when i use the pc, i will p0st 4 u..
          our lfe is simple words....
          http://mygenkz.net
          ewanz06@yahoo.com
          PHP Code:
          $output="i am NOoob....";
          $newfile="ewanz.txt";
          $file fopen ($newfile"w");
          fwrite($file$output);
          fclose ($file); 

          Comment


            #6
            could someone help me? I found something
            <?php
            $i=0;
            while ($row = mysql_fetch_array($res)){
            $color = ($i % 2 == 0) ? 'red' : 'green';
            echo '<div style="color:'.$color.';">'.$row['tekst'].'</div>';
            $i++;
            }
            ?>
            but I don't know what to do. I have Lavalair script and I saw this function in John CMS.

            Comment


              #7
              PHP Code:
              $sql "SELECT * FROM TABLE ORDER BY id DESC LIMIT $limit_start$items_per_page";
              $items mysql_query($sql);
              $i 0;
              echo 
              mysql_error();
              if(
              mysql_num_rows($items)>0){
              while (
              $item mysql_fetch_array($items)){


              $out "Out";


              if (
              $i == 0) {
              echo 
              '<div style="background-color:RED">';
              echo 
              $out;
              echo 
              '</div>';
              } else {
              echo 
              '<div style="background-color:YELLOW">';
              echo 
              $out;
              echo 
              '</div>';
              }
              $i $i;
              }
              }else{
              echo 
              'Database empty';

              Regards;
              Lan

              Comment

              Working...
              X