Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Witam serdecznie
Chciałem zrobić coś takiego Liczba postów X liczba tematów Y Liczba użytkowników V i najnowszy użytkownik Z
chciałem to mieć na głównej stronie mojej strony www bo na forum jest ale chciałem sobie to zrobić na głównej stronie ale nie wiem jak próbowałem ale nie dałem rady proszę o pomoc najlepiej już gotowe niech ktoś mi zrobi a wersje forum mam phpbb 3.0.5
Chciałem zrobić coś takiego Liczba postów X liczba tematów Y Liczba użytkowników V i najnowszy użytkownik Z
chciałem to mieć na głównej stronie mojej strony www bo na forum jest ale chciałem sobie to zrobić na głównej stronie ale nie wiem jak próbowałem ale nie dałem rady proszę o pomoc najlepiej już gotowe niech ktoś mi zrobi a wersje forum mam phpbb 3.0.5
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
http://www.phpbb.com/kb/article/add-a-n ... -to-phpbb/
demo
test.php
test.html
demo
test.php
Kod: Zaznacz cały
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts = $config['num_posts'];
$total_topics = $config['num_topics'];
$total_users = $config['num_users'];
$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
// Assign index specific vars
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);
page_header('Test');
$template->set_filenames(array(
'body' => 'test.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>Kod: Zaznacz cały
<!-- INCLUDE overall_header_test.html -->
<img style="display: block; margin: 10px auto;" src="images/under_construction.jpg" />
<div class="forumbg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="stat">
<li class="stat">
<h3>{L_STATISTICS}</h3>
<p>{TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER}</p>
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{LOGGED_IN_USER_LIST}
</li>
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer_test.html -->Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Czemu to nie działa może inną wersje do innego forum bo ja mam ver 3.0.5 i coś nie działa to co mam zrobić ??
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Jak nie działa skoro widzę jak działa.Czemu to nie działa
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
no nie działa mi powiec gdzie co mam dać może coś źle robię
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
To
dajesz do głównego katalogu domeny pod nazwą "test.php"
to
do "template" pod nazwą "test.html".
Adres "domena/test.php"
Kod: Zaznacz cały
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts = $config['num_posts'];
$total_topics = $config['num_topics'];
$total_users = $config['num_users'];
$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
// Assign index specific vars
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);
page_header('Test');
$template->set_filenames(array(
'body' => 'test.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>to
Kod: Zaznacz cały
<!-- INCLUDE overall_header.html -->
<img style="display: block; margin: 10px auto;" src="http://sesprites.herobo.com/images/under_construction.jpg" />
<div class="forumbg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="stat">
<li class="stat">
<h3>{L_STATISTICS}</h3>
<p>{TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER}</p>
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{LOGGED_IN_USER_LIST}
</li>
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->Adres "domena/test.php"
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
No nie działa piszę
Kod: Zaznacz cały
Warning: main() [function.main]: Unable to access ./common.php in /var/www/sites/yoyo.pl/l/i/live-for-speed/test.php on line 5
Warning: main(./common.php) [function.main]: failed to open stream: No such file or directory in /var/www/sites/yoyo.pl/l/i/live-for-speed/test.php on line 5
Warning: main() [function.include]: Failed opening './common.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/sites/yoyo.pl/l/i/live-for-speed/test.php on line 5
Fatal error: Call to a member function on a non-object in /var/www/sites/yoyo.pl/l/i/live-for-speed/test.php on line 8
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Jeszcze raz - "test.php" tam gdzie masz "config.php" - "test.html" do LFS_Style/template.
Re: Jak zrobić łącznie posty tematy i inne proszę o pomoc !!
Dobra działa już coś źle zrobiłem ale chciałem tylko
Liczba postów: x
Liczba tematów: x
Liczba użytkowników: x
Najnowszy użytkownik: x
i chciałem to mieć w tabeli na głównej stronie nie na forum
Tak ja na tej stronie http://www.lf2-planeta.yoyo.pl/ po lewej kawałek na dole i takie coś bym bardzo chciał
Liczba postów: x
Liczba tematów: x
Liczba użytkowników: x
Najnowszy użytkownik: x
i chciałem to mieć w tabeli na głównej stronie nie na forum
Tak ja na tej stronie http://www.lf2-planeta.yoyo.pl/ po lewej kawałek na dole i takie coś bym bardzo chciał