Jump to content
Sign in to follow this  
meler

Thanks Mod Advanced zlicznie ilosci podziekowan

Recommended Posts

Witam,

oczywiście żaden problem :)

1. otwórz sources/action_public/topics.php

znajdź:

if ($this->ipsclass->vars['thanks_mod_enable'])
{
$member_thanks = explode(',',$row['post_thanks']);

if ( ( in_array($this->topic['forum_id'], explode(',',$this->ipsclass->vars['thanks_forums'])) or (!$this->ipsclass->vars['thanks_forum_lim']) )
and ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_from_groups'])) or (!$this->ipsclass->vars['thanks_from_grp_lim']) )
and ( in_array($poster['mgroup'], explode(',',$this->ipsclass->vars['thanks_to_groups'])) or (!$this->ipsclass->vars['thanks_to_grp_lim']) )
and ($this->ipsclass->member['id']) )
{
if ( (!in_array($this->ipsclass->member['id'],$member_thanks)) and ($this->ipsclass->member['id'] != $row['author_id']) and ($row['pid'] == $this->topic['topic_firstpost']))
{
$row['thanks_button'] = $this->ipsclass->compiled_templates['skin_topic']->button_thanks($row['pid'] );
}
}

if ( ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_view_groups'])) or (!$this->ipsclass->vars['thanks_view_grp_lim']) )
and ( (count($member_thanks) > 0) && ($member_thanks[0] != "") ) )
{
$in_thanks = (count($member_thanks)==2) ? $row['post_thanks'] : implode(',',$member_thanks);

$this->ipsclass->DB->query( "SELECT m.members_display_name,m.id,m.mgroup, g.g_id,g.prefix,g.suffix FROM ibf_members m
LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )
WHERE id IN ({$in_thanks}) " );

while($who_thanks = $this->ipsclass->DB->fetch_row())
{


$show_thanks .= "<a href='{$this->ipsclass->base_url}showuser={$who_thanks['id']}'>";
$show_thanks .= $who_thanks['prefix'].$who_thanks['members_display_name'].$who_thanks['suffix'];
$show_thanks .= "</a>, ";
$show_thanks_finish = substr($show_thanks, 0, -2);


}

$row['who_thanks'] = $this->ipsclass->compiled_templates['skin_global']->thanks_separator( $show_thanks_finish );
}
}[/code] [b]Zamień na:[/b]
[code]if ($this->ipsclass->vars['thanks_mod_enable'])
{
$member_thanks = explode(',',$row['post_thanks']);

if ( ( in_array($this->topic['forum_id'], explode(',',$this->ipsclass->vars['thanks_forums'])) or (!$this->ipsclass->vars['thanks_forum_lim']) )
and ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_from_groups'])) or (!$this->ipsclass->vars['thanks_from_grp_lim']) )
and ( in_array($poster['mgroup'], explode(',',$this->ipsclass->vars['thanks_to_groups'])) or (!$this->ipsclass->vars['thanks_to_grp_lim']) )
and ($this->ipsclass->member['id']) )
{
if ( (!in_array($this->ipsclass->member['id'],$member_thanks)) and ($this->ipsclass->member['id'] != $row['author_id']) and ($row['pid'] == $this->topic['topic_firstpost']))
{
$row['thanks_button'] = $this->ipsclass->compiled_templates['skin_topic']->button_thanks($row['pid'] );
}
}

if ( ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_view_groups'])) or (!$this->ipsclass->vars['thanks_view_grp_lim']) )
and ( (count($member_thanks) > 0) && ($member_thanks[0] != "") ) )
{
$memberJoined = implode(',',$member_thanks);
$count = count(explode(',',$memberJoined));
$in_thanks = (count($member_thanks)==2) ? $row['post_thanks'] : $memberJoined;

$this->ipsclass->DB->query( "SELECT m.members_display_name,m.id,m.mgroup, g.g_id,g.prefix,g.suffix FROM ibf_members m
LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )
WHERE id IN ({$in_thanks}) " );

while($who_thanks = $this->ipsclass->DB->fetch_row())
{


$show_thanks .= "<a href='{$this->ipsclass->base_url}showuser={$who_thanks['id']}'>";
$show_thanks .= $who_thanks['prefix'].$who_thanks['members_display_name'].$who_thanks['suffix'];
$show_thanks .= "</a>, ";
$show_thanks_finish = substr($show_thanks, 0, -2);


}

$row['who_thanks'] = $this->ipsclass->compiled_templates['skin_global']->thanks_separator( $show_thanks_finish, $count );
}
}
Przejdź do ACP -> LOOK & FEEL -> Dany skin -> Edit Template HTML -> Edit Template HTML -> thanks_separator Kliknij w przycisk z opcjami i wybierz Edit Data Variables... zamień całą zawartość na:
$who, $count
kliknij na Save & Close następnie w szablonie znajdź
<tr><td class="row1" colspan="2"><b>{$this->ipsclass->lang['thx_who']}</b><br />
i zamień na
<tr><td class="row1" colspan="2"><b>$count {$this->ipsclass->lang['thx_who']}</b><br />

