Forum Replies Created

Viewing 15 replies - 1 through 15 (of 23 total)
  • I came across this: http://bbpress.org/

    Hope that helps.

    Thanks for asking.. I’m also hoping to do this.

    Thread Starter zephyrsky

    (@zephyrsky)

    Any have a thought?

    I think the idea of a book is awesome. Just having the book on the market would open up the exposure to anyone looking for a blogging book. I personally like having books to reference. Even though I haunt these lists daily. How many people are there looking for ‘said’ book? That I don’t know but having the WordPress name on the shelf would never hurt.

    I agree that a book on WordPress would be dated fast due to the rapid development going into the platform. So maybe do a hybrid Book/Wiki. You work out a deal with the publisher to release the book and after a pre-determined number of months (6 months or something), you could release a wiki that would allow the book to become a running document that could change and grow with the changes.

    Good luck!

    Thread Starter zephyrsky

    (@zephyrsky)

    Well, I hacked the admin-header.hp file and solved the problem. Under Submenus I added the IF statement after the foreach at line 34:

    <?php
    foreach ($submenu[“$parent_file”] as $item) :
    if ($item[2] != $parent_file) {

    and of course closed the if statement at line 50:

    }
    endforeach;

    Thread Starter zephyrsky

    (@zephyrsky)

    After more fiddling around I realized there wasn’t a menu item in there before my addittion. So it said to add a menu item calling back on itself. I did, and it eliminated the foreach error:

    add_submenu_page(__(“profile.php”), __(‘Manage’), __(‘Manage’), 8, ‘profile.php’);

    But, one problem.. This menu item is still showing up even though the add_submenu_page function is making sure that the $file and $parent don’t match:

    if (! isset($submenu[$parent]) && $file != $parent) {

    Forum: Fixing WordPress
    In reply to: damned hosts

    Yea, talk to your hosting company and make sure they have a DNS entry for workingbath.com that routes to the same location as http://www.workingbath.com.. Odds are they probubly don’t if it’n not coming up.

    Thread Starter zephyrsky

    (@zephyrsky)

    Awesome thanks for the heads up.. I’m thinking it’s definately time to jump in with both feet. By the way, is there a rough target date for the 1.5 release yet?

    Forum: Plugins
    In reply to: Admin Menu
    Thread Starter zephyrsky

    (@zephyrsky)

    Looks like this functionality is not in 1.2. The functions alphaoide linked to aren’t available in 1.2 so they probubly only work in 1.5.

    And it appears that doing:

    $menu[46] = array(‘Backup/Restore’, 10, ‘backupRestore.php’)

    doesn’t work either. So as a cheap hack I put this in menu.php under where the $menu array is created:

    // Add gallery to the Admin Menu
    include(‘../wp-content/plugins/galleries/galleries_functions.php’);
    $add_menu = new galleries();
    $menu = $add_menu->gallery_add_menu($menu);

    The gallery_functions.php file will check to see if the plugin is loaded and if so it will insert the ‘Galleries’ Item in the admin menu. Below is galleries_functions.php in case anyone is interested:

    <?php

    class galleries
    {

    //
    // This check to see if Galleries is installed. If so it will add it to the menu
    //
    function gallery_add_menu($menu) {
    $newset_menu = $menu;
    $installed = galleries::check_installed();
    $array_counter = 0;
    if ($installed) {
    foreach ($menu as $menu2)
    {
    if ($array_counter == 2)
    {
    $menu3[$array_counter] = array(‘Galleries’, 3, ‘galleries.php’, ‘Galleries’);
    ++$array_counter;
    $menu3[$array_counter] = $menu2;
    } else {
    $menu3[$array_counter] = $menu2;
    }
    ++$array_counter;
    }
    return $menu3;
    } else {
    // not installed
    return $menu;
    }
    }

    //
    // Adapted from wp-plugin-list.php from Matt Read
    //
    function check_installed() {

    $installed = false;

    // Files in wp-content/plugins directory
    $plugins_dir = @ dir(ABSPATH . ‘wp-content/plugins’);
    if ($plugins_dir) {
    while(($file = $plugins_dir->read()) !== false) {
    if ( !preg_match(‘|^\.+$|’, $file) && preg_match(‘|\.php$|’, $file) )
    $plugin_files[] = $file;
    }
    }

    if (” != trim(get_settings(‘active_plugins’))) {
    $current_plugins = explode(“\n”, (get_settings(‘active_plugins’)));
    }

    if (!$plugins_dir || !$plugin_files) {
    _e(“Error”); // TODO: make more helpful
    break;
    } else {

    sort($plugin_files); // Alphabetize by filename. Better way?
    $style = ”;
    foreach($plugin_files as $plugin_file) {
    $plugin_data = implode(”, file(ABSPATH . ‘/wp-content/plugins/’ . $plugin_file));
    preg_match(“|Plugin Name:(.*)|i”, $plugin_data, $plugin_name);
    preg_match(“|Plugin URI:(.*)|i”, $plugin_data, $plugin_uri);
    preg_match(“|Description:(.*)|i”, $plugin_data, $description);
    preg_match(“|Author:(.*)|i”, $plugin_data, $author_name);
    preg_match(“|Author URI:(.*)|i”, $plugin_data, $author_uri);
    if ( preg_match(“|Version:(.*)|i”, $plugin_data, $version) ) {
    $version = $version[1];
    } else {
    $version =”;
    }

    $description = wptexturize($description[1]);

    if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) {
    // If Galleries is found return true
    if (trim($plugin_name[1]) == ‘Galleries’) {
    $installed = true;
    return $installed;
    }
    }

    }
    // echo $plugs;
    return $installed;
    }
    }
    }
    ?>

    Forum: Everything else WordPress
    In reply to: SPAM?

    I was getting up to 20 a day for online casinos. It never dawned on me that to post a comment was a way to get their sites externally linked, so when google indexed my site and found the casino link it would raise their rankings.

    But I installed Blacklist by Fahim Farook and it has officially stopped. I did have to tweak the code a little to delete the spam instead of holding it.

    I use WordPress myself and I’ve got a server. If you want hosting I’ll gladly help you out forn no cost. You do get what you pay for but you’ll have my number to call me if you have problems.

    Actually that’s a good sign.. At least you know now that the ABSPATH thing isn’t working.. Are you doing this on a hosted webserver? If so, find out from them the full path to the directory where WordPress has been installed, then rewrite this:
    ————-
    define(‘ABSPATH’, dirname(__FILE__).’/’);

    To be this:
    ————-
    define(‘ABSPATH’, ‘/PATH/TO/YOUR/WORDPRESS/’);

    Change /PATH/TO/YOUR/WORDPRESS/ to the path they give you. Make sure to put that single forward slash at the end of the path. Also make sure to remove:
    ———–
    echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
    exit;

    Before doing the above.. This will ensure that WordPress knows exactly where the files are it’s looking for. I think I’ve reached the end of my ideas.. Good luck and let me know if it works.

    I agree.. If you’ve still got the will after all this, put everything back to normal then throw this in:
    —————-
    echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
    exit;

    AFTER:
    ———
    define(‘ABSPATH’, dirname(__FILE__).’/’);

    Let me know what it says.

    Sorry for the bantering back and forth but leave out the forward slashes in the include:
    —————–
    define(‘ABSPATH’, dirname(__FILE__));

    // Get everything else
    include(‘//wp-settings.php’);

    CHANGE TO:
    ————–
    define(‘ABSPATH’, dirname(__FILE__));

    // Get everything else
    include(‘wp-settings.php’);

    Personally I don’t think the absolute path is working so it can’t find the location of the file on the server. By changing to the include statement it will try to find it relative to your website directory. wp-config.php & wp-settings.php are in the same directory, so you won’t need any path information in front of it if you use include.

    If you know the server path to your web directory you could put everything back the way it was and hardcode your absolute path that way any other stuff needing the absolute path will be correct. But try the above first.
    ———————-
    define(‘ABSPATH’, ‘/DIR/PATH/TO/WEB/DIRECTORY/’;

    Good luck.

    To hack it, I was suggesting you change:
    // Get everything else
    require_once(ABSPATH.’wp-settings.php’);

    TO:
    // Get everything else
    include(‘../wp-settings.php’);

    But try this first. Something is doubling up the forward slash. I thought the server was smart enough to ignore an extra slash but maybe not. Change:
    define(‘ABSPATH’, dirname(__FILE__).’/’);

    TO:
    define(‘ABSPATH’, dirname(__FILE__));

Viewing 15 replies - 1 through 15 (of 23 total)