Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

Rekomendowane odpowiedzi

Opublikowano

Tytuł :: Modyfikacja IbProBattle

Autor :: rybenia

Kategoria :: Ipb 2.1.x, 2.2.x, 2.3.x

Wymagania ::

-Głowa na karku

-Dostęp FTP

-Godzina wolnego czasu

-Podstawowe informacje forum

1: Ściągamy modyfikacje http://mods.invisionize.com/db/index.php/f/7049

2: Wrzucamy pliki na FTP

# lang_attack.php to your "cache/lang_cache/en/" folder

# attack.php to your "sources/components_acp/" folder

# atk folder to your "sources/" folder

# attack.php to your "sources/components_ucp/" folder

# task_attack.php to your "sources/tasks/" folder

# The entire battle_install

# ibproinstall.php

# Masz IPB 2.2.x, 2.3.x wrzuc to jescze "sources/components_public/profile/" folder

3: Instalacja modyfikacji: http://twoja-strona.pl/pathtoforums/ibproinstall.php - Wybieramy nową instalacje

4: http://twoja-strona.pl/pathtoforums/ibproinstall.php i wybieramy skin instlacji

5: Edycja plików

^ Otwieramy "index.php"

Szukamy

'component'  => array( 'component'		  , 'component'	, array() ),

DOdajemy niżej

//ibProBattle Start
			 'attack'	 => array( '../atk/attack'	  , 'attack'		  , array() ),
			 'donate'	  => array( '../atk/donate'		 , 'donate'		  , array() ),
			 'atkshop'	  => array( '../atk/atkshop'	 , 'atkshop'	  , array() ),
			 'guilds'	  => array( '../atk/guilds'		 , 'guilds'		  , array() ),
			 'gmmana'	  => array( '../atk/gmmana'		 , 'gmmana'		  , array() ),
			 'ghouse'	  => array( '../atk/ghouse'		 , 'ghouse'		  , array() ),
			 //ibProBattleEnd

Szukamy

//===========================================================================
// REQUIRE AND RUN
//===========================================================================

Dodajemy przed

//ibProBattle Start
if (!is_array($ipsclass->cache['attack_settings']))
{
	$ipsclass->DB->query("SELECT * FROM ".$INFO['sql_tbl_prefix']."attack_settings");
	$ipsclass->cache['attack_settings'] = $ipsclass->DB->fetch_row();
	$ipsclass->update_cache( array( 'name' => 'attack_settings', 'array' => 1, 'deletefirst' => 1 ) );
}
//ibProBattle End

Zapisujemy i wrzucamy na Server

^ Otwieramy Plik "/sources/sql/mysql_queries.php"

Szukamy

function topics_get_posts( $a )
{
	# topics.php

	return "SELECT p.*, pp.*,
			m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn,
			me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name
				FROM ".SQL_PREFIX."posts p
					  LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id)
					LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)
					  LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)
				WHERE p.pid IN(".implode(',', $a['pids']).") 
				ORDER BY {$a['scol']} {$a['sord']}";
}

Zamień na

function topics_get_posts( $a )
{
	# topics.php

	return "SELECT p.*,m.*, pp.*,gi.g_id,gi.g_name,
			me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size
				FROM ".SQL_PREFIX."posts p
					  LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id)
					LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)
					  LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)
					LEFT JOIN ".SQL_PREFIX."attack_guild_nfo gi ON (gi.g_id=m.gu_affil)
				WHERE p.pid IN(".implode(',', $a['pids']).") 
				ORDER BY {$a['scol']} {$a['sord']}";
}
//ibProBattle End

Szukaj

function topics_get_posts_with_join( $a )
{
	# topics.php

	return "SELECT p.*, pp.*,
			m.id,m.name,m.mgroup,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn,
			me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name,
			pc.*
				FROM ".SQL_PREFIX."posts p
					  LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id)
					  LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)
					  LEFT JOIN ".SQL_PREFIX."pfields_content pc ON (pc.member_id=p.author_id)
					LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)
				WHERE p.pid IN(".implode(',', $a['pids']).") 
				ORDER BY {$a['scol']} {$a['sord']}";
}

Zastąp

//ibProBattle Start
function topics_get_posts_with_join( $a )
{
	# topics.php

	return "SELECT p.*,m.*, pp.*,gi.g_id,gi.g_name,
			me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size,			m.members_display_name,
			pc.*
				FROM ".SQL_PREFIX."posts p
					  LEFT JOIN ".SQL_PREFIX."members m ON (m.id=p.author_id)
					  LEFT JOIN ".SQL_PREFIX."member_extra me ON (me.id=m.id)
					LEFT JOIN ".SQL_PREFIX."pfields_content pc ON (pc.member_id=p.author_id)
					LEFT JOIN ".SQL_PREFIX."profile_portal pp ON (m.id=pp.pp_member_id)
					LEFT JOIN ".SQL_PREFIX."attack_guild_nfo gi ON (gi.g_id=m.gu_affil)
				WHERE p.pid IN(".implode(',', $a['pids']).") 
				ORDER BY {$a['scol']} {$a['sord']}";
}
//ibProBattle End

Zapisz wrzuc na Server

^ Otwieramy "/sources/action_public/topics.php"

Szukamy

$member['member_joined']   = $this->ipsclass->compiled_templates['skin_topic']->member_joined( $this->ipsclass->get_date( $member['joined'], 'JOINED' ) );

Dodajemy Przed

  //ibProBattle Start

	if( !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($member['attack_quit'])) && ($this->ipsclass->member['id'] > 0) && !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($this->ipsclass->member['attack_quit'])) ) 
	{
	$member['graph'] = $this->_atk->graphs($member, 1);
	$member = $member + $this->_atk->profile_links($member);
	$member['ripsign'] = '';
	if( $member['hp'] <= 0 && $this->ipsclass->cache['attack_settings']['show_rip'] )
	{
			$member['ripsign'] = '<img src="./sources/atk/images/rip.gif" alt="" /><br />';
	}
	$member['attack'] = $this->ipsclass->compiled_templates['skin_attack']->topic_view($member);
	}
	//ibProBattle End

Znajdz

$this->ipsclass->load_language('lang_topic');
	$this->ipsclass->load_language('lang_editors');
	$this->ipsclass->load_template('skin_topic');

Dodaj Nizej

//ibProBattle Start
	$this->ipsclass->load_language('lang_attack');
	$this->ipsclass->load_template('skin_attack');

	require ROOT_PATH.'sources/atk/common.php';
	$this->_atk = new atk_func();
	$this->_atk->ipsclass   =& $this->ipsclass;
	//ibProBattle End

Zapisz wrzuć na server

^ Otwórz "sources/action_public/profile.php"

Znajdz

$this->ipsclass->load_language('lang_profile');
	$this->ipsclass->load_template('skin_profile');

Dodaj Niżej

//ibProBattle Start//
	$this->ipsclass->load_language('lang_attack');
	$this->ipsclass->load_template('skin_attack');
	//ibProBattle End//

Znajdz

$info['posts'] = $this->ipsclass->do_number_format($info['posts']);

Dodaj Niżej

//ibProBattle Start//
	if( !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($member['attack_quit'])) && ($this->ipsclass->member['id'] > 0) && !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($this->ipsclass->member['attack_quit'])) ) 
	{

	require ROOT_PATH.'sources/atk/db/mysql.php';
	$this->_db = new atk_db;
	$this->_db->ipsclass =& $this->ipsclass;

	require ROOT_PATH.'sources/atk/common.php';
	$this->_atk = new atk_func;
	$this->_atk->_db				=& $this->_db;
	$this->_atk->ipsclass   =& $this->ipsclass;

	$info['graph'] = $this->_atk->graphs($member);

	$info = $info + $this->_atk->profile_links($member);

	$info = $info + $this->_atk->profile_guild($member);

	$info['attack'] = $this->ipsclass->compiled_templates['skin_attack']->profile_view($info);
	}

	//ibProBattle End//

Znajdz

$this->output .= $this->ipsclass->compiled_templates['skin_profile']->show_profile( $info, $this->ipsclass->return_md5_check() );

