Jump to content
  • 0

Wyświetlanie dodatkowych grup(Secondary Group Indicator)


Question

Witam, posiadam wtyczkę "(1s2k) Secondary group indicator" Sama wtyczka działa, ale nie wyświetla napisu przed nimi "Inne grupy"/"others". Próbowałem edytować plugin, tłumaczyć w ACP->tłumaczenia, ale nic nie działa

Jakby ktoś chciał kod pluginu:

Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<plugin name="(1S2K) Secondary Groups Indicator" version_long="420110" version_human="1.1.0" author="aXen | 1s2k.pl" website="https://1shot2kill.pl/" update_check=""><hooks><hook type="S" class="\IPS\Theme\class_forums_front_topics" filename="SecondaryGroupsIndicator"><![CDATA[//<?php

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	exit;
}

class hook4 extends _HOOK_CLASS_
{

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
 return array_merge_recursive( array (
   'postContainer' => 
  array (
    0 => 
    array (
     'selector' => 'article > aside.ipsComment_author.cAuthorPane.ipsColumn.ipsColumn_medium.ipsResponsive_hidePhone > ul.cAuthorPane_info.ipsList_reset li:nth-child(5)',
      'type' => 'add_inside_end',
      'content' => '
	{{$secondaryGroups = [];}}
        {{foreach array_filter(explode(\',\', $comment->author()->mgroup_others)) as $secondaryGroup}}
            {{$secondaryGroups[] = \IPS\Member\Group::load($secondaryGroup)->formattedName;}}
        {{endforeach}}
	<li>
		{expression="implode(\'<br> \', $secondaryGroups)" raw="true"}
	<li>',
    ),
  ),
), parent::hookData() );
}
/* End Hook Data */

}]]></hook><hook type="S" class="\IPS\Theme\class_core_front_profile" filename="SecondaryGroupsIndicatorProfile"><![CDATA[//<?php

class hook5 extends _HOOK_CLASS_
{

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
 return array_merge_recursive( array (
  'profile' => 
  array (
    0 => 
    array (
      'selector' => 'ul.cProfileFields:first',
      'type' => 'add_before',
      'content' => '
    {{$secondaryGroups = [];}}
        {{foreach array_filter(explode(\',\', $member->mgroup_others)) as $secondaryGroup}}
            {{$secondaryGroups[] = \IPS\Member\Group::load($secondaryGroup)->formattedName;}}
        {{endforeach}}
		{{if $secondaryGroups}}
		<div class="ipsType_center">
		{expression="implode(\'<br /> \', $secondaryGroups)" raw="true"}
		</div>
		{{endif}}
    ',
    ),
  ),
), parent::hookData() );
}
/* End Hook Data */

}]]></hook><hook type="S" class="\IPS\Theme\class_core_front_profile" filename="innegrupyhovercard"><![CDATA[//<?php

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	exit;
}

class hook183 extends _HOOK_CLASS_
{

/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
 return array_merge_recursive( array (
  'hovercard' => 
  array (
    0 => 
    array (
      'selector' => 'div.ipsPad_half.cUserHovercard > div.cUserHovercard_data > ul.ipsDataList.ipsDataList_reducedSpacing > li.ipsDataItem:nth-child(3)',
      'type' => 'add_after',
      'content' => '{{$secondaryGroups = [];}}

{{foreach array_filter(explode(\',\', $member->mgroup_others)) as $secondaryGroup}}
	{{$secondaryGroups[] = \IPS\Member\Group::load($secondaryGroup)->formattedName;}}
         
{{endforeach}}
{{if $secondaryGroups}}
<li class="ipsDataItem">

    <span class="ipsDataItem_generic ipsDataItem_size3">
        <strong>
            {lang="1s2kinnegrupy"}
        </strong>
    </span>
    <span class="ipsDataItem_main">
        {expression="implode(\', \', $secondaryGroups)" raw="true"}
    </span>

</li> 
{{endif}}',
    ),
  ),
), parent::hookData() );
}
/* End Hook Data */


}
]]></hook></hooks><htmlFiles/><cssFiles/><jsFiles/><resourcesFiles/><lang><word key="1s2kinnegrupy" js="0">Others</word></lang><versions><version long="420100" human="1.0.0"><![CDATA[//<?php

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
	exit;
}

/**
 * 1.0.0 Upgrade Code
 */
class ips_plugins_setup_upg_420100
{
	/**
	 * ...
	 *
	 * @return	array	If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
	 */
	public function step1()
	{
		

		return TRUE;
	}
	
	// You can create as many additional methods (step2, step3, etc.) as is necessary.
	// Each step will be executed in a new HTTP request
}]]></version><version long="420110" human="1.1.0"><![CDATA[//<?php

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
	exit;
}

/**
 * 1.1.0 Upgrade Code
 */
class ips_plugins_setup_upg_420110
{
	/**
	 * ...
	 *
	 * @return	array	If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
	 */
	public function step1()
	{
		

		return TRUE;
	}
	
	// You can create as many additional methods (step2, step3, etc.) as is necessary.
	// Each step will be executed in a new HTTP request
}]]></version></versions></plugin>

 

 

grupy.jpg

tlumaczenie.jpg

Nie mogę edytować. Do zamknięcia

Edited by zbyciu
Link to post
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Dołącz do pierwszego newslettera Invision Community

  • 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.