WordPress.org

Ready to get started?Download WordPress

Forums

Greg's Comment Length Limiter - how to insert PHP function in textarea tag? (5 posts)

  1. Xaximus
    Member
    Posted 4 years ago #

    I've read that you're supposed to insert a PHP function, called gcll_tweak_textarea();, inside of the textarea tag in comments.php. Not between the tags, but inside. Problem is, I have no idea how to run a PHP function from within an HTML tag, and can't find mention of doing so anywhere.

    Any ideas?

  2. wprelief
    Member
    Posted 4 years ago #

    This is actually pretty easy, since all the theme files you have are PHP files, all you have to do is paste this into the code as you were instructed: <?php gcll_tweak_textarea(); ?>

    So, according to the instructions I would find the textarea and make it look like this:

    <textarea><?php gcll_tweak_textarea(); ?>

    That should do the trick

  3. Xaximus
    Member
    Posted 4 years ago #

    That's what I had thought initially, but that puts the following text into the comment box:

    onkeydown="gcllCounter(this)" onkeyup="gcllCounter(this)"

  4. Xaximus
    Member
    Posted 4 years ago #

    Any ideas? The developer doesn't seem to be available for assistance, which is a shame.

  5. wprelief
    Member
    Posted 4 years ago #

    Ahh, I see what is going on. Instead of what I said before:
    <textarea><?php gcll_tweak_textarea(); ?>
    do this:
    <textarea <?php gcll_tweak_textarea();?>>

    Where the closing ">" for textarea is after the php function.

Topic Closed

This topic has been closed to new replies.

About this Topic