Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thanks for your example, alchymyth. This was exactly the trouble that I was having.

    I wrote this plugin to solve a similar issue that I was having. It works for me on WP 3.0.1, but I haven’t thoroughly tested it and make no promises. It should, at least, provide a decent starting point for anyone that wants to hack on it.

    It should be placed in your mu-plugins folder.

    https://github.com/nocash/wp-musersync/blob/master/MUserSync.php

    It’ll add a newly registered user to your other network blogs and it will add existing users to newly created network blog. It will not copy preexisting users to preexisting blogs.

    If you encounter any problems or have suggestions, let me know (preferably through GitHub so as to not derail this topic for others).

    Give this a shot, yo. I did this in WP 2.7.1.

    Once you have the users sharing a database table as you described above, open your wp-config.php for both blogs.

    Copy the AUTH_KEY and SECURE_AUTH_KEY lines from your main blog’s wp-config.php to your second blog’s wp-config.php so that they are the same in both.

    Create a line in your main blog’s wp-config.php file that looks like this:

    define('SECRET_SALT', 'L3klg#a;&-,Ab;&UT+y');

    You should replace the salt value string above with your own, possibly generated for you using this page. DO NOT simply copy and paste the above line, because that would be wrong-hearted.

    Once you’ve done that, copy the SECRET_SALT line from your main blog’s wp-config.php to your secondary blog’s wp-config.php file so that it is the same in both.

    Create the following lines in both wp-config.php files:

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIEPATH', '/');
    define('SITECOOKIEPATH', '/');
    define('COOKIEHASH', md5('Another random string value!'));

    Important Notes:

    1. COOKIEHASH is normally defined in your wp-settings.php file on line 351. Unlike most of the other constants here, it doesn’t check if it’s already defined before defining it. On my server, this doesn’t cause any problems, but if you notice error messages like ‘COOKIEHASH is already defined’ or something, that’s probably the problem. If you want to hack up core files (which we’ve already done by now), you can comment out that line in wp-settings.php and that should take care of it.
    2. Remember to replace the COOKIEHASH value above with your own string.

    Save both wp-config.php files, clear your browser’s cookies and log in to either blog. Once your in the admin area, try hitting the admin area of the other blog and it should work fine.

    Are you using the ‘bloginfo_url’ filter?

    Blog Information and Option Filters

    Set your user to ‘Contributor’ and they will be able to write without publishing.

    Gallery is probably more then what skunkertx is looking for, but I do agree it is a nice program. Although I’m about to start looking for a similar program/plugin, I haven’t started yet so have nothing better to suggest.

    Although it’s deprecated, I believe it still works (for now). The function that replaced it is wp_list_categories(), which does not have the ‘hide children’ type parameter. I believe this was the cause of some ruckus when this was first realized– or I’m thinking of something else.

    So, modifying that db query may actually be your only option.

    I find that it rarely is ??

    It looks like you’ll want to insert your content above
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    and below

    <div id="contentmiddle">

    You’ll then need to replace to copy the post ‘stuff’ and replace the PHP with static values (or remove it completely). Like so:

    <div class="contentdate">
    <h3>Apr</h3>
    <h4>17</h4>
    </div>
    
    <div class="contenttitle">
    <h1>The Title</h1>
    April 17, 2007
    
    </div>
    This is the body of your post.
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    I’m not sure if that’ll work exactly, but it should get you close.

    This is also the solution that I used (manually inserting text into the template). It works well with static content, as you’ve said, but wouldn’t work at all if you wanted your stickies to behave similar to forum software (ie. write a new post and have it stay and the top until removed/rotated).

    I was thinking about messing around with this concept using a ‘Sticky’ post category. The most recent post from that category would be displayed, followed by The Loop with that category (or at least that post– which would probably work better) excluded.

    Thread Starter macbis

    (@macbis)

    Bwah, apparently they changed some of the functions relating to all of this between 2.1.2 and 2.1.3, which caused me a bit of confusion when looking at different versions of source code.

    The clean_url function looks like it has some semi-important stuff in it, so I was hesitant to comment the whole line out, so I took a closer look and narrowed it down to the following change:

    wp-includes/formatting.php @ Line 1082

    FROM:
    $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');
    TO:
    $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'ventrilo');

    Thanks for your reply; it definitely pointed me in the right direction. It’s a shame this turned out to be a core file edit. That always leave a dirty taste in my mouth.

    Check here:

    https://wiki.www.ads-software.com/?pagename=list_cats&PHPSESSID=8bc91f06d284e5d8e0f90d1500180cc2

    It’s for list_cats and looks like you can pass children=false to the function to hide them.

    @pjrich: I just checking this out on a test install and it seems to work. I would have spent much longer searching through code before thinking to change the category name ??

Viewing 13 replies - 1 through 13 (of 13 total)