Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Forum spalvos

Parašė VeNoM· 2008 Vas. 23 21:02:37
#1

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();
}
?>



Redagavo ozzWANTED· 2008 Vas. 23 21:02:32

Parašė tofy· 2008 Vas. 23 21:02:02
#2

man irgi praverstu :)

Parašė samsung123· 2008 Vas. 23 21:02:30
#3

man ir :D

Parašė tofy· 2008 Vas. 23 21:02:04
#4

bet nesu niekur mates tokio dalyko ant fusion cia ant bb buna ..

Parašė sniuff· 2008 Vas. 23 21:02:58
#5

Kaip suprasti ivairiomis, kad jos kas refresh keistusi ??
Imanoma kad nuo grupes

Parašė tofy· 2008 Vas. 23 21:02:05
#6

ne aplamai visa rodytu tas spalvas..

Parašė ozzWANTED· 2008 Vas. 23 21:02:40
#7

š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>

Redagavo ozzWANTED· 2008 Vas. 23 21:02:56

Parašė tofy· 2008 Vas. 23 21:02:43
#8

radau.. bet nikas nepasiketie man ...splavos kaskas ten biski pasikete bet ne tas ko reikia

Redagavo tofy· 2008 Vas. 23 21:02:30

Parašė VeNoM· 2008 Vas. 24 10:02:15
#9

Man irgi kazkodel niekas nepasikeite :(

Parašė VeNoM· 2008 Kov. 1 10:03:14
#10

Tai gal kas zino kaip padaryti? :? Nes man kaip sake ozzWANTED nieko nesikeicia... :|

Parašė Dandžu· 2008 Kov. 1 10:03:42
#11

Viskas keičiasi kaip ozzWANTED sakė.

Parašė VeNoM· 2008 Kov. 8 15:03:23
#12

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

Parašė bad_user· 2008 Kov. 8 15:03:37
#13

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.
:)

Redagavo bad_user· 2008 Kov. 8 15:03:10

Parašė VeNoM· 2008 Kov. 8 16:03:40
#14

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:





Parašė bad_user· 2008 Kov. 8 16:03:04
#15

Palauk aš bėgu dabar ir poto parašysiu kaip turi buti... ;)

Parašė VeNoM· 2008 Kov. 8 20:03:02
#16

Na tikrai tikiuosi kad tu man padesi issprest sia problema ;)

Parašė bad_user· 2008 Kov. 8 22:03:08
#17

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();
}
?>



Redagavo bad_user· 2008 Kov. 8 22:03:18

Parašė VeNoM· 2008 Kov. 8 23:03:43
#18

Aciu lb viskas veikia. :)

Parašė bad_user· 2008 Kov. 8 23:03:12
#19

Prašom... Jei netingi gali ir mano hostui sms nusiusti už tai.. :]