• Mathias

    (@stoupoun)


    Hi everyone,
    I am using the P2 theme on my self-hosted blog, and although I have already done a bit of CSS theme customization, not being a php/javascript expert, I am struggling to do 2 big changes I would really like to implement:

    #1 Add the ability to play a sound (Ding!) when a new post/comment is added… I presume that should be possible since there are a few actions that appear to take place after the Ajax posting (number count increase on the tab for example), but I don’t know how…

    #2 Enable posting by just hitting Return instead of having to click on the “Post It” button. You could still add forced line breaks in your post by using Shift+Return, but it seems a shame to have so many keyboard shortcuts available, and not this quick posting one.

    Would any of you script wizards be able to help me out?
    Many thanks in advance!
    Cheers,
    Mathias

Viewing 5 replies - 1 through 5 (of 5 total)
  • Here is a custom theme of P2, Check it out
    http://twitpost.blogcastor.com/

    Thread Starter Mathias

    (@stoupoun)

    Well, this is nice, but not exactly the help I was asking for!

    Thread Starter Mathias

    (@stoupoun)

    For #2, looking around the various files for the theme, I believe it should be possible to modify /inc/p2.js keyboard navigation section, but I really don’t know enough javascript to do this myself.

    If I look at the code for the “c” shortcut, would simply replacing $("#posttext").focus(); by $("#submit").focus(); be enough for example, to enable posting the content of the text box when Return is pressed? I suspect it is not that easy, but… How about setting up an additional shortcut for something like Ctrl+Return to activate the Post It button?

    I’m trying to change the width of the container and am not having any luck. I’ve got this embedded within another site and so have disabled the header and sidebar, but can’t seem to figure out how to get this down to 645px width. Any help? thanks.

    nevermind. found it… in functions.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘P2 customization’ is closed to new replies.