Jump to content

Миниатюры в Статистике прикрепленных файлов


Cheshir
 Share

Recommended Posts

post-49214-0-98604500-1363345447_thumb.jpg

 

/applications/forums/skin_cp/cp_skin_attachments.php

 

Заменить

 

 

 

//--starthtml--//

$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['attach_stats_head']}</h2>
</div>

<div class='acp-box'>
<h3>{$this->lang->words['atc_overview']}</h3>

<table class='ipsTable'>
	<tr>
		<td width='30%'>{$this->lang->words['atc_number']}</td>
		<td width='20%'>{$overall_stats['total_attachments']}</td>
		<td width='30%'>{$this->lang->words['atc_diskusage']}</td>
		<td width='20%'>{$overall_stats['total_size']}</td>
	</tr>
</table>
</div><br />

<form action='{$this->settings['base_url']}&module=attachments&section=search' method='post' name='theAdminForm'  id='theAdminForm'>
<input type='hidden' name='do' value='attach_bulk_remove' />
<input type='hidden' name='return' value='stats' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>
	<h3>{$this->lang->words['atc_last5']}</h3>

	<table class='ipsTable'>
		<tr>
			<th style='width: 2%'> </th>
			<th style='width: 20%'>{$this->lang->words['atc_attachment']}</th>
			<th style='width: 11%'>{$this->lang->words['atc_size']}</th>
			<th style='width: 15%'>{$this->lang->words['atc_author']}</th>
			<th style='width: 25%'>{$this->lang->words['atc_topic']}</th>
			<th style='width: 25%'>{$this->lang->words['atc_posted']}</th>
			<th style='width: 2%'> </th>
		</tr>
HTML;

