VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Sveiki, kilo man toks klausimas ar galima padaryti kad forum_threads_list_panel Paneleje nickus rodytu ivairiomis spalvomis. Stai ka as noriu pasakyti:
1. Dbr yra taip:
2. As noriu kad butu taip:
1. Adminas - raudonas
2. Narys - Juodas
3. Uzbanintas narys - pilkas, uzbrauktas.
Stai mano forum_threads_list_panel :
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);
if (dbrows($result) != 0) {
$i = 0;
opentable($locale['025']);
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
if ($theme_width == "100%") echo "<td class='tbl2'><span class='small'><b>".$locale['030']."</b></span></td>\n";
echo "<td class='tbl2'><span class='small'><b>".$locale['031']."</b></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['033']."</b></span></td>
<td align='center' colspan='2' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['034']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)."' (".trimlink($data['forum_name'], 30).")</span></td>\n";
} else {
echo "<td width='100%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)." </a>(".trimlink($data['forum_name'], 30).")</span></td>\n";
}
echo "<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".($data['count_posts']-1)."</span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'><a href='".BASEDIR."narys,".$data['thread_lastuser']."'>".$data['user_name']."</a></span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span></td>
</tr>\n";
$i++;
}
if (iMEMBER) {
echo "<tr>\n<td align='center' colspan='5' class='tbl1'><span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['026']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['027']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/new_posts.php'>".$locale['028']."</a></span></td>\n</tr>\n";
}
echo "</table>\n";
closetable();
}
?>
|
tofy
VIP narys
Ekspertas
Pranešimai: 2602
Įstojęs: 2006 Bal. 25 21:04:00
|
man irgi praverstu
|
samsung123
Narys
Terminatorius
Pranešimai: 1610
Įstojęs: 2007 Spa. 15 17:10:09
|
man ir
|
tofy
VIP narys
Ekspertas
Pranešimai: 2602
Įstojęs: 2006 Bal. 25 21:04:00
|
bet nesu niekur mates tokio dalyko ant fusion cia ant bb buna ..
|
sniuff
Narys
Antras po Dievo
Pranešimai: 4491
Įstojęs: 2007 Geg. 14 16:05:52
|
Kaip suprasti ivairiomis, kad jos kas refresh keistusi ??
Imanoma kad nuo grupes
http://androider.info/ |
tofy
VIP narys
Ekspertas
Pranešimai: 2602
Įstojęs: 2006 Bal. 25 21:04:00
|
ne aplamai visa rodytu tas spalvas..
|
ozzWANTED
Administratorius
Legenda
Pranešimai: 8478
Įstojęs: 2006 Gru. 29 14:12:31
|
šitą dalį:
<a href='".BASEDIR."narys,".$data['thread_lastuser']."'>".$data['user_name']."</a>
Keisk į:
<a href='".BASEDIR."narys,".$data['thread_lastuser']."'>";
if($data['user_level'] > "101") {
echo "<span style='font-weight:bold;color:red;'>";
}
if($data['user_status'] == "1") {
echo "<span style='color:gray;'><s>";
}
echo $data['user_name'];
if($data['user_status'] == "1") {
echo "</s></span>";
}
if($data['user_level'] > "101") {
echo "</span>";
}
echo "</a>
BR#1, Most Wanted
Redagavo ozzWANTED 2008 Vas. 23 21:02:56 |
tofy
VIP narys
Ekspertas
Pranešimai: 2602
Įstojęs: 2006 Bal. 25 21:04:00
|
radau.. bet nikas nepasiketie man ...splavos kaskas ten biski pasikete bet ne tas ko reikia
|
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Man irgi kazkodel niekas nepasikeite
|
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Tai gal kas zino kaip padaryti? Nes man kaip sake ozzWANTED nieko nesikeicia...
|
Dandžu
Narys
Ekspertas
Pranešimai: 3265
Įstojęs: 2007 Lie. 23 13:07:47
|
Viskas keičiasi kaip ozzWANTED sakė.
|
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Man tai neveikia pats isbandziau.
Gal reikia naudoti sita koda:
if($data[user_level]==103){<br />
echo "<a style='color:#FF3300;' href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'><B>".$data['user_name']."</B></a><br>";<br />
}<br />
else if($data[user_level]==102){<br />
echo "<a style='color:#000066;' href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'><B>".$data['user_name']."</B></a><br>";<br />
}<br />
else{<br />
echo "<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>";<br />
<br />
};<br />
<br />
echo "<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>n";
Jis naudojamas kad admino nickas forume butu kitos spalvos o man reikia kad butu sioje paneleje. gal kaip nors ji pakeist reikia?
103 - Super Adminas
102 - Adminas
101 - Narys
|
bad_user
Narys
Antras po Dievo
Pranešimai: 4956
Įstojęs: 2007 Spa. 26 20:10:01
|
Naudok šitaip viska nuskaites iš DB:
Manau nuskaityti mokėsi kad rodytu ne visiems o tik to nario... :)
while ($data = dbarray($result)) {
if ($data[user_level] == "103") {
$userx = "<font color='#F75013'><b>@".$data[user_name]."</b></font>";
}else if ($data[user_level] == "102") {
$userx = "<font color='#B5DE21'><b>^".$data[user_name]."</b></font>";
}else if ($data[user_level] == "101") {
$userx = "<font color='#FFFFFF'><b>~".$data[user_name]."</b></font>";
}
visas tavo kodas kur bus nick spalvos
}
Ir ten kur reiks to nick naudok ne $data[user_name] o $userx kintamaji.
:)
Rules: 21 & 22 Read first!
Redagavo bad_user 2008 Kov. 8 15:03:10 |
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Na man dar neiseina paciam padaryti kaip tu sakei Song. Taiva as darau taip:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if ($data[user_level] == "103") {
$userx = "<font color='#F75013'><b>".$data[user_name]."</b></font>";
}else if ($data[user_level] == "102") {
$userx = "<font color='#B5DE21'><b>".$data[user_name]."</b></font>";
}else if ($data[user_level] == "101") {
$userx = "<font color='#FFFFFF'><b>".$data[user_name]."</b></font>";
}
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);
if (dbrows($result) != 0) {
$i = 0;
opentable($locale['025']);
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
if ($theme_width == "100%") echo "<td class='tbl2'><span class='small'><b>".$locale['030']."</b></span></td>\n";
echo "<td class='tbl2'><span class='small'><b>".$locale['031']."</b></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['033']."</b></span></td>
<td align='center' colspan='2' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['034']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)."' (".trimlink($data['forum_name'], 30).")</span></td>\n";
} else {
echo "<td width='100%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)." </a>(".trimlink($data['forum_name'], 30).")</span></td>\n";
}
echo "<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".($data['count_posts']-1)."</span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'><a href='".BASEDIR."narys,".$data['thread_lastuser']."'>$userx</a>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span></td>
</tr>\n";
$i++;
}
if (iMEMBER) {
echo "<tr>\n<td align='center' colspan='5' class='tbl1'><span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['026']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['027']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/new_posts.php'>".$locale['028']."</a></span></td>\n</tr>\n";
}
echo "</table>\n";
closetable();
}
?>
Bet tada pas mane isvis nerodo nicko:
|
bad_user
Narys
Antras po Dievo
Pranešimai: 4956
Įstojęs: 2007 Spa. 26 20:10:01
|
Palauk aš bėgu dabar ir poto parašysiu kaip turi buti...
Rules: 21 & 22 Read first! |
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Na tikrai tikiuosi kad tu man padesi issprest sia problema
|
bad_user
Narys
Antras po Dievo
Pranešimai: 4956
Įstojęs: 2007 Spa. 26 20:10:01
|
Prašom:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name,user_level, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);
if (dbrows($result) != 0) {
$i = 0;
opentable($locale['025']);
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
if ($theme_width == "100%") echo "<td class='tbl2'><span class='small'><b>".$locale['030']."</b></span></td>\n";
echo "<td class='tbl2'><span class='small'><b>".$locale['031']."</b></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['033']."</b></span></td>
<td align='center' colspan='2' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['034']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($data[user_level] == "103") {
$userx = "<font color='#F75013'><b>@".$data[user_name]."</b></font>";
}else if ($data[user_level] == "102") {
$userx = "<font color='#B5DE21'><b>^".$data[user_name]."</b></font>";
}else if ($data[user_level] == "101") {
$userx = "<font color='#FFFFFF'><b>~".$data[user_name]."</b></font>";
}
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)."' (".trimlink($data['forum_name'], 30).")</span></td>\n";
} else {
echo "<td width='100%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)." </a>(".trimlink($data['forum_name'], 30).")</span></td>\n";
}
echo "<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".($data['count_posts']-1)."</span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'><a href='".BASEDIR."narys,".$data['thread_lastuser']."'>$userx</a>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span></td>
</tr>\n";
$i++;
}
if (iMEMBER) {
echo "<tr>\n<td align='center' colspan='5' class='tbl1'><span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['026']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['027']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/new_posts.php'>".$locale['028']."</a></span></td>\n</tr>\n";
}
echo "</table>\n";
closetable();
}
?>
Rules: 21 & 22 Read first!
Redagavo bad_user 2008 Kov. 8 22:03:18 |
VeNoM
Narys
Margas
Pranešimai: 102
Įstojęs: 2007 Rugs. 22 14:09:50
|
Aciu lb viskas veikia.
|
bad_user
Narys
Antras po Dievo
Pranešimai: 4956
Įstojęs: 2007 Spa. 26 20:10:01
|
Prašom... Jei netingi gali ir mano hostui sms nusiusti už tai..
Rules: 21 & 22 Read first! |