Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: hide/show forum post

Parašė megar· 2011 Lie. 5 11:07:46
#1

I profili esu isidejas includ'a kad rodytu 5 paskutinius forumo pranesimus bet daug vietos uziima noriu padaryti kad hide\show butu parasiau koda turetu veikti bet neveikia ... ka padariau

echo "<td width='1%' align='left' class='tbl2' style='white-space:nowrap'><b><p id=\"salutation\">".$locale['fp_03']."

".$user_data['user_name']."</p></b></td>\n";

ir is virsaus ir apacios uzrasiau
echo "<p>";
echo "</p>";



 
echo "
<html>
<head>
<script>
function toggleNext(el) {
 var next=el.nextSibling;
 while(next.nodeType != 1) next=next.nextSibling;
 next.style.display=((next.style.display==\"none\") ? \"block\" : \"none\");
}
function toggleNextById(el) {
 var ccn=\"clicker\";
 var clicker=document.getElementById(el);
 clicker.className+=\" \"+ccn;
 clicker.onclick=function() {toggleNext(this)}
 toggleNext(clicker);
}
window.onload=function() {toggleNextById('salutation')}
 
</script>
<style type=\"text/css\">
.clicker {
cursor:pointer;
color:blue;
}
</style>
</head>
";



if (!defined("IN_FUSION")) { die("Access Denied"); }
if (!file_exists(LOCALE.LOCALESET."user_fields/user_forumposts.php")) { include LOCALE."English/user_fields/user_forumposts.php"; }
 
if ($profile_method == "input") {
} elseif ($profile_method == "display") {
echo "<p>";
	echo "</table>\n";
	echo "<div style='margin:0px'></div>\n";
	echo "<table cellpadding='0' cellspacing='0' width='400' class='tbl-border center'>\n";
	echo "<tr>\n";
 
	echo "<td width='1%' align='left' class='tbl2' style='white-space:nowrap'><b><p id=\"salutation\">".$locale['fp_03']." 
 
".$user_data['user_name']."</p></b></td>\n";
	echo "</tr>\n";
	echo "</table>\n";
	echo "<table cellpadding='0' cellspacing='0' width='400' class='tbl-border center'>\n";
	echo "<tr>\n";
	echo "<td class='tbl2' align='center' width='40%'>".$locale['fp_04']."\n";
	echo "<td class='tbl2' align='center' width='60%'>".$locale['fp_05']."\n";
	echo "</tr>\n";
	$rows = 0;
 
	$prequest = dbquery("SELECT * FROM ".DB_POSTS." WHERE post_author='".$user_data['user_id']."' ORDER BY post_datestamp DESC LIMIT 0,10");
	while ($pdata = dbarray($prequest)) {
		$frequest = dbquery("SELECT * FROM ".DB_FORUMS." WHERE ".groupaccess('forum_access')." AND forum_id='".$pdata['forum_id']."' ORDER BY 
 
forum_order");
		$fdata = dbarray($frequest);
		$trequest = dbquery("SELECT * FROM ".DB_THREADS." WHERE thread_id='".$pdata['thread_id']."'");
		$tdata = dbarray($trequest);
		if ($fdata['forum_name'] != "") {				
			if ($tdata['thread_subject'] != "") {
				$rows = $rows+1;
				echo "<tr>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
				echo "<td class='tbl2' align='left' width='55%'><i>".$fdata['forum_name']."</i>\n";
				echo "<td class='tbl2' align='left' width='60%'><a 
 
href='".FORUM."viewthread.php?thread_id=".$pdata['thread_id']."&amp;pid=".$pdata['post_id']."#post_".$pdata['post_id']."' 
 
title='".$tdata['thread_subject']."'>".trimlink($tdata['thread_subject'], 23)."</a>\n";
 
 
 
 
 
 
				echo "</tr>\n";
			}
		} else { 
			if ($rows != 0) { 
				$rows = $rows-1; 
			} else { 
				$rows = $rows; 
			}
		}
	}	
	if ($rows == 0) { 
		echo "</table>\n";
		echo "<table cellpadding='0' cellspacing='0' width='400' class='tbl-border center'>\n";
		echo "<tr>\n";
		echo "<td class='tbl2' align='center'>".$user_data['user_name']." ".$locale['fp_07']."</td>\n";
		echo "</tr>\n";
	}
 
 
 
 
 
 
 
echo "</p>";
 
 
 
 
 
} elseif ($profile_method == "validate_insert") {
} elseif ($profile_method == "validate_update") {
}
 
 
 
 
 
 
 
 
 
 
?>