Reklama 400x60
PHP: hide/show forum post
Autorius: megar
Peržiūrų: 538
megar
Narys
Buldozeris
Pranešimai: 306
Įstojęs: 2009 Rugs. 15 17:09:46
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 ointer;
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' ] . "&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" ) {
}
?>
Peršokti į forumą:
Nebeegzistuojančios svetainės
Žaliems
Bendri PHP-F klausimai
WordPress
Kiti PHP, HTML, MySQL klausimai
Expert PHP, MySQL klausimai
Kitos TVS
C#, Python, Java, JS, C++ klausimai
Naujų modų pristatymai
Mods, Panels & Infusions
Themes
Dalinuosi, dovanoju!
Jūsų saitai
Klausimai apie domenus ir hostingus
VPS/DS serverių konfigūravimas ir valdymas
Viskas apie skaitliukus, top'us ir lankomumą
Dizaino konkursai
Parduodu - perku dizainą, banerį
Parduodu - perku - keičiuosi reklama
Parduodu - perku domeną, tinklapį
Siūlau - ieškau hostingo/VPS serverio
Parduodu - perku skriptą, modifikaciją, tvs
Socialiniai tinklai - Facebook ir kiti
Legalus verslas, teisiniai klausimai
Visa kita kas susiję su darbu ir pinigais
LTStartups.com - Lietuvos startuolių bendruomenė
Off-Topic diskusijos
IT naujienos
Portalo informacija
Narių pasiūlymai
Geležis ir programinė įranga
Grafika
Out Of Place
Su e-verslu nesusijęs darbas ir prekyba
Dalinuosi, dovanoju!