Tarih: 2005-03-20, 18:51:00 Mesaj konusu: Kimler Bağlı Bloğuna eklenti isteği
Netopsiyonda bulunan kimler bağlı bloğuna bir eklenti istiyorum bunu şöyle anlatayım:
Bu Bağlı olan insanların listesi olarak sayalım
----------------------------------
aaksoy {Dışarda}
Lowflyer {Önemli İşim Var}
TOTAL90 {total90.tr.cx}
Efendymurat {maynak.net}
----------------------------------
burda {} işaretlerinin arasına isteyen istediği yazıyı yazabilmesini istiyorum aynı Msn Messengerdaki gibi olcak ama sadece site messengerda gözükcek vede ismin yanında yani bi anlamda durumunu belirtcek bunu yaparsanız çok sevinirim şimdiden teşekkürler!!
Tarih: 2005-03-22, 09:31:51 Mesaj konusu: Re: Kimler Bağlı Bloğuna eklenti isteği
Your Account ta küçük bir kutucuk içinde oraya adam ne yazmak istiyorsa onu ama karakter sınırlamalı bir şekilde yani bunu bir kere yazdığında değiştirmediği sürece hep gözükecek !
if (($userinfo[newsletter] == 1) AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[newsletter] == 1))) {
echo "<i>"._SUBSCRIBED."</i><br>";
} elseif (($userinfo[newsletter] == 0) AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[newsletter] == 0))) {
echo "<i>"._NOTSUBSCRIBED."</i><br>";
}
if (is_user($user) AND $cookie[1] == "$username" OR is_admin($admin)) {
$numpoints = $db->sql_fetchrow($db->sql_query("SELECT points FROM ".$user_prefix."_users WHERE username='$cookie[1]'"));
echo ""._YOUHAVEPOINTS." <b>$numpoints[points]</b><br>";
}
if (is_active("Journal") AND $cookie[1] != $username) {
$sql3 = "SELECT jid FROM ".$prefix."_journal WHERE aid='$username' AND status='yes' ORDER BY pdate,jid DESC LIMIT 0,1";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$jid = $row3[jid];
if ($jid != "" AND isset($jid)) {
echo "[ <a href=\"modules.php?name=Journal&file=search&bywhat=aid&forwhat=$username\">"._READMYJOURNAL."</a> ]<br>";
}
}
if (is_admin($admin)) {
echo "[ <a href=\"admin.php?op=modifyUser&chng_uid=$userinfo[user_id]\">"._EDITUSER."</a> ]<br>";
}
if (((is_user($user) AND $cookie[1] != $username) OR is_admin($admin)) AND is_active("Private_Messages")) { echo "<br>[ <a href=\"modules.php?name=Private_Messages&mode=post&u=$userinfo[user_id]\">"._USENDPRIVATEMSG." $username_pm</a> ]<br>\n"; }
echo "</center></font>";
} else {
echo "<center>"._NOINFOFOR." $username</center>";
}
CloseTable();
if ($my_headlines == 1 AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._MYHEADLINES."</b><br><br>"
.""._SELECTASITE."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
."<input type=\"hidden\" name=\"username\" value=\"$username\">"
."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
."<input type=\"hidden\" name=\"url\" value=\"0\">"
."<select name=\"hid\" onChange='submit()'>\n"
."<option value=\"0\">"._SELECTASITE2."</option>";
$sql4 = "SELECT hid, sitename FROM ".$prefix."_headlines ORDER BY sitename";
$headl = $db->sql_query($sql4);
while($row4 = $db->sql_fetchrow($headl)) {
$nhid = $row4[hid];
$hsitename = $row4[sitename];
if ($hid == $nhid ) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"$nhid\" $sel>$hsitename</option>\n";
}
echo "</select></form>"
.""._ORTYPEURL."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
."<input type=\"hidden\" name=\"username\" value=\"$username\">"
."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
."<input type=\"hidden\" name=\"hid\" value=\"0\">"
."<input type=\"text\" name=\"url\" size=\"40\" maxlength=\"200\" value=\"http://\"> "
."<input type=\"submit\" value=\""._GO."\"></form>"
."</center><br>";
if ($hid != 0 OR ($hid == 0 AND $url != "0" AND $url != "http://") AND $url != "") {
if ($hid != 0) {
$sql5 = "SELECT sitename, headlinesurl FROM ".$prefix."_headlines WHERE hid='$hid'";
$result5 = $db->sql_query($sql5);
$row5 = $db->sql_fetchrow($result5);
$nsitename = $row5[sitename];
$url = $row5[headlinesurl];
$title = $nsitename;
$siteurl = eregi_replace("http://", "", $url);
$siteurl = explode("/", $siteurl);
} else {
if (!ereg("http://", $url)) {
$url = "http://$url";
}
$siteurl = eregi_replace("http://", "", $url);
$siteurl = explode("/", $siteurl);
$title = "http://$siteurl[0]";
}
$rdf = parse_url($url);
$fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15);
if (!$fp) {
$content = "<center><font class=\"content\">"._RSSPROBLEM."</font></center>";
}
if ($fp) {
fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0\r\n");
fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n");
$string = "";
while(!feof($fp)) {
$pagetext = fgets($fp,300);
$string .= chop($pagetext);
}
fputs($fp,"Connection: close\r\n\r\n");
fclose($fp);
$items = explode("</item>",$string);
$content = "<font class=\"content\">";
for ($i=0;$i<10;$i++) {
$link = ereg_replace(".*<link>","",$items[$i]);
$link = ereg_replace("</link>.*","",$link);
$title2 = ereg_replace(".*<title>","",$items[$i]);
$title2 = ereg_replace("</title>.*","",$title2);
if ($items[$i] == "" AND $cont != 1) {
$content = "<center>"._RSSPROBLEM."</center>";
} else {
if (strcmp($link,$title2) AND $items[$i] != "") {
$cont = 1;
$content .= "<img src=\"images/arrow.gif\" border=\"0\" hspace=\"5\"><a href=\"$link\" target=\"new\">$title2</a><br>\n";
}
}
}
}
if ($content != "") {
OpenTable2();
echo "<center><b>"._HEADLINESFROM." <a href=\"http://$siteurl[0]\" target=\"new\">$title</a></b></center><br>";
echo "$content";
CloseTable2();
} elseif (($cont == 0) OR ($content == "")) {
OpenTable2();
echo "<center>"._RSSPROBLEM."</center><br>";
CloseTable2();
}
echo "<br>";
}
CloseTable();
}
if ($broadcast_msg == 1 AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._BROADCAST."</b><br><br>"._BROADCASTTEXT."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"who\" value=\"$username\">"
."<input type=\"hidden\" name=\"op\" value=\"broadcast\">"
."<input type=\"text\" size=\"60\" maxlength=\"255\" name=\"the_message\"> <input type=\"submit\" value=\""._SEND."\">"
."</form></center>";
CloseTable();
}
if (is_active("Private_Messages") AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._PRIVATEMESSAGES."</b><br><br>";
$numrow = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$userinfo[user_id]' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')"));
if (is_active("Members_List")) {
$mem_list = "<a href=\"modules.php?name=Members_List\">"._BROWSEUSERS."</a>";
} else {
$mem_list = "";
}
if (is_active("Search")) {
$mod_search = "<a href=\"modules.php?name=Search&type=users\">"._SEARCHUSERS."</a>";
} else {
$mod_search = "";
}
if ($mem_list != "" AND $mod_search != "") { $a = " | "; } else { $a = ""; }
if ($mem_list != "" OR $mod_search != "") {
$links = "[ $mem_list $a $mod_search ]";
} elseif ($mem_list == "" AND $mod_search == "") {
$links = "";
}
echo ""._YOUHAVE." <a href=\"modules.php?name=Private_Messages\"><b>$numrow</b></a> "._PRIVATEMSG."<br><br>"
."<form action=\"modules.php?name=Private_Messages\" method=\"post\">"
.""._USENDPRIVATEMSG.": <input type=\"text\" name=\"pm_username\" size=\"20\"> $links"
."<input type=\"hidden\" name=\"send\" value=\"1\">"
."</form></center>";
CloseTable();
}
if ($articlecomm == 1) {
echo "<br>";
OpenTable();
echo "<b>"._LAST10COMMENTS." $userinfo[username]:</b><br>";
$sql6 = "SELECT tid, sid, subject FROM ".$prefix."_comments WHERE name='$userinfo[username]' ORDER BY tid DESC LIMIT 0,10";
$result6 = $db->sql_query($sql6);
while($row6 = $db->sql_fetchrow($result6)) {
$tid = $row6[tid];
$sid = $row6[sid];
$subject = $row6[subject];
echo "<li><a href=\"modules.php?name=News&file=article&thold=-1&mode=flat&order=0&sid=$sid#$tid\">$subject</a><br>";
}
CloseTable();
}
echo "<br>";
OpenTable();
echo "<b>"._LAST10SUBMISSIONS." $userinfo[username]:</b><br>";
$sql7 = "SELECT sid, title FROM ".$prefix."_stories WHERE informant='$userinfo[username]' ORDER BY sid DESC LIMIT 0,10";
$result7 = $db->sql_query($sql7);
while($row7 = $db->sql_fetchrow($result7)) {
$sid = $row7[sid];
$title = $row7[title];
echo "<li><a href=\"modules.php?name=News&file=article&sid=$sid\">$title</a><br>";
}
CloseTable();
include("footer.php");
}
Sonra PHPMYADMIN den su nuke_users Tabelaya sunu:durum ekleyin
asagidaki gibi
Simdiye kadar olani ile kullanici durumu artik bagli yazmiyacak
o denilen kutuya kim ne yazdi ise o görülecek.
Geriye kalan sql sorusu ile Kim Neredeye eklemek.
Tarih: 2005-03-24, 00:25:05 Mesaj konusu: Re: Kimler Bağlı Bloğuna eklenti isteği
tebrikler salih helal olsun beyler ayrıca salihin diğer yazdıgı kodları görseniz kafayı yersiniz adam aşmış durumda her gün bi tane değişik bişey yapıyor : ) tekrar tebrikler
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız