All pastes #2097082 Raw Edit

Untitled

public text v1 · immutable
#2097082 ·published 2011-12-28 23:10 UTC
rendered paste body
			// Marein's Bullshitty Namespace Tabs
			
			$title = $this->data['thispage'];
			$title = str_replace('Lore:', '', $title);
			$title = str_replace('Game:', '', $title);
			$query['action'] = 'edit';
			
			if ($i == 1 && strpos($href,'Special:')  === false
						&& strpos($href,'Main_Page')  === false
						&& strpos($href,'MediaWiki:')  === false
						&& strpos($href,'User:')  === false
						&& strpos($href,'Category:')  === false
						&& strpos($href,'File:')  === false
						) {
                
				if (strpos($href,'Lore:') === false) {
				
					$nav_tmp['lore'] = array();
					$nav_tmp['lore']['text'] = 'Lore';
					
					$lore_title = Title::makeTitle( NS_LORE, $title );
					if ($lore_title->exists() === false) {
						$nav_tmp['lore']['attributes'] .= ' class="new"';
						$lore_href = $lore_title->getLinkUrl( $query );
					} else {
						$lore_href = $lore_title->getFullURL();
					}
					$nav_tmp['lore']['href'] = $lore_href;
				}
				
				if (strpos($href,'Game:') === false) {
					
					$nav_tmp['game'] = array();
					$nav_tmp['game']['text'] = 'Game';
					
					$game_title = Title::makeTitle( NS_GAME, $title );
					if ($game_title->exists() === false) {
						$nav_tmp['game']['attributes'] .= ' class="new"';
						$game_href = $game_title->getLinkUrl( $query );
					} else {
						$game_href = $game_title->getFullURL();
					}
					$nav_tmp['game']['href'] = $game_href;
				} 
				
				if (strpos($href,'Game:') !== false || strpos($href,'Lore:') !== false) {
					
					$nav_tmp['main'] = array();
					$nav_tmp['main']['text'] = 'Main';
					
					$main_title = Title::makeTitle( NS_GAME, $title );
					if ($main_title->exists() === false) {
						$nav_tmp['main']['attributes'] .= ' class="new"';
						$main_href = $main_title->getLinkUrl( $query );
					} else {
						$main_href = $main_title->getFullURL();
					}
					$nav_tmp['main']['href'] = $main_href;
				}
            }