AndyB
Well-known member
Purpose:
The purpose of this thread is to provide additional information on the Title Control v1.0 add-on. To download and install this add-on please visit the following XenForo Resource:
http://xenforo.com/community/resources/title-control.2485/
Description:
The Title Control add-on will do the following:
Admin Options:
External File:
The External File option allows the use of a PHP file that can control any aspect of the thread title. Here's an example that will make the first character of each word uppercase, but allow the admin to override the rule:
The purpose of this thread is to provide additional information on the Title Control v1.0 add-on. To download and install this add-on please visit the following XenForo Resource:
http://xenforo.com/community/resources/title-control.2485/
Description:
The Title Control add-on will do the following:
- Control maximum length of thread titles (Option)
- Force the first character of the thread title to uppercase (Option)
- Allows additional title control using external PHP file (Option)
Admin Options:
External File:
The External File option allows the use of a PHP file that can control any aspect of the thread title. Here's an example that will make the first character of each word uppercase, but allow the admin to override the rule:
PHP:
<?php
// get userId
$visitor = XenForo_Visitor::getInstance();
$userId = $visitor['user_id'];
if ($userId != 1)
{
// get title
$title = $this->get('title');
// uppercase the first character of each word in a string
$title = ucwords($title);
// set title
$this->set('title', $title);
}
?>