ALL CAPS SUBJECTS

March 12th, 2010

  • This one is probably fairly simple to add. How about making it so when the user posts a message in all caps it will change it so the first letter is a capital and the rest normal.


  • Here ya go.. Make one modification in both

    newreply.php
    and
    newthread.php

    Find:

    $title=censortext($title);
    $message=censortext($message);

    and right after that add:

    if (!ereg("([:lower:])",$title,$matches)) {
    $title=(ucfirst(strtolower($title)));
    }

    line by line:

    if (the following regular expression is not matched: any lower case character, in the title string) than {

    change the $title to lower case then uppercase the first letter
    }


  • Awesome, thanks :)


  • Ya, I just searched for censortext and found it.


  • I just went to make these mods to my own board and noticed a slight oversight:

    In newthread.php, the variable is called

    $subject

    not

    $title

    So make the appropriate changes in newthread with:

    f (!ereg("([:lower:])",$subject,$matches)) {

    $subject=(ucfirst(strtolower($subject)));

    }

    Also, one note.. This little expression will only work if the post does not contain ANY lower case... for instance, this title would still be posted

    THIS TITLE rEaLLY SucKS!

    since it does contain some lowercase.

    [Edited by Wake America on 06-13-2000 at 02:17 PM]







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about ALL CAPS SUBJECTS , Please add it free.