User talk:Gatoatigrado/sidebarhack

Monobook.php
msg('toolbox') ?>  data['nav_urls']['permalink']['href'])) { $toolbox['t-permalink'] = array(	       'href' => htmlspecialchars($this->data['nav_urls']['permalink']['href']),	        'text' => $this->getMsg('permalink')	    ); } elseif ($this->data['nav_urls']['permalink']['href'] === '') { $toolbox['t-ispermalink'] = array(	       'text' => $this->getMsg('permalink')	    ); }

if(!empty($this->data['nav_urls']['print']['href'])) { $toolbox['t-print'] = array(		'href' => htmlspecialchars($this->data['nav_urls']['print']['href']),		'text' => $this->getMsg('printableversion')	   ); }

if($this->data['notspecialpage']) { if( $this->data['nav_urls']['recentchangeslinked'] ) { $toolbox['t-recentchangeslinked'] = array(		   'href' => htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']),		    'text' => $this->getMsg('recentchangeslinked')		); }	   $toolbox['t-whatlinkshere'] = array(		'href' => htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']),		'text' => $this->getMsg('whatlinkshere')	    ); }	if(isset($this->data['nav_urls']['trackbacklink'])) { $toolbox['t-trackbacklink'] = array(	       'href' => htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']),	        'text' => $this->getMsg('trackbacklink')	    ); }	if($this->data['feeds']) { $feedtext = ''; foreach($this->data['feeds'] as $key => $feed) { $feedtext .= ''. htmlspecialchars($feed['text']). ' '; }	   $toolbox['feedlinks'] = array(		'text' => $feedtext	    ); }

foreach( array('contributions', 'blockip', 'emailuser', 'ruler', 'specialpages', 'upload') as $special ) { if($this->data['nav_urls'][$special]) { $toolbox['t-'. $special] = array(		   'href' => htmlspecialchars($this->data['nav_urls'][$special]['href']),		    'text' => $this->getMsg($special)		); } elseif($special == 'ruler') { if(!empty($toolbox)) { // sanity check $toolbox['ruler'] = array('html' => ' '); }		$toolbox['t-recentchanges'] = array(		   'href' => $this->data['wgScript'] . '/Special:Recentchanges',		    'text' => $this->getMsg('recentchanges')		); }	}

foreach($toolbox as $id => $item) { if($item['html']) { echo $item['html']; } else { ?> ">">translator->translate( $str ) ); } }

Comments
Implementing Cite this page (not done yet) means linking to  (I think). Also, I may have the order of the toolbox links wrong since I was offline when I wrote this.

Can you give this code a quick once over and add it to the hack with the pretty printing please? Thanks. --DavidHOzAu 10:30, 1 October 2006 (UTC)