Navigation
Supportsider
Senest Online
HenningS14:42:03
olelau 2 Dage
helmuth 4 Dage
tyson 5 Dage
zepder 6 Dage
Henrik Bendtsen 2 Uger
flj 3 Uger
orgermer 4 Uger
Didos 5 Uger
BronX 5 Uger
Besøgende
Gæster online: 1

Brugere online: 0

Antal brugere: 172
Nyeste bruger: Michael Mogensen
Se indlæg
PHP-Fusion - Danmark » PHP-Fusion version 6 » Elementer v6
 Udskriv debat
Element: Top Forum Brugere
deuce
Fantastisk! Hvis jeg gerne vi implementere dette element på Forum/index.php siden? hvor og hvor meget af ovenstående kode skal jeg indsætte? (evt. også hvor?)

... undskyld at vi bevæger os lidt udenfor emnet ...

/forum/index.php:


/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: index.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."forum/main.php";

if (!isset($lastvisited) || !isnum($lastvisited)) { $lastvisited = time(); }

add_to_title($locale['global_200'].$locale['400']);

opentable($locale['400']);
echo "\n\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";

$forum_list = ""; $current_cat = "";
$result = dbquery(
   "SELECT f.*, f2.forum_name AS forum_cat_name, u.user_id, u.user_name
   FROM ".DB_FORUMS." f
   LEFT JOIN ".DB_FORUMS." f2 ON f.forum_cat = f2.forum_id
   LEFT JOIN ".DB_USERS." u ON f.forum_lastuser = u.user_id
   WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
if (dbrows($result) != 0) {
   while ($data = dbarray($result)) {
      if ($data['forum_cat_name'] != $current_cat) {
         $current_cat = $data['forum_cat_name'];
         echo "\n\n\n";
      }
      $moderators = "";
      if ($data['forum_moderators']) {
         $mod_groups = explode(".", $data['forum_moderators']);
         foreach ($mod_groups as $mod_group) {
            if ($moderators) $moderators .= ", ";
            $moderators .= $mod_group<101 ? "".getgroupname($mod_group)."" : getgroupname($mod_group);
         }
      }
      $forum_match = "\|".$data['forum_lastpost']."\|".$data['forum_id'];
      if ($data['forum_lastpost'] > $lastvisited) {
         if (iMEMBER && preg_match("({$forum_match}\.|{$forum_match}$)", $userdata['user_threads'])) {
            $fim = "'".$locale['561']."'";
         } else {
            $fim = "'".$locale['560']."'";
         }
      } else {
         $fim = "'".$locale['561']."'";
      }
      echo "\n";
      echo "\n";
      echo "\n";
      echo "\n";
      echo "\n";
      echo "\n\n";
      } else {
         echo showdate("forumdate", $data['forum_lastpost'])."
\n";
         echo "".$locale['406']."".$data['user_name']."\n";
         echo "\n";
      }
   }
} else {
   echo "\n\n\n";
}
echo "
".$locale['401']."".$locale['402']."".$locale['403']."".$locale['404']."
".$data['forum_cat_name']."
$fim".$data['forum_name']."
\n";
      if ($data['forum_description'] || $moderators) {
         echo "".$data['forum_description'].($data['forum_description'] && $moderators ? "
\n" : "");
         echo ($moderators ? "".$locale['411']."".$moderators."
\n" : "\n")."\n";
      }
      echo "
".$data['forum_threadcount']."".$data['forum_postcount']."";
      if ($data['forum_lastpost'] == 0) {
         echo $locale['405']."
".$locale['407']."
\n\n\n";
echo "\n\n

\n";
echo "'".$locale['560']."' - ".$locale['409']."
\n";
echo "'".$locale['561']."' - ".$locale['410']."\n";
echo "
\n";
echo "
\n";
echo "\n";
echo "\n";
echo "\n";
echo "
\n
\n";
closetable();

require_once THEMES."templates/footer.php";
?>

 
http://www.neworleanssaints.dk
Spring til debat: