Title Control

Title Control 1.7

No permission to download
PHP:
<?php

// get title
$title = $this->get('title');


// strip multiple punctuations !!!
$title = preg_replace('/([?!.:,;])[?!.:,;\s]+/', '$1 ', $title);

// remove periods(.) from end of title
$title = rtrim($title, '.');

// if 50% or more of title is UPPERCASE, apply title case
if ( mb_strlen(mb_ereg_replace('![^A-Z]+!', '', $title)) > ( mb_strlen($title) / 2) )
    $title = mb_convert_case($title, MB_CASE_TITLE, 'utf-8');


// set title
$this->set('title', $title);

?>
 
Last edited:
Andy, many thanks for your awesome addons!

I got this working well except when someone is trying to capitalize Q&A is still reads Q&a. Is there a fix for this?

Also, I saw you sent something to Sandman to fix all previous titles. Is that still available? :D
 
Last edited:
@AndyB - Interesting how many great options / variables people have managed to come up with for this Add On - but it seems everyone has missed the most important one: *minimum* title length.

Short titles are a disaster for proper SEO. If you (like I) have a bunch of users who post threads like "What should I do?" and "Need Help", you realize your rankings are going to suffer dramatically.

Whether the titles are capitalized, or first word is capitalized comes a distant second SEO-wise to having Title Tags that say nothing. In fact, "maximum length" is not that big of a deal, as Google will truncate the title for you. But a title tag that is too short can't be fixed. Its just bad..

Requiring a minimum number of words would be best, and minimum number of characters second best.

Can this be added?
 
In my case, the addon work as intended and @AndyB is a kind person and a great developer.
He is always ready to help us and I really want to say him, thank you, AndyB.
 
Last edited:
Hello AndyB
I need some help,

Remove HTML Tags

ex: my title is ;

bayrak: &#39;112 <b>ve</b> Acil Servislerin en onemli sorunu istihdam&#39; (its coming from google rss feed)

I want to replace here
&#39; to '

and to hide/remove
<b> and </b>

Result is;

bayrak: '112 ve Acil Servislerin en onemli sorunu istihdam'

is it possible to modify TitleControl.php, what the content should be?

Thanks
 
Last edited:
Is there anyway to set this mod up so they see the error from the thread view so they change it before they submit a new thread? For example, prevent special characters from appearing in the title thread.
 
Last edited:
Top Bottom