foreach( $last_5 as $r )
{
$IPBHTML .= <<<HTML
		<tr>
			<td><img src='{$r['_icon']}' /></td>
			<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td>{$r['attach_filesize']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td>{$r['stitle']}</td>
			<td>{$r['post_date']}</td>
			<td><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
	</table>		
</div><br />

<div class='acp-box'>
<h3>{$this->lang->words['atc_largest5']}</h3>

<table class='ipsTable'>
	<tr>
		<th> </th>
		<th>{$this->lang->words['atc_attachment']}</th>
		<th>{$this->lang->words['atc_size']}</th>
		<th>{$this->lang->words['atc_author']}</th>
		<th>{$this->lang->words['atc_topic']}</th>
		<th>{$this->lang->words['atc_posted']}</th>
		<th> </td>
	</tr>
HTML;

foreach( $largest_5 as $r )
{
$IPBHTML .= <<<HTML
		<tr>
			<td width='1%'><img src='{$r['_icon']}'/></td>
			<td width='20%'><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td width='10%'>{$r['attach_filesize']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td width='25%'>{$r['stitle']}</td>
			<td width='25%'>{$r['post_date']}</td>
			<td width='1%'><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
</table>
</div><br />

<div class='acp-box'>
<h3>{$this->lang->words['atc_top5']}</h3>

<table class='ipsTable'>
	<tr>
		<th width='1%'> </th>
		<th width='20%'>{$this->lang->words['atc_attachment']}</th>
		<th width='10%'>{$this->lang->words['atc_viewed']}</th>
		<th width='15%'>{$this->lang->words['atc_author']}</th>
		<th width='25%'>{$this->lang->words['atc_topic']}</th>
		<th width='25%'>{$this->lang->words['atc_posted']}</th>
		<th width='1%'> </th>
	</tr>
HTML;

foreach( $most_viewed_5 as $r )
{//print_r($r);exit();
$IPBHTML .= <<<HTML
		<tr>
			<td width='1%'><img src='{$r['_icon']}' /></td>
			<td width='20%'><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td width='10%'>{$r['attach_hits']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td width='25%'>{$r['stitle']}</td>
			<td width='25%'>{$r['post_date']}</td>
			<td width='1%'><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
	</table>		

	<div class='acp-actionbar'>
		<div class='rightaction'>
			<input type='submit' value='{$this->lang->words['atc_deletebutton']}' class='button primary'>
		</div>
	</div>
</div>
</form>
HTML;

//--endhtml--//

 

 

 

на

 

 

 

//--starthtml--//

$IPBHTML .= <<<HTML
<div class='section_title'>
<h2>{$this->lang->words['attach_stats_head']}</h2>
</div>

<div class='acp-box'>
<h3>{$this->lang->words['atc_overview']}</h3>

<table class='ipsTable'>
	<tr>
		<td width='30%'>{$this->lang->words['atc_number']}</td>
		<td width='20%'>{$overall_stats['total_attachments']}</td>
		<td width='30%'>{$this->lang->words['atc_diskusage']}</td>
		<td width='20%'>{$overall_stats['total_size']}</td>
	</tr>
</table>
</div><br />

<form action='{$this->settings['base_url']}&module=attachments&section=search' method='post' name='theAdminForm'  id='theAdminForm'>
<input type='hidden' name='do' value='attach_bulk_remove' />
<input type='hidden' name='return' value='stats' />
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>
	<h3>{$this->lang->words['atc_last5']}</h3>

	<table class='ipsTable'>
		<tr>
			<th style='width: 2%'> </th>
			<th style='width: 20%'>{$this->lang->words['atc_attachment']}</th>
			<th style='width: 10%'>Миниатюра</th>
			<th style='width: 11%'>{$this->lang->words['atc_size']}</th>
			<th style='width: 15%'>{$this->lang->words['atc_author']}</th>
			<th style='width: 20%'>{$this->lang->words['atc_topic']}</th>
			<th style='width: 20%'>{$this->lang->words['atc_posted']}</th>
			<th style='width: 2%'> </th>
		</tr>
HTML;

foreach( $last_5 as $r )
{
$IPBHTML .= <<<HTML
		<tr>
			<td><img src='{$r['_icon']}' /></td>
			<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'><img width='30px' src='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' /></a></td>
			<td>{$r['attach_filesize']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td>{$r['stitle']}</td>
			<td>{$r['post_date']}</td>
			<td><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
	</table>		
</div><br />

<div class='acp-box'>
<h3>{$this->lang->words['atc_largest5']}</h3>

<table class='ipsTable'>
	<tr>
		<th> </th>
		<th>{$this->lang->words['atc_attachment']}</th>
		<th>Миниатюра</th>
		<th>{$this->lang->words['atc_size']}</th>
		<th>{$this->lang->words['atc_author']}</th>
		<th>{$this->lang->words['atc_topic']}</th>
		<th>{$this->lang->words['atc_posted']}</th>
		<th> </td>
	</tr>
HTML;

foreach( $largest_5 as $r )
{
$IPBHTML .= <<<HTML
		<tr>
			<td width='1%'><img src='{$r['_icon']}'/></td>
			<td width='20%'><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'><img width='30px' src='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' /></a></td>
			<td width='10%'>{$r['attach_filesize']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td width='25%'>{$r['stitle']}</td>
			<td width='25%'>{$r['post_date']}</td>
			<td width='1%'><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
</table>
</div><br />

<div class='acp-box'>
<h3>{$this->lang->words['atc_top5']}</h3>

<table class='ipsTable'>
	<tr>
		<th width='1%'> </th>
		<th width='20%'>{$this->lang->words['atc_attachment']}</th>
		<th width='10%'>Миниатюра</th>
		<th width='10%'>{$this->lang->words['atc_viewed']}</th>
		<th width='15%'>{$this->lang->words['atc_author']}</th>
		<th width='20%'>{$this->lang->words['atc_topic']}</th>
		<th width='20%'>{$this->lang->words['atc_posted']}</th>
		<th width='1%'> </th>
	</tr>
HTML;

foreach( $most_viewed_5 as $r )
{//print_r($r);exit();
$IPBHTML .= <<<HTML
		<tr>
			<td width='1%'><img src='{$r['_icon']}' /></td>
			<td width='20%'><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'>{$r['attach_file']}</a></td>
			<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' target='_blank'><img width='30px' src='{$this->settings['board_url']}/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$r['attach_id']}' /></a></td>				
			<td width='10%'>{$r['attach_hits']}</td>
HTML;

if( $r['attach_member_id'] )
{
$IPBHTML .= <<<HTML
<td><a href='{$this->settings['board_url']}/index.php?showuser={$r['attach_member_id']}'>{$r['members_display_name']}</a></td>
HTML;
}
else
{
$IPBHTML .= <<<HTML
<td>{$r['members_display_name']}</td>
HTML;
}

$IPBHTML .= <<<HTML
			<td width='25%'>{$r['stitle']}</td>
			<td width='25%'>{$r['post_date']}</td>
			<td width='1%'><div align='center'><input type='checkbox' name='attach_{$r['attach_id']}' value='1' /></div></td>
		</tr>
HTML;
}

$IPBHTML .= <<<HTML
	</table>		

	<div class='acp-actionbar'>
		<div class='rightaction'>
			<input type='submit' value='{$this->lang->words['atc_deletebutton']}' class='button primary'>
		</div>
	</div>
</div>
</form>
HTML;

//--endhtml--//


 

 

Link to comment
Share on other sites

Добавление миниатюр при выводе результатов поиска

 

post-49214-0-61065100-1363346032_thumb.jpg

 

/applications/forums/skin_cp/cp_skin_attachments.php

найти

<th width='20%'>{$this->lang->words['se_attachment']}</th>

 

добавить ниже

 

<th width='10%'>Миниатюра</th>

 

Изменить ширину столбцов:

<th width='25%'>{$this->lang->words['se_topic']}</th>

<th width='25%'>{$this->lang->words['se_posted']}</th>

 

с 25% на 20%

 

Найти

 

<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&type={$r['attach_rel_module']}&attach_id={$r['attach_id']}'>{$r['attach_file']}</a></td>

 

Добавить ниже

<td><a href='{$this->settings['board_url']}/index.php?app=core&module=attach&type={$r['attach_rel_module']}&attach_id={$r['attach_id']}'><img width="30px" src='{$this->settings['board_url']}/index.php?app=core&module=attach&type={$r['attach_rel_module']}&attach_id={$r['attach_id']}' /></a></td>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...