[DEV] Mod Topiclist e Topicposter

Con l'avvento della versione phpBB 3.1 Beta 2 e successive abbiamo rimosso tutte le MOD per sperimentare le estensioni.
Rispondi
Avatar utente
systemcrack
V.I.P.
V.I.P.
Messaggi: 293
Iscritto il: maggio 21, 2010, 11:38 am
Contatta:

[DEV] Mod Topiclist e Topicposter

Messaggio da systemcrack »

Eih! Darkman hai visto questa mod sviluppata da Bingo.. crdo proprio che la monterò prossimamente.

La Mod Topiclist è una evoluzione della mod tlist_simple creata da T@by alla quale va un particolare ringraziamento per avermi dato l'opportunità di prendere spunto dalla sua Mod e per la disponibilità dimostrata affinchè questa versione possa venire pubblicata.

Nome MOD: Topiclist e Topicposter ver.1.0.0
Descrizione MOD: Crea le Liste dei Topics di tutti i Subforum di una Categoria suddividendole per iniziale del Titolo (Topiclist) o per Autore (Topicposter).
Le liste comprendono per defaut tutti i Posts degli ultimi 90 giorni ma è possibile modificare il periodo da un minimo di 7 giorni a un anno e con la possibilità di creare una lista completa di tutti i Posts.
Autore:bingo
Versioni phpBB compatibili: 3.0.x

Demo: http://www.actafungorum.org/actaforum/ attraverso i links "Lista per Titoli" e "Lista per Autori"

Download: mod_topiclist.zip

Ho riportato solo una parte dell'argomente per chi vuole approfondirevedi topic
Very Ignorant People
Avatar utente
plasma
Utenti registrati
Utenti registrati
Messaggi: 12
Iscritto il: maggio 29, 2010, 4:44 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da plasma »

nel link della demo non fungono però
Avatar utente
systemcrack
V.I.P.
V.I.P.
Messaggi: 293
Iscritto il: maggio 21, 2010, 11:38 am
Contatta:

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da systemcrack »

Come no...
Io ci vado e se clicco te li mette in ordine alfabetico... forse non clicchi sui link giusti.. d_bbio
Very Ignorant People
Avatar utente
Silver Surfer
V.I.P.
V.I.P.
Messaggi: 331
Iscritto il: aprile 5, 2009, 8:00 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da Silver Surfer »

Io per la lista dei topic ho adottato e tradotto parzialmente la Sort topics alphabetically di Vojtěch Vondra
che mi sembra l'optimum
Avatar utente
systemcrack
V.I.P.
V.I.P.
Messaggi: 293
Iscritto il: maggio 21, 2010, 11:38 am
Contatta:

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da systemcrack »

Se ce l'hai perchè non lo posti? Immagine
Very Ignorant People
Avatar utente
Darkman
Amministratore
Amministratore
Messaggi: 1204
Iscritto il: marzo 28, 2009, 11:04 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da Darkman »

Hai ragione...è interessante.

P.s.= ho spostato la chat da /forum finchè non mi rispondono gli autori, altrimenti cambio
Avatar utente
Silver Surfer
V.I.P.
V.I.P.
Messaggi: 331
Iscritto il: aprile 5, 2009, 8:00 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da Silver Surfer »

Eccovi la Sort topics alphabetically ( quella originale )


Open: viewforum.php
Find

Codice: Seleziona tutto

if (!$forum_data)
{
	trigger_error('NO_FORUM');
}
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

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);
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

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

Codice: Seleziona tutto

if ($sort_days || $letter)
{
	$min_post_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

OR topic_type = " . POST_ANNOUNCE . ")
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

$sql_where_letter
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'GOTO_PAGE_IMG'				=> $user->img('icon_post_target', 'GOTO_PAGE'),
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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'],
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

// Grab icons
$icons = $cache->obtain_icons();
Add before

Tip: Add these lines on a new blank line before the preceding line(s) to find.
Code: Select All

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

Codice: Seleziona tutto

else
		{
			$topics_count--;
		}
Replace With

Tip: Replace the preceding line(s) to find with the following lines.
Code: Select All

Codice: Seleziona tutto

elseif(empty($letter))
        {
            $topics_count--;
        } 
Find

Tip: This may be a partial find and not the whole line.
Code: Select All
else

Codice: Seleziona tutto

{
	$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;
}
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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);
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

$sql_approved
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

$sql_where_letter
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

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),
Replace With

Tip: Replace the preceding line(s) to find with the following lines.
Code: Select All

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),
Open: includes/acp/acp_forums.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'forum_password_unset'	=> request_var('forum_password_unset', false),
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

'sort_alphabet'			=> request_var('sort_alphabet', 0),
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'forum_password_confirm'=> '',
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

'sort_alphabet'		=> 0,
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'S_FORUM_PASSWORD_SET'		=> (empty($forum_data['forum_password'])) ? false : true,
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

'S_SORT_ALPHABETICALLY'		=> $forum_data['sort_alphabet'],
Open: language/en/viewforum.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'POST_FORUM_LOCKED'		=> 'Forum is locked',
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

Codice: Seleziona tutto

'SORT_ALPHABETICALLY' => 'Sort alphabetically',
'SORT_ALPHABETICALLY' => 'Indice alfabetico',
Open: language/en/acp/forums.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

'REDIRECT_ACL'	=> 'Now you are able to %sset permissions%s for this forum.',
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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.',
'SORT_ALPHABETICALLY' => 'Abilita una lista alfabetica di ordinamento argomenti',
'SORT_ALPHABETICALLY_EXPLAIN' => 'Visualizza un pannello che permette agli utenti
di scegliere di ordinare gli argomenti che iniziano con una lettera specifica o un carattere',
Open: styles/prosilver/template/viewforum_body.html
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

Codice: Seleziona tutto

<!-- BEGIN topicrow -->
Add before

Tip: Add these lines on a new blank line before the preceding line(s) to find.
Code: Select All

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 -->
Open: adm/style/acp_forums.html
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

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>
Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

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>
Save all files. End of MOD.
Avatar utente
systemcrack
V.I.P.
V.I.P.
Messaggi: 293
Iscritto il: maggio 21, 2010, 11:38 am
Contatta:

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da systemcrack »

E bravo Silver! Immagine
Very Ignorant People
Avatar utente
Silver Surfer
V.I.P.
V.I.P.
Messaggi: 331
Iscritto il: aprile 5, 2009, 8:00 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da Silver Surfer »

quando modifichi i file della lingua, occhio alla codifica che deve essere prioritariamente
UTF-8 senza BOM, non so quante volte l'avrò scritto, ma salta sempre fuori qualcuno che non la esegue... e il forum non funziona.
Avatar utente
Darkman
Amministratore
Amministratore
Messaggi: 1204
Iscritto il: marzo 28, 2009, 11:04 pm

Re: [DEV] Mod Topiclist e Topicposter

Messaggio da Darkman »

Grazie 1000 per il contributo Silver, ma qui non siamo su Brain dove gli argomenti sono sterminati, sono pochi argomenti t eschio
Rispondi