Page 1 of 1

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 00:38
by smallbreeds
Hello!

I would have phpBB Gallery, along with Goals Forum.

I did the following: (Of course it is a copy of your code.)

Open: style/template/prosilver/forum_goal_body.html
Find:

Code: Select all

</tbody>
Add before:

Code: Select all

			<!-- IF FIG_ENABLE -->
			<tr>
			  <td style="width: 180px; font-size:12px;">{L_TOTAL_FORUM_IMAGES_GOAL} <strong>{FORUM_IMAGES_GOAL}</strong></td>
			  <td style="width: 180px; font-size:12px;">{TOTAL_IMAGES}</td>
			  <td style="width: 150px; font-size:12px;"><!-- IF FORUM_IMAGES_PERCENT < 100 -->{L_GOAL_REMAINING} <strong>{FORUM_IMAGES_REST}</strong><!-- ELSE --><em>{L_GOAL_REMAINING_ZERO}</em><!-- ENDIF --></td>
			   <td><div style="background:url('{ROOT_PATH}images/forum_goal_grey.png') repeat-x; background-color: #cccccc; border: 1px solid black; width:100%;"><div style="background:url('{ROOT_PATH}images/forum_goal_green.png') repeat-x;background-color: #008040; color: white; font-weight:bold; max-width:100%;  width:{FORUM_TOPIC_PERCENT}%; height:12px;"><span style="padding-left:25px; font-size:10px; line-height:12px;">{FORUM_IMAGES_PERCENT}%</span></div></div></td>
			</tr>
			<!-- ENDIF -->
Open: includes/acp/acp_board.php
Find:

Code: Select all

						'forum_goals_users'				=> array('lang' => 'FUG_NUMBER',	'validate' => 'int',   	'type' => 'text:15:8', 'explain' => false),
Add after:

Code: Select all

						'forum_goals_images_enable'		=> array('lang' => 'FIG_ENABLE',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),
						'forum_goals_images'			=> array('lang' => 'FIG_NUMBER',	'validate' => 'int',   	'type' => 'text:15:8', 'explain' => false),
Open: language/en/acp/board.php
Find:

Code: Select all

	'FUG_NUMBER'				=> 'Informe a quantidade de registros de usuários para cumprir a meta',
Add after:

Code: Select all

	'FIG_ENABLE'				=> 'Ativar ou desativar metas de imagens na Galeria do Fórum',
	'FIG_NUMBER'				=> 'Informe a quantidade de imagens na Galeria para cumprir a meta',
Open: language/en/common.php
Find:

Code: Select all

	'TOTAL_FORUM_USER_GOAL'		=> 'Meta de Usuários',
Add after:

Code: Select all

	'TOTAL_FORUM_IMAGES_GOAL'	=> 'Meta de Imagens',
Open: index.php
Find:

Code: Select all

   'FORUM_USER_REST'            	=> $forum_goals_users_rest,
));
}
Add after:

Code: Select all

if (!empty($config['forum_goals_images_enable']) &&  $config['forum_goals_images'] > 0)
{
$forum_goals_images_percent = ($total_images * 100) / $config['forum_goals_images'];
$forum_goals_images_rest = $config['forum_goals_images'] - $total_images;
$template->assign_vars(array(
   'FIG_ENABLE'		            	=> $config['forum_goals_images_enable'],
   'FORUM_IMAGES_GOAL'            	=> $config['forum_goals_images'],
   'FORUM_IMAGES_PERCENT'            	=> number_format($forum_goals_images_percent),
   'FORUM_IMAGES_REST'            	=> $forum_goals_images_rest,
));
}
Also changed the install to run all together.

Open: install_forum_goal.php
Find:

Code: Select all

			array('forum_goals_users', 0),
Add after:

Code: Select all

			array('forum_goals_images_enable', 0),
			array('forum_goals_images', 0),
But the result was this.
goals.JPG
It would be possible to help this?

Thank you!

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 08:21
by Stoker
Hello smallbreeds,

I will install the gallery on my testboard and see what I can figure out and then write an addon for this.
There is probably more users who want to add this.

Hopefully I get the time later today, else sometime this weekend.

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 10:33
by smallbreeds
Ok! Thanks! :D

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 19:38
by Stoker
Its included in the new download ;)

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 19:52
by smallbreeds
Thanks Stoker!

( I would like to understand. What was wrong with the code above? )

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 19:55
by Stoker
I dont know, I didnt look at it.
Its much easier for me to mod a testforum and see what I can figure out.

But you can compare the code to see the diff.

phpbb Gallery - addon or feature

Posted: 25 Nov 2011, 19:57
by smallbreeds
I've seen Stoker. Thank you!

index.php. I would not hit ever.