Je hebt na de aanpassing de mogelijkheid om de mod te tonen op zowel de index, de portal pagina en op een afzonderlijke pagina. Deze zijn afzonderlijk aan en uit te zetten en je kunt ook de pagination van elke moduul apart aan of uitzetten.
Link naar mod in de database van phpbb.com: https://www.phpbb.com/customise/db/mod/ ... nt_topics/
Link naar de site van de maker van de mod: http://www.flying-bits.org/
Screenshot: http://i48.tinypic.com/9tocvo.jpg
Download link: http://www.dumpspace.nl/?dl_id=13
LET OP: In de db van phpbb.com staat versie 1.0.5, op de site van de maker staat 1.0.6
Ik gebruik zelf Board3 portal en deze aanpassingen zijn ook hiervoor gemaakt, voor andere portals zal je zelf moeten proberen om het te laten functioneren!
Als je de versie 1.0.6 hebt geïnstalleerd kunnen we beginnen met de aanpassingen.....
Voeg onderstaande toe aan je database via phpMyAdmin.
Code: Selecteer alles
INSERT INTO phpbb_config VALUES ('rt_portal', 0, 0);
INSERT INTO phpbb_config VALUES ('rt_number_portal', 5, 0);
INSERT INTO phpbb_config VALUES ('rt_page_number_portal', 0, 0);
INSERT INTO phpbb_config VALUES ('rt_own', 0, 0);
INSERT INTO phpbb_config VALUES ('rt_number_own', 5, 0);
INSERT INTO phpbb_config VALUES ('rt_page_number_own', 0, 0);
adm/style/acp_recenttopics.html
en zoek naar
Code: Selecteer alles
<dd><input type="text" id="rt_number" name="rt_number" size="30" value="{RT_NUMBER}" /></dd>
</dl>
Code: Selecteer alles
<dl>
<dt><label for="rt_number">{L_RT_NUMBER_PORTAL}:</label><br />
<span>{L_RT_NUMBER_PORTAL_EXP}</span></dt>
<dd><input type="text" id="rt_number_portal" name="rt_number_portal" size="30" value="{RT_NUMBER_PORTAL}" /></dd>
</dl>
<dl>
<dt><label for="rt_number">{L_RT_NUMBER_OWN}:</label><br />
<span>{L_RT_NUMBER_OWN_EXP}</span></dt>
<dd><input type="text" id="rt_number_own" name="rt_number_own" size="30" value="{RT_NUMBER_OWN}" /></dd>
</dl>
Code: Selecteer alles
<dd><input type="text" id="rt_page_number" name="rt_page_number" size="30" value="{RT_PAGE_NUMBER}" /></dd>
</dl>
Code: Selecteer alles
<dl>
<dt><label for="rt_page_number">{L_RT_PAGE_NUMBER_PORTAL}:</label><br />
<span>{L_RT_PAGE_NUMBER_PORTAL_EXP}</span></dt>
<dd><input type="text" id="rt_page_number_portal" name="rt_page_number_portal" size="30" value="{RT_PAGE_NUMBER_PORTAL}" /></dd>
</dl>
<dl>
<dt><label for="rt_page_number">{L_RT_PAGE_NUMBER_OWN}:</label><br />
<span>{L_RT_PAGE_NUMBER_OWN_EXP}</span></dt>
<dd><input type="text" id="rt_page_number_own" name="rt_page_number_own" size="30" value="{RT_PAGE_NUMBER_OWN}" /></dd>
</dl>
Code: Selecteer alles
<input type="radio" class="radio" name="rt_index" value="0" <!-- IF not RT_INDEX -->checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
Code: Selecteer alles
<dl>
<dt><label for="rt_index">{L_RT_PORTAL}</label></dt>
<dd><input type="radio" class="radio" id="rt_portal" name="rt_portal" value="1" <!-- IF RT_PORTAL -->checked="checked"<!-- ENDIF -->/> {L_YES}
<input type="radio" class="radio" name="rt_portal" value="0" <!-- IF not RT_PORTAL -->checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
<dl>
<dt><label for="rt_index">{L_RT_OWN}</label></dt>
<dd><input type="radio" class="radio" id="rt_own" name="rt_own" value="1" <!-- IF RT_OWN -->checked="checked"<!-- ENDIF -->/> {L_YES}
<input type="radio" class="radio" name="rt_own" value="0" <!-- IF not RT_OWN -->checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
</dl>
Open
includes/acp/acp_recenttopics.php
en zoek naar:
Code: Selecteer alles
set_config('rt_number', request_var('rt_number', 5));
Code: Selecteer alles
set_config('rt_number_portal', request_var('rt_number_portal', 5));
set_config('rt_number_own', request_var('rt_number_own', 5));
Code: Selecteer alles
set_config('rt_page_number', request_var('rt_page_number', 0));
Code: Selecteer alles
set_config('rt_page_number_portal', request_var('rt_page_number_portal', 0));
set_config('rt_page_number_own', request_var('rt_page_number_own', 0));
Code: Selecteer alles
set_config('rt_index', request_var('rt_index', 0));
Code: Selecteer alles
set_config('rt_portal', request_var('rt_portal', 0));
set_config('rt_own', request_var('rt_own', 0));
Code: Selecteer alles
'RT_NUMBER' => $config['rt_number'],
Code: Selecteer alles
'RT_NUMBER_PORTAL' => $config['rt_number_portal'],
'RT_NUMBER_OWN' => $config['rt_number_own'],
Code: Selecteer alles
'RT_PAGE_NUMBER' => $config['rt_page_number'],
Code: Selecteer alles
'RT_PAGE_NUMBER_PORTAL' => $config['rt_page_number_portal'],
'RT_PAGE_NUMBER_OWN' => $config['rt_page_number_own'],
Code: Selecteer alles
'RT_INDEX' => $config['rt_index'],
Code: Selecteer alles
'RT_PORTAL' => $config['rt_portal'],
'RT_OWN' => $config['rt_own'],
Open
language/en/mods/info_acp_recenttopics.php
en zoek naar:
Code: Selecteer alles
'RT_NUMBER' => 'Recent topics',
Code: Selecteer alles
'RT_NUMBER' => 'Recent topics on the index',
Code: Selecteer alles
'RT_NUMBER_PORTAL' => 'Recent topics on the portal',
'RT_NUMBER_OWN' => 'Recent topics on own page',
Code: Selecteer alles
'RT_NUMBER_EXP' => 'Number of topics displayed on the index.',
Code: Selecteer alles
'RT_NUMBER_PORTAL_EXP' => 'Number of topics displayed on the portal.',
'RT_NUMBER_OWN_EXP' => 'Number of topics displayed on own page.',
Code: Selecteer alles
'RT_PAGE_NUMBER' => 'Recent topics pages',
Code: Selecteer alles
'RT_PAGE_NUMBER' => 'Recent topics pages on the index',
Code: Selecteer alles
'RT_PAGE_NUMBER_EXP' => 'You can display some more recent topics on a little pagination. Just enter 1 to disable this feature. If you enter 0 there will be so much pages as needed to display all topics.',
Code: Selecteer alles
'RT_PAGE_NUMBER_PORTAL' => 'Recent topics pages on the portal',
'RT_PAGE_NUMBER_PORTAL_EXP' => 'You can display some more recent topics on a little pagination. Just enter 1 to disable this feature. If you enter 0 there will be so much pages as needed to display all topics.',
'RT_PAGE_NUMBER_OWN' => 'Recent topics pages on own page',
'RT_PAGE_NUMBER_OWN_EXP' => 'You can display some more recent topics on a little pagination. Just enter 1 to disable this feature. If you enter 0 there will be so much pages as needed to display all topics.',
Code: Selecteer alles
'RT_INDEX' => 'Index',
Code: Selecteer alles
'RT_PORTAL' => 'Portal',
'RT_OWN' => 'Own page',
Open
index.php
en zoek:
Code: Selecteer alles
// Output page
Code: Selecteer alles
if ($config['rt_index'])
{
if (!function_exists('display_recent_topics'))
{
include($phpbb_root_path . 'includes/functions_recenttopics.' . $phpEx);
}
display_recent_topics($config['rt_number'], $config['rt_page_number'], $config['rt_anti_topics'], 'recent_topics', request_var('f', 0), true, $config['rt_parents']);
}
portal.php
en zoek:
Code: Selecteer alles
// Output page
Code: Selecteer alles
if ($config['rt_portal'])
{
if (!function_exists('display_recent_topics'))
{
include($phpbb_root_path . 'includes/functions_recenttopics.' . $phpEx);
}
display_recent_topics($config['rt_number_portal'], $config['rt_page_number_portal'], $config['rt_anti_topics'], 'recent_topics', request_var('f', 0), true, $config['rt_parents']);
}
Open
viewonline.php
en zoek:
Code: Selecteer alles
case 'index':
$location = $user->lang['INDEX'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;
Code: Selecteer alles
case 'recent':
$user->add_lang('mods/recent');
$location = $user->lang['VIEWING_RECENT'];
$location_url = append_sid("{$phpbb_root_path}recent.$phpEx");
break;
Open
includes/functions.php
en zoek:
Code: Selecteer alles
// The following assigns all _common_ variables that may be used at any point in a template.
Code: Selecteer alles
$user->add_lang('mods/recent');
Code: Selecteer alles
'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),
Code: Selecteer alles
'U_RECENT' => append_sid("{$phpbb_root_path}recent.$phpEx"),
styles/prosilver/template/overall_header.html
Zoek naar:
Code: Selecteer alles
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
Code: Selecteer alles
<li class="icon-pages"><a href="{U_RECENT}" title="{L_RECENT_EXPLAIN}">{L_RECENT}</a></li>
Download link: http://www.dumpspace.nl/?dl_id=13