Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | $n = explode ( ":" , $this->title ) ; |
155 | 155 | if ( count ( $n ) == 1 ) $n = $n[0] ; |
156 | 156 | else $n = $n[1] ; |
157 | | - global $wikiSQLServer , $wikiTalk , $wikiUser ; |
| 157 | + global $wikiSQLServer , $wikiTalk , $wikiUser , $wikiNamespaceTalk ; |
158 | 158 | $connection = getDBconnection () ; |
159 | 159 | mysql_select_db ( $wikiSQLServer , $connection ) ; |
160 | 160 | $sql = "SELECT cur_title FROM cur WHERE cur_title LIKE \"%:$n\"" ; |
— | — | @@ -168,9 +168,13 @@ |
169 | 169 | } |
170 | 170 | |
171 | 171 | if ( stristr ( $this->namespace , $wikiTalk ) == false ) { |
172 | | - $n2 = ucfirst ( $this->namespace ) ; |
173 | | - if ( $n2 != "" ) $n2 .= " " ; |
174 | | - $n2 .= ucfirst ( $wikiTalk ) ; |
| 172 | + #$n2 = ucfirst ( $this->namespace ) ; |
| 173 | + #if ( $n2 != "" ) $n2 .= " " ; |
| 174 | + #$n2 .= ucfirst ( $wikiTalk ) ; |
| 175 | + if ( $this->namespace != "" ) |
| 176 | + $n2 = str_replace ( "$1" , ucfirst ( $this->namespace ) , $wikiNamespaceTalk ) ; |
| 177 | + else |
| 178 | + $n2 = ucfirst ( $wikiTalk ) ; |
175 | 179 | $dummy = new wikiTitle ; |
176 | 180 | $dummy->setTitle ( $n2.":$n" ) ; |
177 | 181 | #if ( $dummy->doesTopicExist ( $connection ) ) $style = "color:green;text-decoration:none" ; |
— | — | @@ -182,7 +186,9 @@ |
183 | 187 | while ( $s = mysql_fetch_object ( $result ) ) { |
184 | 188 | $t = explode ( ":" , $s->cur_title ) ; |
185 | 189 | $t = $u->getNiceTitle ( $t[0] ) ; |
186 | | - if ( strtolower ( substr ( $t , -strlen($wikiTalk) ) ) != $wikiTalk and strtolower ( $t ) != $this->namespace ) |
| 190 | + #if ( strtolower ( substr ( $t , -strlen($wikiTalk) ) ) != $wikiTalk and strtolower ( $t ) != $this->namespace ) |
| 191 | + # Assumes that $wikiTalk is a substring of $wikiNamespaceTalk |
| 192 | + if ( !stristr ( $t, $wikiTalk ) and strtolower ( $t ) != $this->namespace ) |
187 | 193 | #array_push ( $a , "<a style=\"color:green;text-decoration:none\" href=\"".wikiLink("$t:$n")."\">$t</a>" ) ; |
188 | 194 | array_push ( $a , "<a class=\"green\" href=\"".wikiLink("$t:$n")."\">$t</a>" ) ; |
189 | 195 | } |
Index: trunk/phpwiki/fpw/wikiTextEn.php |
— | — | @@ -35,6 +35,7 @@ |
36 | 36 | #$wikiAllowedNamespaces = array ( "wikipedia" , "talk" , "user" , "" , "wikipedia talk" , "user talk" ) ; |
37 | 37 | $wikiTalk = "talk" ; |
38 | 38 | $wikiUser = "user" ; |
| 39 | +$wikiNamespaceTalk = "$1 Talk" ; |
39 | 40 | $wikiAllowedNamespaces = array ( "wikipedia" , $wikiTalk , $wikiUser , "" , "wikipedia $wikiTalk" , "$wikiUser $wikiTalk" ) ; |
40 | 41 | |
41 | 42 | # Editing |