phpbb Gallery - addon or feature

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

phpbb Gallery - addon or feature

Post 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!
You do not have the required permissions to view the files attached to this post.

phpbb Gallery - addon or feature

Post 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

Post by smallbreeds »

Ok! Thanks! :D

phpbb Gallery - addon or feature

Post by Stoker »

Its included in the new download ;)

phpbb Gallery - addon or feature

Post by smallbreeds »

Thanks Stoker!

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

phpbb Gallery - addon or feature

Post 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

Post by smallbreeds »

I've seen Stoker. Thank you!

index.php. I would not hit ever.