forum title character length, help

Node titles are limited to 50 characters. To change this you will need to change the definition of xf_node.title in the database, and you need to change the datawriter:

library/XenForo/DataWriter/Node.php

Rich (BB code):
	protected function _getFields()
	{
		return array(
			'xf_node' => array(
				'node_id'            => array('type' => self::TYPE_UINT, 'autoIncrement' => true),
				'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50,
						'requiredError' => 'please_enter_valid_title'
				),
				'node_name'          => array('type' => self::TYPE_STRING, 'default' => null, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 50),
				'description'        => array('type' => self::TYPE_STRING, 'default' => ''),
				'node_type_id'       => array('type' => self::TYPE_BINARY, 'required' => true, 'maxLength' => 25),
				'parent_node_id'     => array('type' => self::TYPE_UINT, 'default' => 0, 'required' => true),
				'display_order'      => array('type' => self::TYPE_UINT, 'default' => 1),
				'lft'                => array('type' => self::TYPE_UINT, 'verification' => array('$this', '_verifyNestedSetInfo')),
 
library/XenForo/DataWriter/Node.php
'title' => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 100,

d1pjc.jpg
 
You need to change the definition of xf_node.title in the database using a program like phpmyadmin.

ana tabloda xf_node.title yok, resimdeki özelliklerden forum başlığını el ile değiştirdim, ama gene yapamadım.

""google translate""

The main table is not xf_node.title, I changed the title of the forum features artwork by hand, but still I could not.

d1xtl.jpg
 
Greetings Jake.

Node titles are limited to 50 characters.

To change this you will need to change the definition of xf_node.title in the database,

and you need to change the datawriter:

library/XenForo/DataWriter/Node.php

This worked perfectly for me! Thanks!

Best Wishes,

PRODOS
Currently visiting Cincinnati, USA.
 
Howdy.

A question ...

Could Jake Bunce -- or anyone else -- tell me, will this hack get "undone" when there is a XenForo upgrade?

Or is it unaffected by upgrades?

Thanks.

Best Wishes,

PRODOS
 
Good morning Brogan.

Files will be overwritten when upgrading, so you will need to to reapply the edits.

I see. That's unfortunate.

Questions ....

1. When there's an upgrade, will node titles longer than 50 characters get truncated?

2. If so, will they get automatically restored once the hack is re-applied -- after the upgrade?

3. Is there a way to perform an upgrade which does not overwrite the hack?

Thanks for your assistance.

Best Wishes,

PRODOS
 
Most likely the database won't be affected during an upgrade, unless there is a specific reason to alter that column (which is unlikely but not impossible).

The files will be overwritten though.

You will need to create an add-on to override the default behaviour, such that your changes aren't overwritten when upgrading.
 
Howdy Brogan.

Most likely the database won't be affected during an upgrade, unless there is a specific reason to alter that column (which is unlikely but not impossible).

The files will be overwritten though.

I see.

So, as long as the database column that stores the characters isn't affected, the characters in the title are still recoverable once the hack is re-applied.

You will need to create an add-on to override the default behaviour, such that your changes aren't overwritten when upgrading.

Okay. I will submit a request at: http://xenforo.com/community/forums/custom-service-development-requests.69/
(Brogan suggested the above page after I messaged him, to ask how I could find someone to possibly create such an add-on)

Update: Request submitted: http://xenforo.com/community/threads/increase-node-title-character-limit-from-50-to-100.79467/

Best Wishes,

PRODOS
 
Last edited:
Greetings.

UPDATE ...

After posting a request for someone to create the add-on suggested by Brogan, I quickly received two offers from capable XenForo add-on creators and went with Nobita.Kun because he was first to offer.

Several others provided helpful feedback which I appreciate.
A special thank to AndyB and to JulianD, and of course to Brogan.

The new add-on was installed. A glitch was found. An upgrade provided.

Everything seems to be working fine.
The real test will come when the next XenForo update happens. Fingers crossed.

PS: I've suggested to Nobita.Kun that he makes this add-on available to others, either for free or for a price. I hope he does that, but it's up to him.

PPS: Oh, and thanks to Jake Bunce for providing instructions at the beginning of this thread!

Best Wishes,

PRODOS
 
Is this the same in the latest Xenforo version (2.x)? Did an import test recently and some forums (node) titles were truncated. I have to check with thread titles so any feedback appreciated. Trying to get ready for a vB 3.8.9 import and change over in June.
 
Back
Top Bottom