PDA

View Full Version : Hooking and changing Title and msgarea


extends
07-09-2012, 10:42 PM
I've been trying to create a custom posting template for one of my forums on the board that I am creating(using this tutorial this tutorial (https://vborg.vbsupport.ru/showthread.php?t=237982))

But the problem is that I run into a issue of minimum character requirements and lack there of a title. Because I am creating my own custom forum fields, I'd like to create a custom predesignated title using one of the fields I have created and use my field data as part of the messagearea results.

How should I go about fixing this problem?

kh99
07-09-2012, 10:58 PM
In the plugin using hook newthread_post_start, the title should be in $vbulletin->GPC['subject'] and the messagearea should be in $vbulletin->GPC['message'] . So you should be able to solve your problem by setting those to whatever you want in your plugin code.

extends
07-09-2012, 11:40 PM
edit: NVM

Thanks kh99

kh99
07-09-2012, 11:46 PM
I'm not sure, but I think if you want to use html in your message you might be able to set $vbulletin->GPC['wysiwyg'] = 1. It's not really like using html because it will get converted to bbcode and then back to html, but it might solve your newline problem.

The other way would be to use a "\n" character instead of the <br/>. That would need to be in a double-quoted string (if you use it inside single quotes you'll just get a \n in the text).