PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 38943
Šiandien: 20
Prisijungę nariai
» Svečių: 5
» Narių: 0

» Viso narių: 10,235
» Naujausias: ruslanas tuk

Prisijungimų istorija:
tabux20:08:47
sanpernepamenu
Zbigniew@nepamenu
CepelinasXnepamenu
VV91DDnepamenu
Minusnepamenu
priezilviciunepamenu
EdvinasG1337nepamenu
rolandas94nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
Pask. modai
Prisijungti
Vardas

Slaptažodis



Dar ne narys?
Registruotis.

Pamiršai slaptažodį?
Prašyk naujo!.

Naujausi prašymai
[L] testas
Narių apklausa
Ar dar kuriate tinklalapius?

Ne
Ne
0% [0 Balsai]

Taip
Taip
88% [7 Balsai]

Naudojuosi socialiniais tinklais
Naudojuosi socialiniais tinklais
13% [1 Balsas]

Balsai: 8
Kad galėtum balsuoti, turi prisijungti.
Pradėta: 2022-05-29 19:54
Shoutbox
You must login to post a message.

2026-03-21 19:07

2025-07-13 17:07
svx, smagu kad dar atsiranda naujų narių Šypsosi2

2024-03-07 22:13
Oj Tabux… apkabinčiau už tą moderatorių 😁

2024-02-22 17:40
Šypsosi2 jo buvo laikai.. Senukai jau mes. Bega laikas greiciau nei noretusi. Smagu matyti kad uzsuka seni nariai, ne as vienas Šypsosi

2024-02-20 22:18
Zodziu.. Nostalgija. Sorry Tabux uz spam’a, netelpa viskas i viena shout’a. 😁

Shoutbox Archive
Peržiūrėti temą
 Spausdinti temą
Levelis
Anti-virus
#1 Spausdinti pranešimą
parašyta 2007-05-26 15:19
Pradinukas



Reputacija: 0

Pranešimai: 27
Įstojo: 2007-05-22

Kaip reikia padaryt, kad vartotojo lyg rodyt forume: stai faila

Viewthreads.php

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright 2002 - 2006 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
+----------------------------------------------------*/
require_once \"../maincore.php\";
require_once INCLUDES.\"forum_functions_include.php\";
require_once BASEDIR.\"subheader.php\";
require_once BASEDIR.\"side_left.php\";
include LOCALE.LOCALESET.\"forum/main.php\";

$posts_per_page = 20;

