PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 29063
Šiandien: 21
Prisijungę nariai
» Svečių: 14
» Narių: 0

» Viso narių: 10,232
» Naujausias: EdvinasG1337

Prisijungimų istorija:
tabuxsenokai
EdvinasG1337nepamenu
rolandas94nepamenu
Zbigniew@nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
mast3rnepamenu
N1nt3ndnepamenu
Matze1987nepamenu
Piter_NSnepamenu
MariukasRnepamenu
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.

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. 😁

2024-02-20 22:14
Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..

2024-02-20 22:03
Sveiki kolegos 👌 kazkada rasiau greit 11 metu bet ziuriu greit 14 metu. 😄 baisuu, reik ta proga kazka sugalvot su php-f kaip jaunima itraukt.

Shoutbox Archive
Peržiūrėti temą
PHP-Fusion Mods :: PHP-Fusion modifikacijų forumas :: Taisymas
\n\n\n\";
         
         if (iMEMBER) {
            
            $login = \"\n\";
         
         } else {
            $login = \"\n\";
         }
      
      } else { */
         
         $columns = false;
         $nav = \"\";
         $login = \"\";
      
      //}
      
      $sfimage1 = (file_exists ( THEME . \"images/folder_open.png\" ) ? THEME . \"images/folder_open.png\" : INFUSIONS . \"fusionboard4/images/folder_open.png\");
      $sfimage2 = (file_exists ( THEME . \"images/subforum.png\" ) ? THEME . \"images/subforum.png\" : INFUSIONS . \"fusionboard4/images/subforum.png\");
      
      if ($forum) {
         
         $caption = $catName . $caption;
         
         echo \"
 Spausdinti temą
v7 Fusionboard4 koregavimas
noskas
#1 Spausdinti pranešimą
parašyta 2009-08-17 12:41
Pradinukas



Reputacija: 0

Pranešimai: 33
Įstojo: 2008-06-02

�sidiegiau ?i� modifikacij� - http://phpfusion.lt/infusions/moddb/mod_view.php?mod_id=463
Viskuom esu patenkintas, ta�iau man asmeni?kai itin trukdo ?i tos modifikacijos dalis: Netinkamas paveiksliukas
Locale pagalba atradau kokiam �ia faile ?io bloko skriptas, ta�iau man niekaip nepavyksta jo taisyklingai i?operuoti.
?emiau pateiktame faile ir yra to bloko skriptas(ne �d�jau skripto kaip [code], nes jis u?ima daug vietos. Modifikacijos failas u?vadinta kaip "func.php" randasi ftp/infusions/fusionboard4/includes
Tabux(kuris ir patalpino ?i� modifikacij�) b��iau tikrai labai d�kingas, jeigu pagelb�tum :) ?inoma, ir kiti kurie tai sugeb�tu, didelis pra?au, pad�kit man :)

Func.php: http://www.failai...nc.php.htm
 
PM
tabux
#2 Spausdinti pranešimą
parašyta 2009-08-17 14:57
Vartotojo avataras

S.Administratorius



Reputacija: 0

Pranešimai: 1009
Įstojo: 2008-10-16

Nesupratau, kas tau toj vietoj netinka, ai?kiau klausk.. Jei d�l vertimo tai atsidarai fusionboard4/locale/Lithuanian.php susirandi $locale['fb916'] = "Forum Index"; keiti pagal save
 
PM
noskas
#3 Spausdinti pranešimą
parašyta 2009-08-17 20:14
Pradinukas



Reputacija: 0

Pranešimai: 33
Įstojo: 2008-06-02

tabux para?�:
Nesupratau, kas tau toj vietoj netinka, ai?kiau klausk.. Jei d�l vertimo tai atsidarai fusionboard4/locale/Lithuanian.php susirandi $locale['fb916'] = "Forum Index"; keiti pagal save

Ne vertimas. Ten kur yra tas paveiksliukas ir yra raudonai ap?ym�ta toji lentele. A? noriu j� panaikinti.
 
PM
tabux
#4 Spausdinti pranešimą
parašyta 2009-08-17 20:28
Vartotojo avataras

S.Administratorius



Reputacija: 0

Pranešimai: 1009
Įstojo: 2008-10-16

Pakeisk savo func.php ?iuo:
Download source  Code

/*
   fusionBoard 4.0
   php-Invent Team
   http://www.php-invent.com
   
   Developer: Ian Unruh (SoBeNoFear)
   ianunruh@gmail.com
*/
if (! defined ( \"IN_FUSION\" ))
   die ( \"Access Denied\" );

if (dbrows ( dbquery ( \"select * from \" . $db_prefix . \"fb_settings\" ) )) {
   $fb4 = dbarray ( dbquery ( \"select * from \" . $db_prefix . \"fb_settings\" ) );
} else {
   $fb4 = array (\"fboard_on\" => \"0\" );
}

if (! function_exists ( \"renderSubforums\" )) {
   
   function renderSubforums($forum) {
      global $locale, $userdata, $db_prefix, $lastvisited, $fb4;
      
      $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
      LEFT JOIN \" . DB_PREFIX . \"fb_forums f3 on f3.forum_id=f.forum_id
      WHERE \" . groupaccess ( 'f.forum_access' ) . \" AND f3.forum_parent='\" . $forum . \"' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC\" );
      if (dbrows ( $result ) != 0) {
         $state = \"off\";
         $boxname = \"subforums\";
         echo \"\n\";
         if ($fb4 ['forum_icons']) {
            echo \"\n\n\";
            echo \"
\" . panelbutton ( $state, $boxname ) . \"
\n
         \" . $locale ['fb553'] . \"
\" . panelstate ( $state, $boxname ) . \"\n\";
            echo \"\n\n\";
         } else {
            echo \"\n\n\";
            echo \"
\" . $locale ['401'] . \"
\" . panelbutton ( $state, $boxname ) . \"
\n
         \" . $locale ['fb553'] . \"
\" . panelstate ( $state, $boxname ) . \"\n\";
            echo \"\n\n\";
         }
         echo \"\n\";
         echo \"\n\";
         echo \"\n\";
         echo \"\n\";
         while ( $data = dbarray ( $result ) ) {
            $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 = \"'\"\";
               } else {
                  $fim = \"'\"\";
               }
            } else {
               $fim = \"'\"\";
            }
            echo \"\n\";
            echo \"\n\";
            $iconQuery = dbquery ( \"select * from \" . $db_prefix . \"fb_forums where forum_id='\" . $data ['forum_id'] . \"'\" );
            if (dbrows ( $iconQuery )) {
               $iconData = dbarray ( $iconQuery );
               $ficon = ($iconData ['forum_icon'] !== \"\" ? $iconData ['forum_icon'] : \"folder.png\");
            } else {
               $ficon = \"folder.png\";
            }
            
            if ($fb4 ['forum_icons']) {
               $ficon = \"''\";
               echo \"\n\";
            }
            echo \"\n\";
            echo \"\n\";
               } else {
                  $childrenData = dbarray ( $childrenForums );
                  echo \"\" . trimlink ( $childrenData ['thread_subject'], 30 ) . \"
\";
                  echo \"\" . $locale ['406'] . \"\" . showLabel ( $childrenData ['user_id'], false, \"index\" ) . \"

               
\" . timePassed ( $childrenData ['thread_lastpost'], false ) . \"
               
\n\";
               }
            } else {
               if ($data ['forum_lastpost'] == 0) {
                  echo $locale ['405'] . \"\n\";
               } else {
                  $threadData = dbarray ( dbquery ( \"select * from \" . $db_prefix . \"threads t
               left join \" . $db_prefix . \"posts p on p.post_id=t.thread_lastpostid
               where t.thread_lastpost='\" . $data ['forum_lastpost'] . \"'\" ) );
                  echo \"\" . trimlink ( $threadData ['thread_subject'], 30 ) . \"
\";
                  echo \"\" . $locale ['406'] . \"\" . showLabel ( $data ['forum_lastuser'], false, \"index\" ) . \"

               
\" . timePassed ( $data ['forum_lastpost'], false ) . \"
               
\n\";
               }
            }
            echo \"\n\";
            echo \"\n\";
            echo \"\n\";
         }
         echo \"
\" . $locale ['401'] . \"\" . $locale ['404'] . \"\" . $locale ['402'] . \"\" . $locale ['403'] . \"
$fim$ficon
         \" . $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\";
            }
            $c_res = dbquery ( \"select * from \" . DB_PREFIX . \"forums f
         left join \" . DB_PREFIX . \"fb_forums f2 on f2.forum_id=f.forum_id
         where \" . groupaccess ( \"f.forum_access\" ) . \" AND f2.forum_parent='\" . $data ['forum_id'] . \"'\" );
            if (dbrows ( $c_res )) {
               if ($fb4 ['subforum_view']) {
                  echo \"
\" . $locale ['fb552'] . \" \";
                  $i = dbrows ( $c_res );
                  while ( $c_data = dbarray ( $c_res ) ) {
                     $i --;
                     echo \"\" . $c_data ['forum_name'] . \"\";
                     if ($i > 0)
                        echo \", \";
                  }
                  echo \"
\";
               } else {
                  $counter = 0;
                  $rows = 3;
                  $sfimage1 = (file_exists ( THEME . \"images/folder_open.png\" ) ? THEME . \"images/folder_open.png\" : INFUSIONS . \"fusionboard4/images/folder_open.png\");
                  $sfimage2 = (file_exists ( THEME . \"images/subforum.png\" ) ? THEME . \"images/subforum.png\" : INFUSIONS . \"fusionboard4/images/subforum.png\");
                  echo \"
'' \" . $locale ['fb552'] . \"
\";
                  echo \"
               
\";
                  while ( $c_data = dbarray ( $c_res ) ) {
                     if ($counter != 0 && ($counter % $rows == 0)) {
                        echo \"
\n\";
                     }
                     $subforum = (is_file ( THEME . \"images/subforum.png\" ) ? THEME . \"images/subforum.png\" : INFUSIONS . \"fusionboard4/images/subforum.png\");
                     echo \"''
                  \" . $c_data ['forum_name'] . \"
\";
                     $counter ++;
                  }
                  echo \"
\";
               }
            }
            echo \"
\";
            $children = array ( );
            $child_res = dbquery ( \"select * from \" . $db_prefix . \"fb_forums f
         left join \" . $db_prefix . \"forums f2 on f2.forum_id=f.forum_id
         where \" . groupaccess ( \"f2.forum_access\" ) . \" and f.forum_parent='\" . $data ['forum_id'] . \"'\" );
            if (dbrows ( $child_res )) {
               while ( $child_data = dbarray ( $child_res ) ) {
                  array_push ( $children, $child_data ['forum_id'] );
                  findChildren ( $child_data ['forum_id'] );
               }
            }
            if (count ( $children )) {
               $where = \"\";
               $counter = count ( $children );
               foreach ( $children as $child ) {
                  $where .= \"t.forum_id='$child' \" . ($counter > 1 ? \"OR \" : \"\");
                  $counter --;
               }
               $childrenForums = dbquery ( \"select * from \" . $db_prefix . \"threads t
            left join \" . $db_prefix . \"users u on u.user_id=t.thread_lastuser
            left join \" . $db_prefix . \"posts p on p.post_id=t.thread_lastpostid
            where ($where OR t.forum_id='\" . $data ['forum_id'] . \"')
            order by t.thread_lastpost desc limit 1\" );
               if (! dbrows ( $childrenForums )) {
                  echo $locale ['405'] . \"
\" . $data ['forum_threadcount'] . \"\" . $data ['forum_postcount'] . \"
\";
      }
   
   }

   function useraccess($field) {
      global $data, $user;
      if ($data ['user_level'] == 0) {
         return \"$field = '0'\";
      } elseif ($data ['user_level'] == 103) {
         return \"1 = 1\";
      } elseif ($data ['user_level'] >= 102) {
         $res = \"($field='0' OR $field='101' OR $field='102'\";
      } elseif ($data ['user_level'] >= 101) {
         $res = \"($field='0' OR $field='101'\";
      }
      if (substr ( $data ['user_groups'], 1 ) != \"\" && $data ['user_level'] !== 103) {
         $res .= \" OR $field='\" . str_replace ( \".\", \"' OR $field='\", substr ( $data ['user_groups'], 1 ) ) . \"'\";
      }
      $res .= \")\";
      return $res;
   }
   
   function renderTools() {
      global $settings, $fb4, $userdata, $fdata, $layout, $db_prefix, $locale;
      echo \"
   
         \n\";
      if (iMEMBER && $settings ['thread_notify']) {
         echo \"\";
      }
      echo \"\";
      if (iMEMBER && $fb4 ['layout_change']) {
         $list = ($layout != \"1\" ? \"\" . $locale ['fb504'] . \"\" : \"\" . $locale ['fb504'] . \"\").\"
\n\";
         $list .= ($layout != \"2\" ? \"\" . $locale ['fb505'] . \"\" : \"\" . $locale ['fb505'] . \"\").\"
\n\";
         $list .= ($layout != \"3\" ? \"\" . $locale ['fb506'] . \"\" : \"\" . $locale ['fb506'] . \"\").\"
\n\";
         $list .= ($layout != \"4\" ? \"\" . $locale ['fb438'] . \"\" : \"\" . $locale ['fb438'] . \"\").\"\n\";
         ?>
         
                    echo \"\";
      }
      echo \"
\";
         if (dbcount ( \"(thread_id)\", DB_THREAD_NOTIFY, \"thread_id='\" . $_GET ['thread_id'] . \"' AND notify_user='\" . $userdata ['user_id'] . \"'\" )) {
            $result2 = dbquery ( \"UPDATE \" . DB_THREAD_NOTIFY . \" SET notify_datestamp='\" . time () . \"', notify_status='1' WHERE thread_id='\" . $_GET ['thread_id'] . \"' AND notify_user='\" . $userdata ['user_id'] . \"'\" );
            echo \"\" . $locale ['fb508'] . \"\";
         } else {
            echo \"\" . $locale ['fb507'] . \"\";
         }
         echo \"
\" . $locale ['519'] . \">\".$locale['fb503'].\"
         
\n\";
         echo \"\n\";
         echo \"\n\";
         echo \"
$list
\n

         
\n\";
   }
   
   function renderParents($parent) {
      global $db_prefix;
      $p_res = dbquery ( \"select * from \" . $db_prefix . \"forums f
   left join \" . $db_prefix . \"fb_forums f2 on f2.forum_id=f.forum_id
   where f.forum_id='$parent'\" );
      $caption = \"\";
      if (dbrows ( $p_res )) {
         
         $p_data = dbarray ( $p_res );
         if ($p_data ['forum_parent'] == \"0\")
            define ( \"ROOTPARENT\", $p_data ['forum_id'] );
         $caption .= \" � \" . $p_data ['forum_name'] . \"\";
         $caption .= renderParents ( $p_data ['forum_parent'] );
      
      }
      return $caption;
   }
   
   function renderNav($forum = false, $announcement = false, $page = \"\") {
      
      global $locale, $settings, $fb4, $fdata, $db_prefix, $userdata;
      
      $caption = \"\";
      
      if ($fdata ['forum_parent'] !== \"0\") {
         $p_data = dbarray ( dbquery ( \"select * from \" . $db_prefix . \"forums f
      left join \" . $db_prefix . \"fb_forums f2 on f2.forum_id=f.forum_id
      where f.forum_id='\" . $fdata ['forum_parent'] . \"'\" ) );
         $caption .= renderParents ( $p_data ['forum_parent'] );
         if ($p_data ['forum_parent'] == \"0\")
            define ( \"ROOTPARENT\", $p_data ['forum_id'] );
         $caption .= \" � \" . $p_data ['forum_name'] . \"\";
      }
      
      if (defined ( \"ROOTPARENT\" )) {
         $root = dbarray ( dbquery ( \"SELECT f.*, f2.forum_name AS forum_cat_name FROM \" . DB_FORUMS . \" f
         LEFT JOIN \" . DB_FORUMS . \" f2 ON f.forum_cat=f2.forum_id
         WHERE f.forum_id='\" . ROOTPARENT . \"'\" ) );
         $catName = $root ['forum_cat_name'];
      } else {
         $catName = $fdata ['forum_cat_name'];
      }
      
      /* if ($fb4 ['vb_nav']) {
         
         if ($fb4 ['forum_rules']) {
            $columns = 6;
         } else {
            $columns = 5;
         }
         $width = ceil ( 100 / $columns );
         $nav = \"
\n\";
         $nav .= \"\";
         $nav .= \"\n\";
         if ($fb4 ['forum_rules']) {
            $nav .= \"\n\";
         }
         $nav .= \"\n\";
         $nav .= \"\n\";
         $nav .= \"\n\";
         $nav .= \"\n\";
         $nav .= \"\n
\";
         if (iMEMBER) {
            $nav .= \"\" . $locale ['fb922'] . \"\";
         } else {
            $nav .= \"\" . $locale ['fb910'] . \"\";
         }
         $nav .= \"
\";
            $nav .= \"\" . $locale ['fb911'] . \"
\" . $locale ['fb912'] . \"\" . $locale ['fb913'] . \"\" . $locale ['fb914'] . \"\" . $locale ['fb915'] . \"
\n
\n\";
            $login .= $locale ['fb923'] . \"\" . $userdata ['user_name'] . \"!\";
            if (iADMIN && ! INVISIBLEMODE) {
               $login .= \" [\" . $locale ['uc365'] . \"]\";
            }
            $login .= \"
\n\";
            $login .= $locale ['fb924'] . \"\" . timepassed ( $userdata ['user_lastvisit'] ) . \"
\n\";
            $unread = dbcount ( \"(message_id)\", DB_MESSAGES, \"message_to='\" . $userdata ['user_id'] . \"' and message_read='0'\" );
            $total = dbcount ( \"(message_id)\", DB_MESSAGES, \"message_to='\" . $userdata ['user_id'] . \"' and message_folder='0'\" );
            ;
            $login .= \"\" . $locale ['fb925'] . \": \" . $unread . \" \" . $locale ['fb926'] . \", \" . $total . \" \" . $locale ['fb927'] . \"\n\";
            $login .= \"
\n
\n\";
            $login .= \"'\" \";
            $login .= \"
\n\";
            $login .= \"'\" \";
            $login .= \" \n\";
            $login .= \" \n\";
            $login .= \"\n\";
            $login .= \"

      
         $login
      \";
      
      } elseif ($announcement) {
         
         echo \"

         
         
         
''\" . $settings ['sitename'] . \" � \" . $caption . \"

         
         
         
         
''\" . $fdata ['forum_name'] . \"

         

      
         $login
      \";
      
      } elseif ($page) {
         
         $caption = $catName . $caption . \" � \" . $fdata ['forum_name'] . \"\";
         
         echo \"

         
         
         
''\" . $settings ['sitename'] . \" � \" . $locale ['fb900'] . \"

         
         
         
         
''\" . $fdata ['thread_subject'] . \"

         

      
         $login
      \";
      
      } else {
         
         $caption = $catName . $caption . \" � \" . $fdata ['forum_name'] . \"\";
         
         echo \"

         
         
         
''\" . $settings ['sitename'] . \"

         
         
         
         
''\" . $page [1] . \"

         

      
         $login
      \";
      
      }
      
      echo $nav;
      
      if (INVISIBLEMODE) {
         echo \"\n\n\n\";
      }
      
      echo \"

         
         
         
''\" . $settings ['sitename'] . \" � \" . $caption . \"

         
         
         
         
''\" . $fdata ['thread_subject'] . \"

         
\";
         echo $locale ['uc358'] . \"\";
         echo $locale ['uc359'] . \"
\" . $locale ['uc360'];
         echo \"

\n\";
   }
   
   function renderPostNav($action = \"\", $announcement = false) {
      
      global $locale, $settings, $fb4, $fdata, $tdata, $db_prefix, $subject;
      
      $caption = \"\";
      
      if ($fdata ['forum_parent'] !== \"0\") {
         $p_data = dbarray ( dbquery ( \"select * from \" . $db_prefix . \"forums f
      left join \" . $db_prefix . \"fb_forums f2 on f2.forum_id=f.forum_id
      where f.forum_id='\" . $fdata ['forum_parent'] . \"'\" ) );
         $caption .= renderParents ( $p_data ['forum_parent'] );
         if ($p_data ['forum_parent'] == \"0\")
            define ( \"ROOTPARENT\", $p_data ['forum_id'] );
         $caption .= \" � \" . $p_data ['forum_name'] . \"\";
      }
      
      if (defined ( \"ROOTPARENT\" )) {
         $root = dbarray ( dbquery ( \"SELECT f.*, f2.forum_name AS forum_cat_name FROM \" . DB_FORUMS . \" f
         LEFT JOIN \" . DB_FORUMS . \" f2 ON f.forum_cat=f2.forum_id
         WHERE f.forum_id='\" . ROOTPARENT . \"'\" ) );
         $catName = $root ['forum_cat_name'];
      } else {
         $catName = $fdata ['forum_cat_name'];
      }
      
      if ($announcement) {
         $caption = $locale ['fb900'];
      } else {
         $caption = $catName . $caption . \" � \" . $fdata ['forum_name'] . \"\";
      }
      
      $sfimage1 = (file_exists ( THEME . \"images/folder_open.png\" ) ? THEME . \"images/folder_open.png\" : INFUSIONS . \"fusionboard4/images/folder_open.png\");
      $sfimage2 = (file_exists ( THEME . \"images/subforum.png\" ) ? THEME . \"images/subforum.png\" : INFUSIONS . \"fusionboard4/images/subforum.png\");
      
      echo \"
   
      
   
   

      
      
      
''\" . $settings ['sitename'] . \" � \" . $caption . \"

      
      
      
      
''\";
      if ($action == \"edit\") {
         echo $locale ['fb610'] . \"\" . $tdata ['thread_subject'] . \"\";
      } elseif ($action == \"reply\") {
         echo $locale ['fb611'] . \"\" . $tdata ['thread_subject'] . \"\";
      } elseif ($action == \"newthread\") {
         echo \"\" . $locale ['fb612'] . \"\";
      } else {
         echo \"\" . $subject . \"\";
      }
      echo \"

      

\n\";
   }
   
   function timePassed($time, $showtime = 1) {
      global $locale, $settings;
      $mode = \"short\";
      $timepassed = (time () - $time);
      if ($timepassed > 7 * 24 * 3600) {
         if($timepassed > 14 * 24 * 3600){
            $timesince = showdate ( \"%d-%m-%Y\", $time );
         } else {
            $timesince = floor ( $timepassed / (7 * 24 * 3600) );
            $timesince .= ($timesince != \"1\" ? $locale ['fb980'] : $locale ['fb981']);
         }
      } elseif ($timepassed >= 24 * 3600 && $timepassed <= 48 * 3600 && $mode == \"short\"){
         $timesince = $locale['fb2_101'];
      } elseif ($timepassed <= 24 * 3600 && $mode == \"short\"){
         $timesince = $locale['fb2_100'];
      } elseif ($timepassed > 2 * 24 * 3600 && $mode == \"short\"){
         $timesince = floor ( $timepassed / (24 * 3600) );
         $timesince .= ($timesince != \"1\" ? $locale ['fb982'] : $locale ['fb983']);
      } elseif ($timepassed > 24 * 3600 && $mode !== \"short\") {
         $timesince = floor ( $timepassed / (24 * 3600) );
         $timesince .= ($timesince != \"1\" ? $locale ['fb982'] : $locale ['fb983']);
      } elseif ($timepassed > 3600 && $mode !== \"short\") {
         $timesince = floor ( $timepassed / 3600 );
         $timesince .= ($timesince != \"1\" ? $locale ['fb984'] : $locale ['fb985']);
      } elseif ($timepassed > 0 && $mode !== \"short\") {
         $timesince = floor ( $timepassed / 60 );
         $timesince .= ($timesince != \"1\" ? $locale ['fb986'] : $locale ['fb987']);
      } else {
         $timesince = showdate ( \"%d-%m-%Y\", $time );
      }
      if ($showtime || $mode == \"short\")
         $timesince .= \" \" . strftime ( \"%I:%M %p\", ($time + ($settings ['timeoffset'] * 3600)) ) . \"\";
      return $timesince;
   
   }
   
   if (isset ( $_GET ['getfile'] ) && isnum ( $_GET ['getfile'] ) && $fb4 ['fboard_on']) {
      $result = dbquery ( \"SELECT * FROM \" . DB_FORUM_ATTACHMENTS . \" WHERE attach_id='\" . $_GET ['getfile'] . \"'\" );
      if (dbrows ( $result )) {
         if ($fb4 ['attach_count']) {
            $fb_res = dbquery ( \"select * from \" . DB_PREFIX . \"fb_attachments WHERE attach_id='\" . $_GET ['getfile'] . \"'\" );
            if (dbrows ( $fb_res )) {
               $fb_data = dbarray ( $fb_res );
               $fb_query = dbquery ( \"update \" . DB_PREFIX . \"fb_attachments SET attach_count='\" . ($fb_data ['attach_count'] + 1) . \"' WHERE attach_id='\" . $_GET ['getfile'] . \"'\" );
            } else {
               $fb_query = dbquery ( \"insert into \" . DB_PREFIX . \"fb_attachments (attach_id,attach_count) VALUES('\" . $_GET ['getfile'] . \"', '1')\" );
            }
         }
         require_once INCLUDES . \"class.httpdownload.php\";
         ob_end_clean ();
         $data = dbarray ( $result );
         $object = new httpdownload ( );
         $object->set_byfile ( FORUM . \"attachments/\" . $data ['attach_name'] );
         $object->use_resume = true;
         $object->download ();
      }
      exit ();
   }
   
   function renderAwards($user, $pre = \" \", $post = \"\") {
      global $db_prefix, $fb4, $locale;
      $result = dbquery ( \"select * from \" . $db_prefix . \"fb_awards where award_user='$user'\" );
      if (dbrows ( $result ) && $fb4 ['show_medals']) {
         echo $pre;
         while ( $data = dbarray ( $result ) ) {
            echo \">\";
         }
         echo $post;
      }
   }
   
   function findChildren($forum, $childArray = \"\") {
      if (! isset ( $childArray )) {
         global $children;
      }
      if (! isset ( $children )) {
         $children = array ( );
      }
      $child_res = dbquery ( \"select * from \" . DB_PREFIX . \"fb_forums f
      left join \" . DB_PREFIX . \"forums f2 on f2.forum_id=f.forum_id
      where \" . groupaccess ( \"f2.forum_access\" ) . \" and f.forum_parent='$forum'\" );
      if (dbrows ( $child_res )) {
         while ( $child_data = dbarray ( $child_res ) ) {
            array_push ( $children, $child_data ['forum_id'] );
            findChildren ( $child_data ['forum_id'] );
         }
      }
   }
   
   function showLabel($id, $style = \"\", $place = \"\") {
      global $fb4;
      $user = dbquery ( \"select * from \" . DB_USERS . \" where user_id='$id'\" );
      $label = 'label_' . $place;
      $show = ($place ? $fb4 [$label] : 1);
      if (dbrows ( $user )) {
         $userdata = dbarray ( $user );
         if ($show) {
            $label_res = dbquery ( \"select * from \" . DB_PREFIX . \"fb_labels where label_user='$id'\" );
            if (dbrows ( $label_res )) {
               $label_data = dbarray ( $label_res );
               return \"\" . $userdata ['user_name'] . \"\";
            } else {
               if (labelGroups ( \"label_group\", $userdata )) {
                  $label_res = dbquery ( \"select * from \" . DB_PREFIX . \"fb_labels where \" . labelGroups ( \"label_group\", $userdata ) . \" limit 1\" );
               }
               if (isset ( $label_res ) && dbrows ( $label_res )) {
                  $label_data = dbarray ( $label_res );
                  return \"\" . $userdata ['user_name'] . \"\";
               } else {
                  return \"\" . $userdata ['user_name'] . \"\";
               }
            }
         } else {
            return $userdata ['user_name'];
         }
      } else {
         return \"\";
      }
   }
   
   function labelGroups($field, $data) {
      $res = \"\";
      if ($data ['user_level'] == 103) {
         $res = \"$field='103'\";
      } elseif ($data ['user_level'] >= 102) {
         $res = \"$field='102'\";
      }
      if (substr ( $data ['user_groups'], 1 ) != \"\" && ! $res) {
         $res = \"($field='\" . str_replace ( \".\", \"' OR $field='\", substr ( $data ['user_groups'], 1 ) ) . \"')\";
      }
      return $res;
   }
   
   function display_image_fb($file, $width = 50, $height = 50, $caption = \"\") {
      $size = @getimagesize ( FORUM . \"attachments/\" . $file );
      
      if ($size [0] > $height || $size [1] > $width) {
         if ($size [0] < $size [1]) {
            $img_w = round ( ($size [0] * $width) / $size [1] );
            $img_h = $width;
         } elseif ($size [0] > $size [1]) {
            $img_w = $height;
            $img_h = round ( ($size [1] * $height) / $size [0] );
         } else {
            $img_w = $height;
            $img_h = $width;
         }
      } else {
         $img_w = $size [0];
         $img_h = $size [1];
      }
      
      if ($size [0] != $img_w || $size [1] != $img_h) {
         $res = \"
      
\";
      } else {
         $res = \"\";
      }
      
      return $res;
   }
   
   function showtitle($user) {
      
      global $db_prefix;
      $titleLookup = dbquery ( \"select * from \" . DB_PREFIX . \"fb_titles where title_id='\" . $user ['user_title'] . \"' and (\" . useraccess_better ( \"title_access\", $user ) . \")\" );
      if (dbrows ( $titleLookup )) {
         $titleData = dbarray ( $titleLookup );
         $title = stripslash ( $titleData ['title_title'] );
      } else {
         $title = stripslash ( $user ['user_title'] );
      }
      
      return $title;
   
   }
   
   function useraccess_better($field, $level) {
      if ($level ['user_level'] == 0) {
         return \"$field = '0'\";
      } elseif ($level ['user_level'] == 103) {
         return \"1 = 1\";
      } elseif ($level ['user_level'] >= 102) {
         $res = \"($field='0' OR $field='101' OR $field='102'\";
      } elseif ($level ['user_level'] >= 101) {
         $res = \"($field='0' OR $field='101'\";
      }
      if (substr ( $level ['user_groups'], 1 ) != \"\" && $level ['user_level'] !== 103) {
         $res .= \" OR $field='\" . str_replace ( \".\", \"' OR $field='\", substr ( $level ['user_groups'], 1 ) ) . \"'\";
      }
      $res .= \")\";
      return $res;
   }
   
   function createthumb($name, $filename, $new_w, $new_h) {
      $avatarext = strrchr ( $name, \".\" );
      $system = explode ( \".\", $avatarext );
      if (preg_match ( \"/jpg|jpeg/\", $system [1] )) {
         $src_img = imagecreatefromjpeg ( $name );
      }
      if (preg_match ( \"/png/\", $system [1] )) {
         $src_img = imagecreatefrompng ( $name );
      }
      if (preg_match ( \"/gif/\", $system [1] )) {
         $src_img = imagecreatefromgif ( $name );
      }
      $old_x = imageSX ( $src_img );
      $old_y = imageSY ( $src_img );
      if ($old_x > $old_y) {
         $thumb_w = $new_w;
         $thumb_h = $old_y * ($new_h / $old_x);
      }
      if ($old_x < $old_y) {
         $thumb_w = $old_x * ($new_w / $old_y);
         $thumb_h = $new_h;
      }
      if ($old_x == $old_y) {
         $thumb_w = $new_w;
         $thumb_h = $new_h;
      }
      $dst_img = ImageCreateTrueColor ( $thumb_w, $thumb_h );
      imagecopyresampled ( $dst_img, $src_img, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y );
      if (preg_match ( \"/png/\", $system [1] )) {
         imagepng ( $dst_img, $filename );
      } elseif (preg_match ( \"/jpg|jpeg/\", $system [1] )) {
         imagejpeg ( $dst_img, $filename );
      } else {
         imagegif ( $dst_img, $filename );
      }
      imagedestroy ( $dst_img );
      imagedestroy ( $src_img );
   }
   
   function sendMessage($to, $from, $subject, $message) {
      
      global $locale;
      
      $result = \"insert into \" . DB_MESSAGES . \" (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('$to', '$from', '$subject', '$message', '0', '0', '\" . time () . \"', '0')\";
      if (dbquery ( $result )) {
         return true;
      } else {
         return false;
      }
   
   }
   
   function showStatus($user, $image = true) {
      global $locale, $fb4;
      $online = dbcount ( \"(online_user)\", DB_ONLINE, \"online_user='$user'\" );
      $status = ($online ? $locale ['fb260'] : $locale ['fb261']);
      if (file_exists ( THEME . \"forum/online.gif\" )) {
         $img = THEME . \"forum/\";
      } else {
         $img = INFUSIONS . \"fusionboard4/images/status/\";
      }
      if ($fb4 ['show_status']) {
         if ($image) {
            return \"'$status'\n\";
         } else {
            return $status . \"\n\";
         }
      } else {
         return \"\";
      }
   }
   
   function checkIgnore($user) {
      global $userdata;
      return dbcount ( \"(ignore_user)\", DB_PREFIX . \"fb_ignore\", \"ignore_user='$user' and ignore_ignored='\" . $userdata ['user_id'] . \"'\" );
   }
   
   function renderMods($image = 1, $text = 1) {
      global $data, $mod_groups, $settings;
      if ($data ['user_level'] >= 102) {
         echo $settings ['forum_ranks'] ? show_forum_rank ( $data ['user_posts'], $data ['user_level'], $image, $text ) : getuserlevel ( $data ['user_level'] );
      } else {
         foreach ( $mod_groups as $mod_group ) {
            $is_mod = false;
            if (! $is_mod && preg_match ( \"(^\.{$mod_group}$|\.{$mod_group}\.|\.{$mod_group}$)\", $data ['user_groups'] )) {
               $is_mod = true;
            }
         }
         if ($settings ['forum_ranks']) {
            echo $is_mod ? show_forum_rank ( $data ['user_posts'], 104, $image, $text ) : show_forum_rank ( $data ['user_posts'], $data ['user_level'], $image, $text );
         } else {
            echo $is_mod ? $locale ['user1'] : getuserlevel ( $data ['user_level'] );
         }
      }
   }
   
   /* Invisible mode */
   include INFUSIONS . \"fusionboard4/includes/invisible.inc.php\";
   
   /* Warning system */
   include INFUSIONS . \"fusionboard4/includes/warning.inc.php\";
   
   function showPoweredBy() {
      return \"Forum powered by fusionBoard\";
   }

}
?>



 
PM
Peršokti į forumą: