The MU forums have moved to WordPress.org

Postie and User ID (4 posts)

  1. KingChaos
    Member
    Posted 15 years ago #

    Running latest WPMU.
    Installed Postie. Works for all users just fine, but I wanna change the files directory to the users default directory.

    Found this in postie-funktions.php:

    if (!isset($config["FILESDIR"])) { $config["FILESDIR"] = DIRECTORY_SEPARATOR."wp-filez".DIRECTORY_SEPARATOR;}

    Now I wanna change

    wp-files

    to

    wp-content/blogs.dir/USER_ID

    Managed to get the ID in other files but here I can't figure out how to get it.

    In config_form.php I use

    wp-content/blogs.dir/<?php global $blog_id; echo $blog_id;?>

    to get the ID but this doesent work in the postie-funktions.php.

    Anu ideas?

    King

  2. KingChaos
    Member
    Posted 15 years ago #

    Figured it out.
    Heres howto if someone else needs it. It makes the Postie folders to the defaults one. This way I hope the space limit will be used.

    In config_form.php line 114 change:

    <input name="PHOTOSDIR" type="text" id="PHOTOSDIR" value="<?php echo $config["PHOTOSDIR"]; ?>" size="50" />

    to

    <input name="PHOTOSDIR" type="text" id="PHOTOSDIR" value="/wp-content/blogs.dir/<?php global $blog_id; echo $blog_id; ?>/" size="50" />

    And on line 122 change:

    <input name="FILESDIR" type="text" id="FILESDIR" value="<?php echo $config["FILESDIR"]; ?>" size="50" />

    to

    <input name="FILESDIR" type="text" id="FILESDIR" value="/wp-content/blogs.dir/<?php global $blog_id; echo $blog_id; ?>/" size="50" />

    Also gonna hide the option with

    <!-- -->

    so the users can't change it.

    If any of this makes a security risk or anything please let me know, couse I dunno.

    King

  3. tdjcbe
    Member
    Posted 15 years ago #

    Running latest WPMU.

    Please break this habit. Version numbers help. Latest version is the 2.7 beta. Is that what you;re running?

    The only concern I see if that the upload directories can be moved now via a setting in wp-config.php. I'd have to dig for the code on how to do that but if you have the upload directories under wp-config, what you have up there should work fine.

  4. KingChaos
    Member
    Posted 15 years ago #

    Oh.. Sorry.. Shall try to break the bad habit :D
    V 2.6.5 BTW

    Thx.

About this Topic

  • Started 15 years ago by KingChaos
  • Latest reply from KingChaos