two different div's in forum. how?

Started on the old forum in August 2010 · view the original in the archive · old links redirect here

#div-forum-two

6 replies · 785 views · started 16 years ago · 1 min read

4 participants
subzero Super moderator Fellow · 3,954 posts #2

{ echo "$link"; }else{ echo "$link"; }

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... _______…

ewanz Developer · 187 posts #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

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
dominik92r Junior · 38 posts #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

$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&w=20&h=20&type=jpg\" alt=\"avatars\"/>";
  }else{
//  $foto2 = "<img src=\"thumb.php?image=..$avlink2&w=20&h=20&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&pid=$post[0]&sid=$sid&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&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">[edytuj]</a><br/>$attach<a href=\"inbox.php?action=sendpm&who=$post[2]&sid=$sid\"><img src=\"pm.gif\" alt=\"pm\"/></a> <a href=\"forum.php?action=post&sid=$sid&tid=$bla[1]&qut=$post[0]\"><img src=\"quote1.gif\" alt=\"quote\"/></a>";
$topt = "<a href=\"forum.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">[edytuj]</a> <a href=\"forum.php?action=post&sid=$sid&tid=$bla[1]&qut=$post[0]\">Cytuj</a>";
    if($post[4]>0)
    {
        $qtl = "<small><i><a href=\"forum.php?action=viewtpc&sid=$sid&tid=$tid&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>";
    }
ewanz Developer · 187 posts #5

next time when i use the pc, i will p0st 4 u..

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
dominik92r Junior · 38 posts #6

could someone help me? I found something

<?php $i=0; while ($row = mysql_fetch_array($res)){ $color = ($i % 2 == 0) ? 'red' : 'green'; echo ''.$row['tekst'].''; $i++; } ?>

but I don't know what to do. I have Lavalair script and I saw this function in John CMS.

malaysiawap Junior · 14 posts #7
$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 = 1 - $i;
}
}else{
echo 'Database empty';
}

Regards; Lan

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close