Support » Theme: P2 » [Theme: P2] Change post/reply update color

  • Hey guys, would anyone know how to change the background-color property of a post or reply that’s just recently been added?

    When you write a post on P2 and post it in real time, P2 will highlight the post or reply with color #F6F3D1 and then do a slow animation until the color fades into rgb(255,255,255) aka white background-color. The white color of the background is hardcoded into the html and I don’t know how to change it.

    I tried using the #main #postlist li selector to change the background-color, but that doesn’t seem to be working :/

    The controls for the animation are in the list-creator.php file of the theme, however I don’t know how to change the code there.

    Any help would be greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would use jquery, check out when the comment was posted, have it be a certain color until lets say its five minutes old then have it fade with a time check asynchronously.

    Thanks, but the theme already does that. All I want is for it to fade into the background color I have as opposed to white.

    The creator-list.php file seems to control this, but I don’t know what to change in it:

    <script type="text/javascript">
    jQuery( function( $ ) {
    	$( 'body' )
    		.addClass( 'is-js' )
    		.delegate( '.p2-task-list :checkbox', 'click', function() {
    			var $this = $( this ),
    			    $li = $this.parents( 'li:first' ),
    			    $form = $this.parents( 'form:first' ),
    			    data = $li.find( ':input' ).serialize(),
    			    colorEl = $li, origColor = $li.css( 'background-color' ), color;
    			while ( colorEl.get(0).tagName && colorEl.css( 'background-color' ).match( /^\s*(rgba\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*,\s*0+\s*\)|transparent)\s*$/ ) ) {
    				colorEl = colorEl.parent();
    			color = colorEl.get(0).tagName ? colorEl.css( 'background-color' ) : '#ffffff';
    			data += '&ajax=1&' + $form.find( '.submit :input' ).serialize();
    			$.post( $form.attr( 'action' ), data, function( response ) {
    				if ( '1' === response )
    					$li.css( 'background-color', '#F6F3D1' ).animate( { backgroundColor: color }, 'slow', function() { $li.css( 'background-color', origColor ); } );
    			} );
    	} );
    } );

    Have the same issue.. I have a Light on Dark set up and Replies end up White on White… 🙁 Still no fix for this yet?

    Fix is addressed here..

    I’ve made the changes to the code on my site… Removed the animated effect and seems to work. Chatroom.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: P2] Change post/reply update color’ is closed to new replies.