Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Hi,

    Here is the summary of the steps to get it installed:

    1. Download free-wysiwyg-textarea-html-editor.
    2. Extract the zip file and place it in your p2 theme directory.
    3. Modify the included ed.js file to work with your directory structure.
    4. Include ed.js in your header.
    5. Add <script>edToolbar('posttext'); </script> to your post-form.php
    6. If you want to have the editor for comment form as well, there is another trick that utilize the plugin.

    [signature moderated Please read the Forum Rules]

    All,
    I managed to get an editor for my post-form. I used this tool: http://corpocrat.com/2008/12/18/free-wysiwyg-textarea-html-editor/

    It’s very lightweight (5k), and very similar to the simple markup editor you have here at ww.wp.xz.cn

    I believe with the technique I used, it is possible to use any editor your choice. However, like many others said, speed is something you should consider.

    If someone is interested in how to implement editor, just reply, I’ll return and show you how.

    [signature moderated Please read the Forum Rules]

    you’re welcome! Good luck with your project.

    [signature moderated Please read the Forum Rules]

    Strange … it works for me though. Here is my p2/index.php file with the two additional lines to hide posts. Compare and see if you have the same.

    <?php
    	global $paged;
    	prologue_new_post_noajax();
    	get_header();
    ?>
    <div class="sleeve_main">
    <?php
    	if( current_user_can( 'publish_posts' ) ) require_once dirname( __FILE__ ) . '/post-form.php';
    ?>
    <?php if (current_user_can('level_10', get_the_id())): ?>
    <div id="main">
    	<h2><?php _e( 'Recent Updates' , 'p2'); ?> <?php if ( $paged > 1 ) printf( __('Page %s', 'p2'), $paged ); ?>
    		<a class="rss" href="<?php bloginfo( 'rss2_url' ); ?>">RSS</a>
    		<span class="controls">
    			<a href="#" id="togglecomments"><?php _e('Hide threads', 'p2'); ?></a> | <a href="#directions" id="directions-keyboard"><?php  _e('Keyboard Shortcuts', 'p2'); ?></a>
    		</span>
    	</h2>
    <?php
    if ( have_posts() ):
    ?>
    <ul id="postlist">
    <?php
    	while( have_posts() ):
    	    the_post();
            require dirname(__FILE__) . '/entry.php';
        endwhile; // have_posts
    ?>
    </ul>
    <?php else: // have_posts ?>
    <ul id="postlist">
    	<li class="no-posts">
        	<h3><?php _e('No posts yet!', 'p2'); ?></h3>
    	</li>
    </ul>
    <?php
    endif; // have posts
        prologue_navigation();
    ?>
    <?php endif; // hide post ?>
    </div> <!-- main -->
    </div> <!-- sleeve -->
    <?php get_footer( );

    [signature moderated Please read the Forum Rules]

    In p2/index.php,
    Search for:

    f( current_user_can( 'publish_posts' ) ) require_once dirname( __FILE__ ) . '/post-form.php';

    Add the following line AFTER the above line:
    <?php if (current_user_can('level_10', get_the_id())): ?>

    Then,
    Search for </div> <!-- main -->

    Add the following line BEFORE the above line:
    <?php endif; // hide post ?>

    Hope this helps.

    Willson
    Revenue sharing technical knowledge base @ dbuggr.com

    So, essentially, you DO NOT want regular users to see “Recent Updates” below the submit box? What do you want them to see instead? Just a blank page?

    [signature moderated Please read the Forum Rules]

    Are you talking about inline ajax loading? You want only admin to see the automatic inline loading of the latest post?

    [signature moderated Please read the Forum Rules]

    I don’t know what’s changed between v1.0.1 and 1.0.5, but I DO know between 1.0.4 and 1.0.5 there are only two files changed: style.css and search.php

    [signature moderated Please read the Forum Rules]

    Search for “var updateRate” in functions.php.
    You’ll see a number. This is the frequency Ajax would check for updates in milliseconds. Update the number to something larger.

    [signature moderated Please read the Forum Rules]

Viewing 9 replies - 16 through 24 (of 24 total)