Codice: Seleziona tutto
ALTER TABLE phpbb_forums ADD sort_alphabet TINYINT( 1 ) NOT NULL DEFAULT '0';
Codice: Seleziona tutto
if (!$forum_data)
{
trigger_error('NO_FORUM');
}
Codice: Seleziona tutto
// Begin Sort topics alphabetically
$letter = request_var('letter', '');
if (!in_array($letter, range('A', 'Z')) && $letter != 'other' || !$forum_data['sort_alphabet'])
{
$letter = '';
}
// End Sort topics alphabetically
Codice: Seleziona tutto
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
Codice: Seleziona tutto
// Begin sort topics alphabetically
// A bit of phpBB code from memberlist, thank you
$sql_where_letter = '';
if ($letter == 'other')
{
for ($i = 97; $i < 123; $i++)
{
$sql_where_letter .= ' AND topic_title NOT ' . $db->sql_like_expression(chr($i) . $db->any_char);
}
}
else if ($letter)
{
$sql_where_letter .= ' AND topic_title ' . $db->sql_like_expression(substr($letter, 0, 1) . $db->any_char);
}
// End sort topics alphabetically
Codice: Seleziona tutto
if ($sort_days)
{
$min_post_time = time() - ($sort_days * 86400);
Replace With
Tip: Replace the preceding line(s) to find with the following lines.
Code: Select All
if ($sort_days || $letter)
{
$min_post_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
Codice: Seleziona tutto
OR topic_type = " . POST_ANNOUNCE . ")
Codice: Seleziona tutto
$sql_where_letter
Codice: Seleziona tutto
GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
Codice: Seleziona tutto
'U_ALL_TOPICS' => append_sid("viewforum.$phpEx", "f=$forum_id&letter=&st=$sort_days&sk=$sort_key&sd=$sort_dir"),
'S_SORT_ALPHABET' => $forum_data['sort_alphabet'],
Codice: Seleziona tutto
// Grab icons
$icons = $cache->obtain_icons();
Codice: Seleziona tutto
// Begin sort topics alphabetically
foreach (range('A', 'Z') as $single_letter)
{
$template->assign_block_vars('alphabet', array(
'LETTER' => $single_letter,
'U_LETTER' => append_sid("viewforum.$phpEx", "f=$forum_id&letter=$single_letter&$u_sort_param"),
'DIVIDER' => ',',
));
}
$template->assign_block_vars('alphabet', array(
'LETTER' => "#",
'U_LETTER' => append_sid("viewforum.$phpEx", "f=$forum_id&letter=other&$u_sort_param"),
'DIVIDER' => '',
));
// End sort topics alphabetically
Find
Tip: This may be a partial find and not the whole line.
Code: Select All
else
{
$topics_count--;
}
Codice: Seleziona tutto
elseif(empty($letter))
{
$topics_count--;
}
Codice: Seleziona tutto
else
{
$get_forum_ids = array_diff($active_forum_ary['forum_id'], $active_forum_ary['exclude_forum_id']);
$sql_where = (sizeof($get_forum_ids)) ? $db->sql_in_set('t.forum_id', $get_forum_ids) : 't.forum_id = ' . $forum_id;
}
Codice: Seleziona tutto
// Sort topic alphabetically
// We need to edit the once generated where part of the query, since table shortcuts are used
$sql_where_letter = str_replace('topic_title', 't.topic_title', $sql_where_letter);
Codice: Seleziona tutto
$sql_approved
Codice: Seleziona tutto
$sql_where_letter
Codice: Seleziona tutto
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start),
Codice: Seleziona tutto
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&letter=$letter&$u_sort_param"), $topics_count, $config['topics_per_page'], $start),
Codice: Seleziona tutto
'forum_password_unset' => request_var('forum_password_unset', false),
Codice: Seleziona tutto
'sort_alphabet' => request_var('sort_alphabet', 0),
Codice: Seleziona tutto
'forum_password_confirm'=> '',
Codice: Seleziona tutto
'sort_alphabet' => 0,
Codice: Seleziona tutto
'S_FORUM_PASSWORD_SET' => (empty($forum_data['forum_password'])) ? false : true,
Codice: Seleziona tutto
'S_SORT_ALPHABETICALLY' => $forum_data['sort_alphabet'],
Codice: Seleziona tutto
'POST_FORUM_LOCKED' => 'Forum is locked',
Codice: Seleziona tutto
'SORT_ALPHABETICALLY' => 'Sort alphabetically',
Codice: Seleziona tutto
'REDIRECT_ACL' => 'Now you are able to %sset permissions%s for this forum.',
Codice: Seleziona tutto
'SORT_ALPHABETICALLY' => 'Allow sorting by first letters',
'SORT_ALPHABETICALLY_EXPLAIN' => 'Displays a panel which lets users to choose to display topics starting with a specific letter or character.',
Codice: Seleziona tutto
<!-- BEGIN topicrow -->
Codice: Seleziona tutto
<!-- IF S_SORT_ALPHABET -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="linklist">
<li><strong style="font-size: 0.95em;">{L_SORT_ALPHABETICALLY}: <a href="{U_ALL_TOPICS}" style="font-weight: bold;">{L_ALL_TOPICS}</a>,
<!-- BEGIN alphabet -->
<a href="{alphabet.U_LETTER}" style="font-weight: bold;">{alphabet.LETTER}</a>{alphabet.DIVIDER}
<!-- END alphabet --></strong>
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
Codice: Seleziona tutto
<dl>
<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
</dl>
Codice: Seleziona tutto
<dl>
<dt><label for="sort_alphabet">{L_SORT_ALPHABETICALLY}:</label><br /><span>{L_SORT_ALPHABETICALLY_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="sort_alphabet" value="1"<!-- IF S_SORT_ALPHABETICALLY --> id="sort_alphabet" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="sort_alphabet" value="0"<!-- IF not S_SORT_ALPHABETICALLY --> id="sort_alphabet" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
brunino (39), systemcrack (20), airenzo (3), MadCon88 (7), Galixte de EzCom (1), alex75 (1), costanzo (1), Peralta (1), spyro (7), ozzi (6), Buddy (2), uruguayito (1), RTI kartname (2), serialcode (1), caroline (1), Alex80r (1)
Torna a “Extensions request - Richiesta Estensioni”
Visitano il forum: Bing [Bot] e 3 ospiti