Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 20, 201014 yr /** * Sets the topic title. * You *must* pass a raw GET or POST value. ie, a value that has not been cleaned by parseCleanValue * as there are unicode checks to perform. This function will test those and clean the topic title for you * * @access public * @param string Topic Title */ public function setTopicTitle( $topicTitle ) { if ( $topicTitle ) { $this->_topicTitle = $topicTitle; /* Clean */ if( $this->settings['etfilter_shout'] ) { if( function_exists('mb_convert_case') ) { if( in_array( strtolower( $this->settings['gb_char_set'] ), array_map( 'strtolower', mb_list_encodings() ) ) ) { $this->_topicTitle = mb_convert_case( $this->_topicTitle, MB_CASE_TITLE, $this->settings['gb_char_set'] ); } else { $this->_topicTitle = ucwords( strtolower($this->_topicTitle) ); } } else { $this->_topicTitle = ucwords( strtolower($this->_topicTitle) ); } } $this->_topicTitle = IPSText::parseCleanValue( $this->_topicTitle ); $this->_topicTitle = $this->cleanTopicTitle( $this->_topicTitle ); $this->_topicTitle = IPSText::getTextClass( 'bbcode' )->stripBadWords( $this->_topicTitle ); Capitalize only the first letter and don't touch the rest of the topic title. (Don't add "strtolower" code etc.) Add this code, and maybe a ACP setting to enable/disable it? :) { $this->_topicTitle = ucfirst($this->_topicTitle); }
March 24, 201113 yr This is going to change iPhone Finally Comes to Verizon into IPhone Finally Comes to Verizon. :(
March 25, 201113 yr This shouldn't be a core function of the product, as it would not function well with other character sets than US-English or base ASCII
March 25, 201113 yr This IS a core feature of the product and has been since about version 1.3. The OP was asking us simply NOT to run the title through strtolower() before converting it. The existing feature itself is an ACP setting ("stop shouting in topic titles").
Archived
This topic is now archived and is closed to further replies.