Pagina 1 din 2

Instalare mod

Scris: 04-Ian-2011, 16:12:55
de PKK
Am inceput sa instalez un mod pe forum si am ramas blocat la o lasta:
Open: mcp.php
Comments
Find
Tip: This may be a partial find and not the whole line.

Cod: Selectaţi tot

function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
{
	global $db, $user, $auth, $template;

	$sort_days = request_var('st', 0);
	$min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;

	switch ($mode)
	{
		case 'viewforum':
			$type = 'topics';
			$default_key = 't';
			$default_dir = 'd';

			$sql = 'SELECT COUNT(topic_id) AS total
				FROM ' . TOPICS_TABLE . "
				$where_sql forum_id = $forum_id
					AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
In-line Find
Tip: This is a partial match of a line for in-line operations.

Cod: Selectaţi tot

. POST_GLOBAL .
In-line Add after

Cod: Selectaţi tot

 ' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . 
Ce trebuie sa fac?Multumesc

Re: Instalare mod

Scris: 04-Ian-2011, 16:38:45
de Ivan Petre Paul
Să cauţi în codul de mai sus secvenţa

Cod: Selectaţi tot

. POST_GLOBAL .

şi să adaugi după ea secvenţa

Cod: Selectaţi tot

' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
dar nu pe un rând nou, ci pe acelaşi rând, adică ar trebui să arate aşa:

Cod: Selectaţi tot

. POST_GLOBAL .' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
În dreapta sus există o listă de unde poţi alege limba, de ce nu alegi limba română de acolo?

Re: Instalare mod

Scris: 04-Ian-2011, 16:49:58
de PKK
Nu am inteles asta:
paranormal scrie:

Cod: Selectaţi tot

. POST_GLOBAL .' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
Dar de ce ai pus

Cod: Selectaţi tot

. POST_GLOBAL .
in fata daca scrie after

paranormal scrie:În dreapta sus există o listă de unde poţi alege limba, de ce nu alegi limba română de acolo?
Nu am inteles niciodata deunde sa dau in limba romana,m-am uitat de multe ori si nu am gasit.

Re: Instalare mod

Scris: 04-Ian-2011, 16:55:57
de Ivan Petre Paul
add after = adaugă după
in line = în linie
find = caută
in line find = caută în linie

Ce nu ai înţeles este aşa cum ar trebui să arate secvenţa de cod după modificare.
Îţi spune să cauţi

Cod: Selectaţi tot

. POST_GLOBAL .
şi după, să adaugi

Cod: Selectaţi tot

' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
astfel încât să arate aşa:

Cod: Selectaţi tot

. POST_GLOBAL .' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "

Subiect mutat din 3.0.x Cum pot să...?

Re: Instalare mod

Scris: 04-Ian-2011, 19:43:57
de dorin

Re: Instalare mod

Scris: 04-Ian-2011, 20:59:55
de PKK
Find
Tip: This may be a partial find and not the whole line.

Cod: Selectaţi tot

'topic_time_limit'			=> ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
In-line Find
Tip: This is a partial match of a line for in-line operations.

Cod: Selectaţi tot

$topic_type == POST_ANNOUNCE
In-line Add after

Cod: Selectaţi tot

|| $topic_type == POST_NEWS || $topic_type == POST_NEWS_GLOBAL
Si aicea cum fac?ca din primu exemplu nu am inteles

Re: Instalare mod

Scris: 04-Ian-2011, 21:09:04
de bogdan
Citeste acest articol si ai sa afli: http://www.phpbb.ro/knowledge/kb_show.php?id=53

Re: Instalare mod

Scris: 04-Ian-2011, 21:13:08
de PKK
Eu am inteles din ce am citit ca la primu exemplu trebuie sa adaug dupa,iar paranormal a pus inainte,asta nu inteleg eu.El de ce a pus inainte?daca scrie after

Re: Instalare mod

Scris: 04-Ian-2011, 21:16:10
de Ivan Petre Paul
Ce am pus înainte?

Re: Instalare mod

Scris: 04-Ian-2011, 21:23:49
de PKK
paranormal scrie:Să cauţi în codul de mai sus secvenţa

Cod: Selectaţi tot

. POST_GLOBAL .

şi să adaugi după ea secvenţa

Cod: Selectaţi tot

' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
dar nu pe un rând nou, ci pe acelaşi rând, adică ar trebui să arate aşa:

Cod: Selectaţi tot

. POST_GLOBAL .' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL . "
În dreapta sus există o listă de unde poţi alege limba, de ce nu alegi limba română de acolo?
"şi să adaugi după ea secvenţa"

Sorry ca sunt stres,dar nu inteleg si vreau sa invat.