if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback(\"index.php\");

$result = dbquery(
   \"SELECT f.*, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   LEFT JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE f.forum_id='\".$forum_id.\"'\"
);
if (dbrows($result)) {
   $fdata = dbarray($result);
   if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback(\"index.php\");
} else {
   fallback(\"index.php\");
}
$can_post = checkgroup($fdata['forum_posting']);

$forum_mods = explode(\".\", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define(\"iMOD\", true); } else { define(\"iMOD\", false); }

$result = dbquery(\"SELECT * FROM \".$db_prefix.\"threads WHERE thread_id='\".$thread_id.\"' AND forum_id='\".$fdata['forum_id'].\"'\");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback(\"index.php\"); }

$caption = $fdata['forum_cat_name'].\" | \".$fdata['forum_name'].\"\";
$result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'\");

if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
   $flood = false;
   $message = stripinput(censorwords($_POST['message']));
   if ($message != \"\") {
      $result = dbquery(\"SELECT MAX(post_datestamp) AS last_post FROM \".$db_prefix.\"posts WHERE post_author='\".$userdata['user_id'].\"'\");
      if (dbrows($result) > 0) {
         $data = dbarray($result);
         if ((time() - $data['last_post']) < $settings['flood_interval']) {
            $flood = true;
            $result = dbquery(\"INSERT INTO \".$db_prefix.\"flood_control (flood_ip, flood_timestamp) VALUES ('\".USER_IP.\"', '\".time().\"')\");
            if (dbcount(\"(flood_ip)\", \"flood_control\", \"flood_ip='\".USER_IP.\"'\") > 4) {
               $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_status='1' WHERE user_id='\".$userdata['user_id'].\"'\");
            }
            fallback(\"viewforum.php?forum_id=$forum_id\");
         }
      }
      if (!$flood) {
         $sig = ($userdata['user_sig'] ? '1' :'0');
         $smileys = isset($_POST['disable_smileys']) ? \"0\" : \"1\";
         $subject = \"RE: \".$tdata['thread_subject'];
         $result = dbquery(\"UPDATE \".$db_prefix.\"forums SET forum_lastpost='\".time().\"', forum_lastuser='\".$userdata['user_id'].\"' WHERE forum_id='$forum_id'\");
         $result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_lastpost='\".time().\"', thread_lastuser='\".$userdata['user_id'].\"' WHERE thread_id='$thread_id'\");
         $result = dbquery(\"INSERT INTO \".$db_prefix.\"posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '\".$userdata['user_id'].\"', '\".time().\"', '\".USER_IP.\"', '0', '0')\");
         $newpost_id = mysql_insert_id();
         $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_posts=user_posts+1 WHERE user_id='\".$userdata['user_id'].\"'\");
         redirect(\"postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id\");
      }
   }
}

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

\n\";
if (iMEMBER && $can_post) {
   echo \"\n\";
}
echo \"
\".$settings['sitename'].\" | $caption\n\";
   if (!$tdata['thread_locked']) {
      echo \"'\".$locale['565'].\"'\n\";
   }
   echo \"'\".$locale['566'].\"'
\n\";

$rows = dbcount(\"(thread_id)\", \"posts\", \"thread_id='$thread_id'\");

if (isset($pid) && isNum($pid)) {
   $reply_count = dbcount(\"(post_id)\", \"posts\", \"thread_id='\".$tdata['thread_id'].\"' AND post_id<='\".$pid.\"'\");
   if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\";

if ($rows != 0) {
   $result = dbquery(
      \"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM \".$db_prefix.\"posts p
      LEFT JOIN \".$db_prefix.\"forum_attachments fa USING(post_id)
      LEFT JOIN \".$db_prefix.\"users u ON p.post_author = u.user_id
      LEFT JOIN \".$db_prefix.\"users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
      WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page\"
   );
   $numrows = dbrows($result);
   while ($data = dbarray($result)) {
      $message = $data['post_message'];
      if ($data['post_showsig']) { $message = $message.\"\n\n
\".$data['user_sig']; }
      if ($data['post_smileys']) { $message = parsesmileys($message); }
      $message = parseubb($message);
      $message = nl2br($message);
      if ($data['post_edittime'] != \"0\") {
         $edituser = \"\".$data['edit_name'].\"\";
         $edittime = showdate(\"forumdate\", $data['post_edittime']);
      }
      $is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < \"102\" ? true : false;
      echo \"












\n\";
   }
}

echo \"
\".$locale['501'].\" \".$data['post_subject'].\"

\".$data['user_name'].\"

\".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level'])).\"

\n\";
      if ($data['user_avatar'] != \"\") {
         echo \"'\".$locale['567'].\"'

\n\";
         $height = \"185\";
      } else {
         $height = \"70\";
      }
      echo \"\".$locale['502'].\" \".$data['user_posts'].\"
\n\";
      if ($data['user_location']) echo \"\".$locale['503'].\" \".$data['user_location'].\"
\n\";
      echo \"\".$locale['504'].\" \".showdate(\"%d.%m.%y\", $data['user_joined']).\"






\".$locale['505'].showdate(\"forumdate\", $data['post_datestamp']).\" \n\";
      if (iMEMBER && $can_post) {
         if (!$tdata['thread_locked']) {
            if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
            }
            echo \"'\".$locale['569'].\"'\n\";
            if (iMOD || iSUPERADMIN && $data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
         } else {
            if (iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
               if ($data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
            }
         }
      }
      echo \"


$message\";
      if ($data['attach_id']) {
         if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM.\"attachments/\".$data['attach_name'])) {
            echo \"
\n\".$data['user_name'].$locale['506'].\"

\n\";
         } else {
            echo \"
\n\".$data['user_name'].$locale['507'].\"
\n\".$data['attach_name'].\"\";
         }
      }
      if ($data['post_edittime'] != \"0\") {
         echo \"
\n\".$locale['508'].$edituser.$locale['509'].\"$edittime\";
      }
echo \"
\n\";
      if ($data['user_aim'] && file_exists(THEME.\"forum/aim.gif\")) {
         echo \"'\".$data['user_aim'].\"' \";
      }
      if ($data['user_icq']) {
         echo \"'\".$data['user_icq'].\"' \";
      }
      if ($data['user_msn']) {
         echo \"'\".$data['user_msn'].\"' \";
      }
      if ($data['user_yahoo']) {
         echo \"'\".$data['user_yahoo'].\"' \";
      }
      if ($data['user_web']) {
         if (!strstr($data['user_web'], \"http://\")) { $urlprefix = \"http://\"; } else { $urlprefix = \"\"; }
         echo \"'\".$data['user_web'].\"' \";
      }
      echo \"'\".$locale['571'].\"'
\n\";

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\n\";
$forum_list = \"\"; $current_cat = \"\";
$result = dbquery(
   \"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   INNER JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE \".groupaccess('f.forum_access').\" AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC\"
);
while ($data = dbarray($result)) {
   if ($data['forum_cat_name'] != $current_cat) {
      if ($current_cat != \"\") $forum_list .= \"\n\";
      $current_cat = $data['forum_cat_name'];
      $forum_list .= \"\n\";
   }
   $sel = ($data['forum_id'] == $fdata['forum_id'] ? \" selected\" : \"\");
   $forum_list .= \"\n\";
}
$forum_list .= \"
\n\";
echo \"\n\";

if (iMEMBER && $can_post) {
   if (iMOD || iSUPERADMIN) {
      echo \"
\n\";
   }
}
echo \"
\".$locale['540'].\"



\".$locale['520'].\"




\n\";
if (iMEMBER) {
   echo \"\n\n\";
   if ($settings['thread_notify']) {
      echo \"\n\";
   }
   if ($can_post) {
      echo \"\n\";
   }
   echo \"\n
\";
      if (dbcount(\"(thread_id)\", \"thread_notify\", \"thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\")) {
         $result = dbquery(\"UPDATE \".$db_prefix.\"thread_notify SET notify_datestamp='\".time().\"', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\");
         $notify_link = \"\".$locale['515'].\"\";
      } else {
         $notify_link = \"\".$locale['516'].\"\";
      }
      echo \"$notify_link
\";
      if (!$tdata['thread_locked']) {
         echo \"'\".$locale['565'].\"'\n\";
      }
      echo \"'\".$locale['566'].\"'\n\";
      echo \"
\n\";
}
closetable();
tablebreak();

if (iMEMBER && $can_post && !$tdata['thread_locked']) {
   opentable($locale['512']);
   echo \"













>', '');\\">
>', '');\\">
>', '');\\">
>
>
>
>
>', '');\\">
>
Download source  Code
', '


');\\">
>', '');\\">
\".displaysmileys(\"message\").\"

\".$locale['513'].\"

\n\";
   closetable();
}

echo \"\n\";

require_once BASEDIR.\"side_right.php\";
require_once BASEDIR.\"footer.php\";
?>





ir exp_include.php



Download source  Code
/*---------------------------------------------------+
| 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; }

function showexp($exp_user,$exp_posts,$exp_type) {
      if (iMEMBER) {
         $posts = $exp_posts;
         
         $comment = dbcount(\"(comment_id)\", \"comments\", \"comment_name='$exp_user'\");
         $rating = dbcount(\"(rating_id)\", \"ratings\", \"rating_user='$exp_user'\");
         $sum = ($posts+$comment+$rating);
   

   if ($sum <= \"1\") {$rang = \"0\";$level = \"Naujokas\";}
   if ($sum >= \"1\") {$rang = \"5\";$level = \"Pradedantysis\";}
   if ($sum >= \"5\") {$rang = \"25\";$level = \"Ap?ylantis\";}
   if ($sum >= \"25\") {$rang = \"50\";$level = \"Savas\";}
   if ($sum >= \"50\") {$rang = \"100\";$level = \"Draugas\";}
   if ($sum >= \"100\") {$rang = \"250\";$level = \"Geradarys\";}
   if ($sum >= \"250\") {$rang = \"500\";$level = \"Puikusis\";}
   if ($sum >= \"500\") {$rang = \"1000\";$level = \"Dar tokio lygio nra\";}
   if ($sum >= \"1000\") {$rang = \"2000\";$level = \"Dar tokio lygio nra\";}
   if ($sum >= \"2000\") {$rang = \"4000\";$level = \"Dar tokio lygio nra\";}
   if ($sum >= \"4000\") {$rang = \"10000\";$level = \"Dar tokio lygio nra\";}
   $poll_posts = $rang;
   $opt_posts = ($poll_posts ? number_format(100 / $poll_posts * $sum) : 0);
   
      if ($exp_type == \"1\") {
echo\"
Lygis: $level

Praeita: $opt_posts%



   

   
   



Prane?im forume: $posts

Reitingavim: $rating

Komentar: $comment\";

      }

   }
}

?>



Redagavo Anti-virus 2007-05-27 10:28
 
PM
rL
#2 Spausdinti pranešimą
parašyta 2007-05-26 21:39
Vartotojo avataras

Naujokas



Reputacija: 0

Pranešimai: 16
Įstojo: 2007-04-07

Ala tu durnas kaip batas , nors pasakytum kur tu nori ta koda ikisti nes failo pavadinimas nk nesako "BATAS" :D:D
 
PM
Nepster
#3 Spausdinti pranešimą
parašyta 2007-05-27 07:51
Vartotojo avataras

S.Administratorius



Reputacija: 0

Pranešimai: 670
Įstojo: 2007-01-02

po
echo "".$locale['502']." ".$data['user_posts']."
\n";

include INCLUDES."exp_include.php";
echo"Lygis: $level
";

 
PM
Anti-virus
#4 Spausdinti pranešimą
parašyta 2007-05-27 08:18
Pradinukas



Reputacija: 0

Pranešimai: 27
Įstojo: 2007-05-22

As visiskas asilas, nes man neveikia tas kodas
 
PM
Anti-virus
#5 Spausdinti pranešimą
parašyta 2007-05-27 09:48
Pradinukas



Reputacija: 0

Pranešimai: 27
Įstojo: 2007-05-22

Tai niekas negalit padti???????
 
PM
Nepster
#6 Spausdinti pranešimą
parašyta 2007-05-27 10:47
Vartotojo avataras

S.Administratorius



Reputacija: 0

Pranešimai: 670
Įstojo: 2007-01-02

sptas u? taisykli nesilaikym.

nzn.. nesamone suvelsiu bet veiks

$posts = $data['user_posts'];
$comment = dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'");
$rating = dbcount("(rating_id)", "ratings", "rating_user='".$data['user_id']."'");
$sum = ($posts+$comment+$rating);

if ($sum <= "1") {$rang = "0";$level = "Naujokas";}
if ($sum >= "1") {$rang = "5";$level = "Pradedantysis";}
if ($sum >= "5") {$rang = "25";$level = "Ap?ylantis";}
if ($sum >= "25") {$rang = "50";$level = "Savas";}
if ($sum >= "50") {$rang = "100";$level = "Draugas";}
if ($sum >= "100") {$rang = "250";$level = "Geradarys";}
if ($sum >= "250") {$rang = "500";$level = "Puikusis";}
if ($sum >= "500") {$rang = "1000";$level = "Dar tokio lygio nra";}
if ($sum >= "1000") {$rang = "2000";$level = "Dar tokio lygio nra";}
if ($sum >= "2000") {$rang = "4000";$level = "Dar tokio lygio nra";}
if ($sum >= "4000") {$rang = "10000";$level = "Dar tokio lygio nra";}
$poll_posts = $rang;
$opt_posts = ($poll_posts ? number_format(100 / $poll_posts * $sum) : 0);

echo"Lygis: $level
";
 
PM
remix13
#7 Spausdinti pranešimą
parašyta 2007-05-27 15:55
Vartotojo avataras

Apšylantis



Reputacija: 0

Pranešimai: 59
Įstojo: 2007-01-17

:D :D nepster :D
 
PM
Anti-virus
#8 Spausdinti pranešimą
parašyta 2007-06-30 20:40
Pradinukas



Reputacija: 0

Pranešimai: 27
Įstojo: 2007-05-22

Bet visvien neveikia :|
 
PM
MAnjack
#9 Spausdinti pranešimą
parašyta 2007-07-01 07:19
Vartotojo avataras

Puikusis



Reputacija: 0

Pranešimai: 1111
Įstojo: 2007-01-04

Paimk ir dk ?it kod:
Download source  Code
include_once INCLUDES.\"exp_include.php\";
showexp($userdata['user_id'],$userdata['user_posts'], \"1\");


 
PM
Hefaist
#10 Spausdinti pranešimą
parašyta 2007-07-01 09:28
Apšylantis



Reputacija: 0

Pranešimai: 64
Įstojo: 2007-03-25

sitas ir blogas, kai ieini i foruma rodo pas visus vartotojus tik tavo duomenis
 
PM
Andrejus
#11 Spausdinti pranešimą
parašyta 2007-07-01 12:57
Vartotojo avataras

Geradarys



Reputacija: 0

Pranešimai: 701
Įstojo: 2007-05-28

pats galvok...
[url="http://andrejus.eu"]Andrejaus tinklalapis[/url] - Naujienos apie IT, grafika bei daug kit "geek" straipsni
Dmesio!!! Kuriu modulius php-fusion, ra?ykit e-pa?t arba privai ?inut.
 
PM
MAnjack
#12 Spausdinti pranešimą
parašyta 2007-07-01 13:20
Vartotojo avataras

Puikusis



Reputacija: 0

Pranešimai: 1111
Įstojo: 2007-01-04

O taip?
Download source  Code
include_once INCLUDES.\"exp_include.php\";
showexp($data['user_id'],$data['user_posts'], \"1\");


 
PM
Peršokti į forumą: