Jump to content

Capitalize first letter in topic title


K-E

Recommended Posts

Posted

/** * 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); }





  • 8 months later...
Posted

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").

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...