i teraz będzie Ci wyświetlać np. 100 następujący użytkownicy .... jeśli będziesz chciał zmienić ten tekst albo umiejscowienie ilości podziękować to myślę, że sobie poradzisz a jakby co to pytaj :)

Share this post


Link to post
Share on other sites

niestety ale wywala sie błąd

Parse error: syntax error, unexpected ';' in /home/admin/domains/dw24.info/public_html/forumtest/sources/action_public/topics.php on line 927

linia 927 wyglada tak

$count = count(explode(',',$memberJoined);

oto kod reszty

			if (   ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_view_groups'])) or (!$this->ipsclass->vars['thanks_view_grp_lim']) )

				and ( (count($member_thanks) > 0) && ($member_thanks[0] != "") )   )

			{

				$memberJoined = implode(',',$member_thanks);

				$count = count(explode(',',$memberJoined);

				$in_thanks = (count($member_thanks)==2) ? $row['post_thanks'] : $memberJoined;


			   $this->ipsclass->DB->query( "SELECT m.members_display_name,m.id,m.mgroup, g.g_id,g.prefix,g.suffix FROM ibf_members m

									  LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )

									 WHERE id IN ({$in_thanks}) " );


				while($who_thanks = $this->ipsclass->DB->fetch_row())

				{

Share this post


Link to post
Share on other sites

Wszystko ładnie działa ale mam jeszcze pytanko chce zmienic tekst w lang topic z

Następuj±cy użytkownicy postawili piwo autorowi postu :

na takie coś

(nazwa usera) upija sie na koszt (liczba piw)

czyli np user mati dostał 300 piw to bedzie wygladac tak

mati upija sie na koszt 300 użytkowników

trzeba dodać jakaś funkcje na pewno czy cos w tym stylu :) :)

Edited by meler

Share this post


Link to post
Share on other sites

tutaj potrzebna jest trochę większa ilość przeróbek, ponieważ standardowo w tym bicie szablonu nie ma nazwy użytkownika, któremu dziękują inni, bo sam tekst to nie jest żaden problem. Jeśli Ci się nie spieszy jakoś z tym bardzo to jutro Ci to po pracy zrobię.

Share this post


Link to post
Share on other sites

Znajdź:

if ($this->ipsclass->vars['thanks_mod_enable'])
{
$member_thanks = explode(',',$row['post_thanks']);

if ( ( in_array($this->topic['forum_id'], explode(',',$this->ipsclass->vars['thanks_forums'])) or (!$this->ipsclass->vars['thanks_forum_lim']) )
and ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_from_groups'])) or (!$this->ipsclass->vars['thanks_from_grp_lim']) )
and ( in_array($poster['mgroup'], explode(',',$this->ipsclass->vars['thanks_to_groups'])) or (!$this->ipsclass->vars['thanks_to_grp_lim']) )
and ($this->ipsclass->member['id']) )
{
if ( (!in_array($this->ipsclass->member['id'],$member_thanks)) and ($this->ipsclass->member['id'] != $row['author_id']) and ($row['pid'] == $this->topic['topic_firstpost']))
{
$row['thanks_button'] = $this->ipsclass->compiled_templates['skin_topic']->button_thanks($row['pid'] );
}
}

if ( ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_view_groups'])) or (!$this->ipsclass->vars['thanks_view_grp_lim']) )
and ( (count($member_thanks) > 0) && ($member_thanks[0] != "") ) )
{
$memberJoined = implode(',',$member_thanks);
$count = count(explode(',',$memberJoined));
$in_thanks = (count($member_thanks)==2) ? $row['post_thanks'] : $memberJoined;

$this->ipsclass->DB->query( "SELECT m.members_display_name,m.id,m.mgroup, g.g_id,g.prefix,g.suffix FROM ibf_members m
LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )
WHERE id IN ({$in_thanks}) " );

while($who_thanks = $this->ipsclass->DB->fetch_row())
{


$show_thanks .= "<a href='{$this->ipsclass->base_url}showuser={$who_thanks['id']}'>";
$show_thanks .= $who_thanks['prefix'].$who_thanks['members_display_name'].$who_thanks['suffix'];
$show_thanks .= "</a>, ";
$show_thanks_finish = substr($show_thanks, 0, -2);


}

$row['who_thanks'] = $this->ipsclass->compiled_templates['skin_global']->thanks_separator( $show_thanks_finish, $count );
}
}[/code] [b]Zamień na:[/b]
[code]if ($this->ipsclass->vars['thanks_mod_enable'])
{
$member_thanks = explode(',',$row['post_thanks']);

if ( ( in_array($this->topic['forum_id'], explode(',',$this->ipsclass->vars['thanks_forums'])) or (!$this->ipsclass->vars['thanks_forum_lim']) )
and ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_from_groups'])) or (!$this->ipsclass->vars['thanks_from_grp_lim']) )
and ( in_array($poster['mgroup'], explode(',',$this->ipsclass->vars['thanks_to_groups'])) or (!$this->ipsclass->vars['thanks_to_grp_lim']) )
and ($this->ipsclass->member['id']) )
{
if ( (!in_array($this->ipsclass->member['id'],$member_thanks)) and ($this->ipsclass->member['id'] != $row['author_id']) and ($row['pid'] == $this->topic['topic_firstpost']))
{
$row['thanks_button'] = $this->ipsclass->compiled_templates['skin_topic']->button_thanks($row['pid'] );
}
}

if ( ( in_array($this->ipsclass->member['mgroup'], explode(',',$this->ipsclass->vars['thanks_view_groups'])) or (!$this->ipsclass->vars['thanks_view_grp_lim']) )
and ( (count($member_thanks) > 0) && ($member_thanks[0] != "") ) )
{
$in_thanks = (count($member_thanks)==2) ? $row['post_thanks'] : implode(',',$member_thanks);

$this->ipsclass->DB->query( "SELECT m.members_display_name,m.id,m.mgroup, g.g_id,g.prefix,g.suffix FROM ibf_members m
LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )
WHERE id IN ({$in_thanks}) " );

while($who_thanks = $this->ipsclass->DB->fetch_row())
{


$show_thanks .= "<a href='{$this->ipsclass->base_url}showuser={$who_thanks['id']}'>";
$show_thanks .= $who_thanks['prefix'].$who_thanks['members_display_name'].$who_thanks['suffix'];
$show_thanks .= "</a>, ";
$show_thanks_finish = substr($show_thanks, 0, -2);


}

$row['who_thanks'] = $this->ipsclass->compiled_templates['skin_global']->thanks_separator( $show_thanks_finish, str_replace('<%AUTHOR%>', $row['author_name'], str_replace('<%COUNT%>', count($member_thanks), $this->ipsclass->lang['thx_who'])) );
}
}
Przejdź do ACP -> LOOK & FEEL -> Dany skin -> Edit Template HTML -> Edit Template HTML -> thanks_separator Kliknij w przycisk z opcjami i wybierz Edit Data Variables... zamień całą zawartość na:
$who, $info
kliknij na Save & Close następnie zamień całą zawartość szablonu na:
<tr><td class="row1" colspan="2"><b>$info</b><br />
{$row['post_thanks']}
<div class="signature">$who</div></td></tr>[/code] Następnie otwórz: /cache/lang_cache/x/lang_topic.php znajdź tam
[code]'thx_who' => "twój tekst",
i teraz tak. twój tekst, który chciałeś
mati upija sie na koszt 300 użytkowników
zastępując mati <%AUTHOR%> a 300 <%COUNT%> Czyli Twój tekst będzie wyglądać teraz tak:
<%AUTHOR%> upija się na koszt <%COUNT%> użytkowników

Dzięki temu będziesz mógł dowolnie sobie modyfikować jak ma wyglądać ten tekst i w którym miejscu która wartość ma być :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

W celu świadczenie usług przez nasz Serwis na najwyższym poziomie, w ramach Serwisu wykorzystujemy pliki Cookies (tzw. ciasteczka). Korzystając ze stron Serwisu IPSBEYOND.PL bez zmiany ustawień przeglądarki będą one zapisane w pamięci urządzenia. Jeżeli nie dokonacie Państwo zmiany ustawień przeglądarki internetowej to wyrażacie zgodę na zapisywanie plików Cookies.