Extension talk:Back-and-Forth
Add topicInstallation problem
[edit]When I tried to install it on my wiki, I got the following text at the top of my page:
<�?�p�h�p� � � � �/�*�*� � � �*� �E�x�t�e�n�s�i�o�n� �a�d�d�s� �"�n�e�x�t�"� �a�n�d� �"�p�r�e�v�i�o�u�s�"� �a�l�p�h�a�b�e�t�i�c� �p�a�g�i�n�g� �l�i�n�k�s� �t�o� � � �*� �t�h�e� �t�o�p� �o�f� �a�r�t�i�c�l�e�s� � � �*� � � �*� �@�a�d�d�t�o�g�r�o�u�p� �E�x�t�e�n�s�i�o�n�s� � � �*� �@�a�u�t�h�o�r� �R�o�b� �C�h�u�r�c�h� �<�r�o�b�c�h�u�r�@�g�m�a�i�l�.�c�o�m�>� � � �*�/� � �i�f�(� �d�e�f�i�n�e�d�(� �'�M�E�D�I�A�W�I�K�I�'� �)� �)� �{� � � � � �$�w�g�A�u�t�o�l�o�a�d�C�l�a�s�s�e�s�[�'�B�a�c�k�A�n�d�F�o�r�t�h�'�]� �=� �d�i�r�n�a�m�e�(� �_�_�F�I�L�E�_�_� �)� �.� �'�/�B�a�c�k�A�n�d�F�o�r�t�h�.�c�l�a�s�s�.�p�h�p�'�;� � � �$�w�g�E�x�t�e�n�s�i�o�n�F�u�n�c�t�i�o�n�s�[�]� �=� �'�e�f�B�a�c�k�A�n�d�F�o�r�t�h�'�;� � � �$�w�g�E�x�t�e�n�s�i�o�n�C�r�e�d�i�t�s�[�'�o�t�h�e�r�'�]�[�]� �=� �a�r�r�a�y�(� � � � �'�n�a�m�e�'� �=�>� �'�B�a�c�k� �a�n�d� �F�o�r�t�h�'�,� � � � �'�a�u�t�h�o�r�'� �=�>� �'�R�o�b� �C�h�u�r�c�h�'�,� � � �)�;� � � � � � �/�*�*� � � � �*� �E�x�t�e�n�s�i�o�n� �s�e�t�u�p� �f�u�n�c�t�i�o�n� � � � �*�/� � � �f�u�n�c�t�i�o�n� �e�f�B�a�c�k�A�n�d�F�o�r�t�h�(�)� �{� � � � �g�l�o�b�a�l� �$�w�g�M�e�s�s�a�g�e�C�a�c�h�e�,� �$�w�g�H�o�o�k�s�;� � � � �r�e�q�u�i�r�e�_�o�n�c�e�(� �d�i�r�n�a�m�e�(� �_�_�F�I�L�E�_�_� �)� �.� �'�/�B�a�c�k�A�n�d�F�o�r�t�h�.�i�1�8�n�.�p�h�p�'� �)�;� � � � �f�o�r�e�a�c�h�(� �e�f�B�a�c�k�A�n�d�F�o�r�t�h�M�e�s�s�a�g�e�s�(�)� �a�s� �$�l�a�n�g� �=�>� �$�m�e�s�s�a�g�e�s� �)� � � � � �$�w�g�M�e�s�s�a�g�e�C�a�c�h�e�-�>�a�d�d�M�e�s�s�a�g�e�s�(� �$�m�e�s�s�a�g�e�s�,� �$�l�a�n�g� �)�;� � � � �$�w�g�H�o�o�k�s�[�'�A�r�t�i�c�l�e�V�i�e�w�H�e�a�d�e�r�'�]�[�]� �=� �'�B�a�c�k�A�n�d�F�o�r�t�h�:�:�v�i�e�w�H�o�o�k�'�;� � � �}� � � � � �}� �e�l�s�e� �{� � � �e�c�h�o�(� �"�T�h�i�s� �f�i�l�e� �i�s� �a�n� �e�x�t�e�n�s�i�o�n� �t�o� �t�h�e� �M�e�d�i�a�W�i�k�i� �s�o�f�t�w�a�r�e� �a�n�d� �c�a�n�n�o�t� �b�e� �u�s�e�d� �s�t�a�n�d�a�l�o�n�e�.�\�n�"� �)�;� � � �e�x�i�t�(� �1� �)�;� � �}�
Any thoughts or suggestions on how to make that go away? --PurplePopple 11:42, 20 July 2007 (UTC)
- Can you give exact steps for installation? robchurch | talk 01:55, 21 July 2007 (UTC)
- I'm no expert, but that looks like a coding problem: viewing a Unicode file as if it were ANSI or similar. —Phil | Talk 07:44, 26 July 2007 (UTC)
Limit articles browsing to current category?
[edit]Hi ... is there a way to limit article browsing to current category only? it is very annoying to jump trough multiply categories ... can be set to only display the articles of current category or subcategory? --Ksnet 21:41, 5 June 2008 (UTC)
Patch for excluding Main Page
[edit]Here's a patch for excluding the Main Page:
--- a/extensions/BackAndForth/BackAndForth.class.php +++ b/extensions/BackAndForth/BackAndForth.class.php @@ -17,7 +17,8 @@ class BackAndForth { public static function viewHook( $article ) { global $wgOut, $wgUser; $title = $article->getTitle(); - if( Namespace::isContent( $title->getNamespace() ) ) { + if( Namespace::isContent( $title->getNamespace() ) && + $title->mTextform != wfMsg( 'mainpage' )) { $wgOut->addHtml( self::buildLinks( $title ) ); $wgOut->addHeadItem( 'backandforth', self::buildHeadItem() ); } @@ -50,6 +51,7 @@ class BackAndForth { private static function buildLink( $title, $op, $label ) { wfProfileIn( __METHOD__ ); $dbr = wfGetDB( DB_SLAVE ); + $main_page = str_replace(' ', '_', wfMsg( 'mainpage' )); $res = $dbr->select( 'page', array( 'page_namespace', 'page_title' ), @@ -57,6 +59,7 @@ class BackAndForth { 'page_is_redirect' => 0, 'page_namespace' => $title->getNamespace(), "page_title {$op} " . $dbr->addQuotes( $title->getDBkey() ), + "NOT page_title = \"{$main_page}\"", ), __METHOD__, array(
It would be nice to include it in the extension. Guaka 19:47, 19 June 2009 (UTC)