Dodaj Niżej

//ibProBattle Start//

	if( !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($member['attack_quit'])) && ($this->ipsclass->member['id'] > 0) && !(($this->ipsclass->cache['attack_settings']['user_set_quit']) && ($this->ipsclass->member['attack_quit'])) ) 
	{

	$rows = $this->_atk->profile_rows($member);
	if ($rows != '')
			$this->output = preg_replace( '/<!--ATTACKLOG-->/' , $this->ipsclass->compiled_templates['skin_attack']->attack_logs($rows) , $this->output );

	}
	//ibProBattle End//

Zapisz wrzuć na server

^ Otwórz sources/action_admin/groups.php

Znajdz

				 'prefix'			   => $prefix,
						 'suffix'			   => $suffix,
						 'g_promotion'		  => $promotion_a.'&'.$promotion_b,

Dodaj nizej

//ibProBattle Start
						 'g_battlemod_attacks'	=> $this->ipsclass->input['g_battlemod_attacks'],
						 //ibProBattle End

Znajdz

$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Hide this group from the member list?</b>" ,
											  $this->ipsclass->adskin->form_yes_no("g_hide_from_list", $group['g_hide_from_list'] )
									 )	  );

Dodaj nizej

//ibProBattle Start
	$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Battlemod Attacks</b><br />This sets the numbers of attacks a group has. Warning, setting this numuber high will allow people to advance at a very high rate!" ,
											  $this->ipsclass->adskin->form_input("g_battlemod_attacks", $group['g_battlemod_attacks'] )
									 )	  );
	//ibProBattle End

Zapisz wrzuc na server

^ Otwórz sources/classes/class_session.php

Znajdz

	  if ( $this->ipsclass->DB->get_num_rows() )
		{
			$this->member = $this->ipsclass->DB->fetch_row();

DOdaj niżej

//ibProBattle Start//
			include ROOT_PATH.'sources/atk/session_include.php';
			//ibProBattle End//

Zapisz wrzuć na server

^ Otwórz sources/classes/post/class_post.php

Znajdz

function pf_increment_user_post_count()
{
	$pcount = "";
	$mgroup = "";

	if ($this->ipsclass->member['id'])
	{
		if ($this->forum['inc_postcount'])
		{
			// Increment the users post count

			$pcount = "posts=posts+1, ";

Dodaj niżej

//-----------------------------------------
			// Load ibProBattle
			//-----------------------------------------
			require ROOT_PATH.'sources/atk/common.php';
			$this->_atk			 = new atk_func;
			$this->_atk->_db		=& $this->_db;
			$this->_atk->ipsclass   =& $this->ipsclass;

			$pcount .= $this->_atk->post_money($this->ipsclass->input['CODE'],$this->ipsclass->member);

Zapisz wrzuc na server

^ Otwórz "/sources/ipsclass.php"

Znajdz

//--------------------------------
	// Generate cache list
	//--------------------------------

Dodaj przed:

//ibProBattle Start
	$cachearray[] = 'attack_settings';
	//ibProBattle End

Zapisz i wrzuć na server

^ Otwórz "/jscripts/ipb_global.js"

Na końcu dodaj

/*-------------------------------------------------------------------------*/
// Do nothing...
/*-------------------------------------------------------------------------*/

function donone() { }

Zapisz wrzuć na server

6: Edit APC

Logujemy się do apc > Look and Feel> twój skin> Edit Template HTML> Profile View > show_profile

Znajdz

<tr>
				<td align="center" colspan="2" class="maintitle">{$this->ipsclass->lang['info']}</td>
			</tr>

Dodaj niżej

{$info['attack']}

Znajdz

<!--MEM OPTIONS-->

Dodaj przed:

<!--ATTACKLOG-->

Zapisujemy

ApC > twój styl > Edit Template HTML > Click Topic View > RenderRow

Szukamy

<if="author['custom_fields'] != """>
{$author['custom_fields']}
</if>

Dodajemy niżej

{$author['attack']}<br />

Enjoy

Moje forum istnieje dzięki pomocy DawPi

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.