• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

forum title character length, help

Jake Bunce

XenForo moderator
Staff member
#2
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

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')),
 
#5
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.

 

russoroni

Active member
#8
@Jake Bunce this is a bit off topic but I just implemented this hack successfully (thanks by the way) but what I'm looking to do is make the title hyperlinked. Is that possible? Not that you need an example but I cranked up the maximum characters so that I could use something like this as the title: <a href="http://www.primitivecondition.com">Primitive Condition</a>

Thanks
 
#10
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.
 
#11
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
 
#13
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
 

Brogan

XenForo moderator
Staff member
#14
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.
 
#15
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:
#17
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