help me on this coding...

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

5 replies · 521 views · started 16 years ago · 1 min read

4 participants
metulj Super moderator Principal · 1,726 posts #2

DiL wrote: can any one plz tel me how can i show 2 shouts in my site..

how hard it can be to copy/paste entire shout code ? if it's current code like $shout... copy all and make it $shout1... want to display three of them?? copy/paste one more time and make it like $shout2...

you can also simply make one public (or two.. one limited and one open for all) and another one only for mods and admins...

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

centi Developer · 159 posts #5

hey you pls learn to copy n past. neway here!! one thing i disabled the bbcodes.. enable it yo self

to index.php

echo getshoutbox($sid);

replace the function in core.php

function getshoutbox($sid){
$shbox = "";
$lshout = mysql_query("SELECT shout, shouter, id  FROM ibwf_shouts ORDER BY shtime DESC LIMIT 2");
while ($shots = mysql_fetch_array($lshout))
{
$shnick = getnick_uid($shots[1]);
if(isonline($shots[1])){
	$bulb="<img src=\"../images/onl.gif\" alt=\"\"/>";
}
else{
	$bulb="<img src=\"../images/ofl.gif\" alt=\"\"/>";
}
//////////////////////////////////////////////////////////////////// add sex to shouts code
$nick = getnick_uid($sid);
$who = $_GET['who'];
$action = $_GET['action'];
$uid = getuid_sid($sid);

$usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
if($usex[0]=='M'){
$usex = "";
}else if($usex[0]=='F'){
$usex = "";
}

$shbox .= "$bulb  <i>$usex<a href=\"index.php?action=viewuser&sid=$sid&who=$shots[1]\">".$shnick."</a></i>: ";
$fshout = htmlspecialchars($shots[0]);

$fshout = getsmilies($fshout);
//$fshout = parsepm($fshout, $sid);
$shbox .= $fshout;
if (ismod(getuid_sid($sid))){
$shbox .= " <a href=\"modproc.php?action=delsh&sid=$sid&shid=$shots[2]\">[x]</a>";
}
$shbox .= "<br/>";
}
if (isonline(getuid_sid($sid))){
	$shbox .= "<a href=\"index.php?action=shout&sid=$sid\">Shout </a>";
  $shbox .= "|";
  $shbox .= "<a href=\"lists.php?action=shouts&sid=$sid\"> More</a>";
}else{
$shbox .= "<a href=\"index.php?action=shout&sid=$sid\">Shout</a>";
  $shbox .= "|";
  $shbox .= "<a href=\"lists.php?action=shouts&sid=$sid\">More</a>";
}
$shbox .= "";
return $shbox;
}

😳 .................................... http://photomag.lk/ .................................... 🤨

centi Developer · 159 posts #6

2 shouts lava

hey you pls learn to copy n past. neway here!! one thing i disabled the bbcodes.. enable it yo self

to index.php

echo getshoutbox($sid);

replace the function in core.php

function getshoutbox($sid){
$shbox = "";
$lshout = mysql_query("SELECT shout, shouter, id  FROM ibwf_shouts ORDER BY shtime DESC LIMIT 2");
while ($shots = mysql_fetch_array($lshout))
{
$shnick = getnick_uid($shots[1]);
if(isonline($shots[1])){
	$bulb="<img src=\"../images/onl.gif\" alt=\"\"/>";
}
else{
	$bulb="<img src=\"../images/ofl.gif\" alt=\"\"/>";
}
//////////////////////////////////////////////////////////////////// add sex to shouts code
$nick = getnick_uid($sid);
$who = $_GET['who'];
$action = $_GET['action'];
$uid = getuid_sid($sid);

$usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
if($usex[0]=='M'){
$usex = "";
}else if($usex[0]=='F'){
$usex = "";
}

$shbox .= "$bulb  <i>$usex<a href=\"index.php?action=viewuser&sid=$sid&who=$shots[1]\">".$shnick."</a></i>: ";
$fshout = htmlspecialchars($shots[0]);

$fshout = getsmilies($fshout);
//$fshout = parsepm($fshout, $sid);
$shbox .= $fshout;
if (ismod(getuid_sid($sid))){
$shbox .= " <a href=\"modproc.php?action=delsh&sid=$sid&shid=$shots[2]\">[x]</a>";
}
$shbox .= "<br/>";
}
if (isonline(getuid_sid($sid))){
	$shbox .= "<a href=\"index.php?action=shout&sid=$sid\">Shout </a>";
  $shbox .= "|";
  $shbox .= "<a href=\"lists.php?action=shouts&sid=$sid\"> More</a>";
}else{
$shbox .= "<a href=\"index.php?action=shout&sid=$sid\">Shout</a>";
  $shbox .= "|";
  $shbox .= "<a href=\"lists.php?action=shouts&sid=$sid\">More</a>";
}
$shbox .= "";
return $shbox;
}

😳 .................................... http://photomag.lk/ .................................... 🤨

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