Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SLL

Pages: 1 ... 23 24 25 26 [27]
391
This mod works fine for me, as well as phpBB Fetch Info does, but only one of these mods on the same page, alone. When I'm trying to run both mods together, on the same page, the phpBB Fetch Info doesn't work at all. I'm using different database for 4images and pbpBB.

Please advise, what could be the reason for this conflict? Thanks in advance!

Code: [Select]
<?php
#################################################################
## Mod Title&#58;   phpBB Fetch Info
## Author&#58;      Ca5ey <ca5ey@clanunity.net> Volker Rattel
#################################################################
#-----[ EXAMPLE USAGE &#93;------------------------------------------
## <?php
## define&#40;'IN_PHPBB', true&#41;;
## include&#40;'phpbb_fetch_info.php'&#41;;
## $info = phpbb_fetch_info&#40;&#41;;
## 
?>

## Total Posts: <?php echo $info['f_total_posts'&#93;; ?><br>
## Total Users: <?php echo $info['f_total_users'&#93;; ?><br>
## Newest User: <?php echo $info['newest_username'&#93;; ?><br>
## Newest User ID: <?php echo $info['newest_userid'&#93;; ?><br>
## User Online: <?php echo $info['f_user_online'&#93;; ?><br>
#################################################################
$phpbb_root_path = './phpBB2/';
$CFG['close_db'] = 1;

if (!file_exists($phpbb_root_path . 'extension.inc')) {
    die('<b>phpBB Fetch Info:</b> The $phpbb_root_path setting is wrong and DOES NOT point to your forum.');
}
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.'.$phpEx);

function phpbb_fetch_info()
{

    global $db;
    $info = array();
    $info['f_total_posts']     = get_db_stat('postcount');
    $info['f_total_users']     = get_db_stat('usercount');
    $newest_user             = get_db_stat('newestuser');
    $info['newest_userid']   = $newest_user[0];
    $info['newest_username'] = $newest_user[1];

    $sql = 'SELECT
              COUNT(session_id)
            FROM
              ' . SESSIONS_TABLE . '
            WHERE
              session_time >= ' . ( time() - 300 );

    if( !($result = $db->sql_query($sql)) ) {
        message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
    }

    $f_user_online = $db->sql_fetchrow($result);
    $info['f_user_online'] = $f_user_online[0];

    if ($CFG['close_db']) {
        $db->sql_close();
    }
    return $info;

} // phpbb_fetch_info

?>


392
This mod works fine for me, as well as phpBB Fetch Info does, but only one of these mods on the same page, alone. When I'm trying to run both mods together, on the same page, the phpBB Fetch Info doesn't work at all. I'm using different database for 4images and pbpBB.

Please advise, what could be the reason for this conflict? Thanks in advance!

Code: [Select]
<?php
#################################################################
## Mod Title&#58;   phpBB Fetch Info
## Author&#58;      Ca5ey <ca5ey@clanunity.net> Volker Rattel
#################################################################
#-----[ EXAMPLE USAGE &#93;------------------------------------------
## <?php
## define&#40;'IN_PHPBB', true&#41;;
## include&#40;'phpbb_fetch_info.php'&#41;;
## $info = phpbb_fetch_info&#40;&#41;;
## 
?>

## Total Posts: <?php echo $info['f_total_posts'&#93;; ?><br>
## Total Users: <?php echo $info['f_total_users'&#93;; ?><br>
## Newest User: <?php echo $info['newest_username'&#93;; ?><br>
## Newest User ID: <?php echo $info['newest_userid'&#93;; ?><br>
## User Online: <?php echo $info['f_user_online'&#93;; ?><br>
#################################################################
$phpbb_root_path = './phpBB2/';
$CFG['close_db'] = 1;

if (!file_exists($phpbb_root_path . 'extension.inc')) {
    die('<b>phpBB Fetch Info:</b> The $phpbb_root_path setting is wrong and DOES NOT point to your forum.');
}
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.'.$phpEx);

function phpbb_fetch_info()
{

    global $db;
    $info = array();
    $info['f_total_posts']     = get_db_stat('postcount');
    $info['f_total_users']     = get_db_stat('usercount');
    $newest_user             = get_db_stat('newestuser');
    $info['newest_userid']   = $newest_user[0];
    $info['newest_username'] = $newest_user[1];

    $sql = 'SELECT
              COUNT(session_id)
            FROM
              ' . SESSIONS_TABLE . '
            WHERE
              session_time >= ' . ( time() - 300 );

    if( !($result = $db->sql_query($sql)) ) {
        message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
    }

    $f_user_online = $db->sql_fetchrow($result);
    $info['f_user_online'] = $f_user_online[0];

    if ($CFG['close_db']) {
        $db->sql_close();
    }
    return $info;

} // phpbb_fetch_info

?>


393
Language Packs / phpBB-style Russian buttons
« on: January 04, 2003, 09:35:42 AM »
phpBB-style Russian buttons to use with Blue-Orange template from www.vierstra.com







download: http://faces.dalnet.ru/files.php?id=2&l=english

394
Discussion & Troubleshooting / Uploaded image name equal to username
« on: December 30, 2002, 03:26:06 PM »
I was trying to set uploaded image name to be always equal to uploader user name:

member_uploadform.html

Code: [Select]

 <tr>
   <td class="row2"><b>{lang_image_name}</b></td>
      <td class="row2">
      <input type="hidden" name="image_name" value="{loggedin_user_name}">
  </td>
 </tr>

For the reason I do not understand, this doesn't work... {user_name} doesn't work as well. Please advise. Thank you!

395
Feedback & Suggestions / User limits
« on: December 28, 2002, 12:47:24 PM »
Is there any way to limit number of photos uploaded per user? I'd like to limit this number to 3, for example, and force users to replace the old photo with a new one.

If not, I'd like to see this feature in new versions.

Thanks!

396
Language Packs / [Language] Russian language files & buttons
« on: December 26, 2002, 10:31:25 AM »
Russian language text files & buttons (default style):







download: http://faces.dalnet.ru/files.php?id=3&l=english

Этот топик создан только для обсуждения перевода 4images на русский язык.
ПОЖАЛУЙСТА, НЕ ЗАДАВАЙТЕ ВОПРОСЫ НЕ ПО ТЕМЕ!

Pages: 1 ... 23 24 25 26 [27]