Forum Goals on Portal

Download and support for PhpBB3 Simple Portal
Locked
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Forum Goals on Portal

Post by Stoker »

Forum Goals on Portal
Written by Stoker

Once again, with a few edits we can put the Forum Goal Mod on the simple portal.

Open portal.php
Find:

Code: Select all

page_header($user->lang['PORTAL_HEADLINE']);
Before add:

Code: Select all

if (!empty($config['forum_goals_posts_enable']) &&  $config['forum_goals_posts'] > 0)
{
$forum_goals_posts_percent = ($total_posts * 100) / $config['forum_goals_posts'];
$forum_goals_posts_rest = $config['forum_goals_posts'] - $total_posts;
$template->assign_vars(array(
   'FPG_ENABLE'		            	=> $config['forum_goals_posts_enable'],
   'FORUM_POST_GOAL'            	=> $config['forum_goals_posts'],
   'FORUM_POST_PERCENT'            	=> number_format($forum_goals_posts_percent),
   'FORUM_POST_REST'            	=> $forum_goals_posts_rest,
));
}

if (!empty($config['forum_goals_topics_enable']) &&  $config['forum_goals_topics'] > 0)
{
$forum_goals_topics_percent = ($total_topics * 100) / $config['forum_goals_topics'];
$forum_goals_topics_rest = $config['forum_goals_topics'] - $total_topics;
$template->assign_vars(array(
   'FTG_ENABLE'		            	=> $config['forum_goals_topics_enable'],
   'FORUM_TOPIC_GOAL'            	=> $config['forum_goals_topics'],
   'FORUM_TOPIC_PERCENT'            => number_format($forum_goals_topics_percent),
   'FORUM_TOPIC_REST'            	=> $forum_goals_topics_rest,
));
}

if (!empty($config['forum_goals_users_enable']) &&  $config['forum_goals_users'] > 0)
{
$forum_goals_users_percent = ($total_users * 100) / $config['forum_goals_users'];
$forum_goals_users_rest = $config['forum_goals_users'] - $total_users;
$template->assign_vars(array(
   'FUG_ENABLE'		            	=> $config['forum_goals_users_enable'],
   'FORUM_USER_GOAL'            	=> $config['forum_goals_users'],
   'FORUM_USER_PERCENT'            	=> number_format($forum_goals_users_percent),
   'FORUM_USER_REST'            	=> $forum_goals_users_rest,
));
}

if (!empty($config['forum_goals_files_enable']) &&  $config['forum_goals_files'] > 0)
{
$total_files	= $config['num_files'];
$l_total_file_s = ($total_files == 0) ? 'TOTAL_FILES_ZERO' : 'TOTAL_FILES_OTHER';
$forum_goals_files_percent = ($total_files * 100) / $config['forum_goals_files'];
$forum_goals_files_rest = $config['forum_goals_files'] - $total_files;
$template->assign_vars(array(
   'FFG_ENABLE'		            	=> $config['forum_goals_files_enable'],
   'TOTAL_FILES'	            	=> sprintf($user->lang[$l_total_file_s], $total_files),
   'FORUM_FILES_GOAL'            	=> $config['forum_goals_files'],
   'FORUM_FILES_PERCENT'            => number_format($forum_goals_files_percent),
   'FORUM_FILES_REST'            	=> $forum_goals_files_rest,
));
}

if ((class_exists('phpbb_gallery_integration')) && !empty($config['forum_goals_gallery_enable']) &&  $config['forum_goals_gallery'] > 0)
{
$forum_goals_gallery_percent = (phpbb_gallery_config::get('num_images') * 100) / $config['forum_goals_gallery'];
$forum_goals_gallery_rest = $config['forum_goals_gallery'] - phpbb_gallery_config::get('num_images');
$template->assign_vars(array(
   'FGG_ENABLE'		            	=> $config['forum_goals_gallery_enable'],
   'FORUM_GALLERY_GOAL'            	=> $config['forum_goals_gallery'],
   'FORUM_GALLERY_PERCENT'          => number_format($forum_goals_gallery_percent),
   'FORUM_GALLERY_REST'            	=> $forum_goals_gallery_rest,
));
}
Open styles/prosilver/template/simpleportal_body.html
Find:

Code: Select all

<!-- End Welcome -->
After add:

Code: Select all

<!-- IF FPG_ENABLE or FTG_ENABLE or FUG_ENABLE or FFG_ENABLE or FGG_ENABLE -->
<!-- INCLUDE forum_goal_body.html -->
<!-- ENDIF -->
Board rules! No PM support
webmaster
BBCoder II
BBCoder II
Posts: 69
Joined: 19 Nov 2011, 23:52
BBCodes: 5
Favourite BBCode: Rainbow
Favourite MOD: Please wait
Location: Bangladesh
Contact:

Forum Goals on Portal

Post by webmaster »

Thanks bro for yOur awesOme MOD..!!
Locked