Fork me on GitHub

How do we modify the subject legth of PNForums?  Bottom

  • The site needs subject lines of 255 characters, while it appears that PNForums defaults to 100. (The reason for the long line legth is this is being used as a database for annotations on court cases. 100 is just nowhere near enough.)

    What line(s) of which files do we need to modify, if anyone knows. We have upped the limit in the DB to 255, and we have done this with PHPBB, so figure it should be doable with PNForums as well.

    Thanks in advance :)
  • You'd need to change the FORM is all - its probably set to allow a max of 100 characters entered. What versino of pnForum are you using?

    In pnForum 2.0.1, try the pnforum_user_newtopic.html in the templates folder.

    Change:

    Code

    <input type="text" name="subject" size="80" maxlength="100" id="subject" tabindex="0" value="<!--[ $newtopic.subject|pnvarprephtmldisplay ]-->" />


    by setting the maxlength="255"

    You'll also want to change it in the EDIT template - pnforum_user_editpost.html - as well, so that on editing, it is not truncated.

    Thirdly, change it in the split topic template - pnforum_user_splittopic.html - so that on splitting it, the new topic can be larger than 100.

    Finally, a quick text search for "100" (include the quotes so that you don't match 100%, 1001, etc.) through all the pnForum (2.0.1) files should show any remaining that might need to be changed. Make sure not to change those not relating exactly to the topic title.

    For pnForum 2.6, probably nearly the same files, but I do't have it installed on this particular computer to check right now.

    Good luck!

    UHEweb
  • We are using 2.6, and will look at those files.

    MANY thanks :)


    Also, did you notice PN on longer subjects to use center justification? And if so, how did you undo that?
  • Most likely an HTML setting in the template - or a CSS style. Check the tags that output the title in the template files. Might be enclosed in a div or td that affects it. Check for explicit HTML parameters, ie align="center" and a class setting, ie class="divcenter". If a CSS class, search for that class in the postnuke and pnforum CSS files and see what settings it has.

    UHEweb

This list is based on users active over the last 60 minutes.