Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress'

Viewing 25 results - 25,626 through 25,650 (of 26,674 total)
  • Author
    Search Results
  • fel64
    Member

    I think require_once (or require, include or include_once for that matter) need a path to the file rather than a URL. A path would be like the addresses you get when you’re browsing folders on your computer. I can’t say what your path would be, but mine is /home/username/public_html/wordpress/wp-config.php. Ask your hosting provider if you don’t know what to use. :)

    It might be easier to recreate the theme anyway, if I remember rightly a fair few folks come here with problems when trying to stick bb into the WP theme like that.

    csl749
    Member

    Hi folks,

    I have WP and BB running off the same DB, integrating users etc as far as I can tell, and each working perfectly. But, following the instructions on the docs page on how to integrate WP functions so they can be called in BB, I get errors.

    I put the require_once('www.mywebsite.com/wp-blog-header.php'); at the top of the BB config.php, in the hope that the WP functions would be discovered, but each time I try to add, say, a line to front-page.php like get_header or get_footer, to visually sandwich BB inside my WP header/footer, I get an error:

    Fatal error: Call to undefined function: get_header() in /home/csleary/public_html/forum/my-templates/lemodie/front-page.php on line 1

    I’m very much a novice with all this, so I’m just following instructions at the moment hoping things will work. But as far as I can tell I’ve done everything correctly – please may someone offer some ideas as to what’s going wrong? While searching other integration threads, I came across one that said to make sure WP was loaded first, so BB could then load the functions, but I don’t know how to ensure this. BB is currently in siteroot/forum, and wordpress is in the root dir itself.

    Any help would be fantastic, thanks.

    #57388
    chrishajer
    Participant

    There are a couple of tricks you could use (I have no idea how it’s done officially.)

    In your site, all you would need to do is insert this into the template that contains the page navigation you have now (Home, About and Contact all appear to be pages):

    <li class="page_item"><a href="<?php bloginfo('url'); ?>/forum/" title="Visit the forum">Forum</a></li>

    HTH

    Chris

    #1819
    soggybag
    Member

    I want to add a link to my bbpress forum in my wordpress site. Preferably the link would sit along side the page links.

    How can I do this? It seems that adding a page only allows you to add a page. Rather than a link to a page that already exists.

    #57351
    midnightsun
    Member

    yeah, i saw the problem! thanks for the help

    #57350
    fel64
    Member

    Does that work? It should have been:

    <?php if( bb_current_user_can('administrate) ) {
    $wp_admin = 'wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>

    Sorry! :/

    #57349
    midnightsun
    Member

    hey,

    it doesn’t seem to be working! i’ve edited it a little

    <?php if( bb_current_user_can('administrate') {
    $wpadmin = 'wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>)

    #57348
    fel64
    Member

    Sure. Paste this in your HTML code somewhere:

    <?php if( bb_current_user_can('administrate) {
    $wp_admin = 'http://link.to.your/wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">Wordpress Admin</a>'; } ?>

    #1812
    #56257
    jessiebirks
    Member

    Thanks Trent!

    I tested the change on one user, and I was able to edit his ID number to match the number from the old PHPBB. As hoped, his posts in the transferred Forum are now correctly attributed.

    However, I ran ino a quirk. When I change the ID in WordPress, the user gets bumped in the User Role list. He went from “Subscriber” to “No role for this blog.” I manually promoted him to Author from the wp-admin/users panel.

    What field in the wp-db controls the user roles? Can I avoid this quirk on future ID edits?

    #56255
    jessiebirks
    Member

    I’m running into a similar, if not “same” problem.

    I had a PHPBB with approx 20 active users. The same users will be participating in a new page which is pre-launch.

    That page is a WordPress installation with integrated BBPress. There are only 3 users in the WP/BB install. I imported the posts and forums from PHPBB using the PHPBBtoWordpress hack.

    Since I’d already integrated the BBPress install, copying the data did not create the Users in the database, because they began with wp_ and it was looking for bb_. Now, most of the posts are either attributed to “anonymous” or they’re attributed to the wrong username. I don’t want to do the data retrieval over, because the PHPBB users are riddled with spambot entries, and this was an easy way to get rid of them.

    Will it be safe to create my new WordPress users, then edit their ID number to match the IDs from the old PHPBB data? And will this change correctly attribute the posts in the BBPress forums? Also, if I change these ID numbers in the WordPress database… will their posts in WordPress become incorrectly attributed?

    #57264
    850
    Member

    I’ll try that. I wish it were easier to turn on/off plugins. I have to delete the plugin folder and also the files associated with them elsewhere. Some other files… mostly template files.. have been modified with some of the plugins.

    BB Press needs a plugin system like WordPress where they can be turned on/off from the Admin area.

    #56963
    Vili
    Participant

    Indeed, would save some work. :)

    #57294
    fel64
    Member

    Depending on if you’ve set up bbPress so that it’s not only integrated but also uses WordPress’s functions when available, I think you can just call the WP function. If it doesn’t work, you need to make a database query along the lines of:

    global $bbdb;
    $profiledata = $bbdb->get_row( "SELECT meta_value FROM $bbdb->usermeta WHERE meta_key = $theprofiledetail AND user_id = $theuserid");

    Where $theuserid and $theprofiledetail are set to whatever you want. Note that $profiledata is worth examining by using print_r($profiledata); or the like, because its format can be confusing. The code might not work, but it’s an idea.

    #56962
    fel64
    Member

    Thank you!

    For testing if it’s bb it might be easiest to do exactly what you did but with a global variable bb uses anyway, such as $bbdb or whatever you feel like – saves you having to put in the declarations.

    #56961
    Vili
    Participant

    Ok, here’s what I have, commented. The comments that start with “VILI” are mine.

    Please keep in mind two things:

    a) This is strictly speaking a WordPress plugin, not a bbPress one. The functionality is simply extended to also cover an integrated bbPress installation. (And yes, this means that you need to install this in your WordPress, not your bbPress.)

    b) I hacked this for my own purposes, so it may not be pretty, and it certainly won’t be ready for use without you reading through the code. If someone is interested in working to make it functional as an “out of the box” solution, then by all means go ahead.

    Finally, the original Dan’s Avatar Thingy can be found here.

    <?php
    /*
    Plugin Name: Vili's Avatar Thingy
    Plugin URI: http://www.vertebratesilence.com/
    Description: Displays an avatar next to posts or comments based on username. Based on Dan's Avatar Thingy (http://www.cheesemasterdan.com/).
    Version: 0.1
    Author: Vili Maunula
    Author URI: http://www.vertebratesilence.com/
    */

    // Variable declarations
    // VILI: These were changed from Dan's Avatar Thingy, in which you only had default
    // size settings into which all avatars were resized.

    $avatar_max_width = 100; // Max avatar width
    $avatar_max_height = 100; // Max avatar height
    $avatar_max_upload_size = 15360; // Max file size in bytes
    $avatars_path = ABSPATH."wp-content/avatars";

    function cmd_show_avatar()
    {
    global $wpdb;
    global $avatars_path;

    // VILI: The following is a boolean setting I use to detect whether the page
    // being served is a forum page. In practice, I have
    // <?php global $forumpage;
    // $forumpage = TRUE; ?>
    // at the beginning of each forum page (I use WordPress headers in my integrated
    // setup, but if your bbPress uses its own headers, just stick it there). If
    // anyone knows a more cost-efficient way of detecting whether a page shown is
    // a forum page, let me know.
    global $forumpage;

    if ($forumpage == FALSE) {
    $the_author_name = get_comment_author();
    if($the_author_name == "" or $the_author_name == __('Anonymous'))
    { // Avatar for posts
    $the_author = get_the_author_id();
    $the_author_name = get_the_author();
    } else { // Avatar for comments - only for registered users
    $the_comment_ID = get_comment_ID();
    $the_author = $wpdb->get_var("SELECT user_ID FROM $wpdb->comments WHERE comment_ID='$the_comment_ID'");
    }
    } else {
    $the_author_name = get_post_author();
    $the_author = get_post_author_id();
    }

    $image_path = get_bloginfo('wpurl')."/wp-content/avatars/";
    $the_avatar = $image_path.$the_author.".jpg";
    if(file_exists("$avatars_path/$the_author.jpg"))
    {
    echo '<img src="' . $the_avatar. '" alt="' . $the_author_name . '" class="cmd-avatar" />';
    } elseif(file_exists("$avatars_path/default.jpg")) {
    echo '<img src="' . $image_path . 'default.jpg" alt="Unregistered" class="cmd-avatar" />';
    }
    // If the file doesn't exist then return nothing...
    }

    add_action ('admin_menu', 'cmd_avatar_menu');

    function cmd_avatar_menu()
    {
    add_submenu_page('profile.php', '', 'Your Avatar', 0, __FILE__, 'cmd_avatar_profile');
    }

    function cmd_avatar_profile()
    {
    global $userdata;
    global $avatar_max_width;
    global $avatar_max_height;
    global $avatar_max_upload_size;
    global $avatars_path;
    get_currentuserinfo();

    if(!file_exists($avatars_path))
    {
    $mkdir_result = @mkdir($avatars_path, "0755");
    if(!$mkdir_result)
    {
    echo '<div id="message" class="error fade">The folder' . $avatars_path . ' does not exist and could not be created automatically. Please create it and assign 0755 permissions then try using this plugin again.
    </div>';
    die();
    }
    }

    if ($_POST['cmd_action'] == 'upload_avatar')
    {
    if ($_FILES['cmd_avatar_file']['size'] > 0 && $_FILES['cmd_avatar_file']['size'] < $_POST['MAX_FILE_SIZE'])
    {
    $uploaddir = ABSPATH."wp-content/avatars/";
    $uploadfile = $uploaddir . $userdata->ID . '.jpg';
    list($width, $height, $type, $attr) = getimagesize($_FILES['cmd_avatar_file']['tmp_name']);

    // VILI: The following calculates the size into which the
    // image needs to be put. If it's under the MAX limits, nothing
    // is done, otherwise resizing takes place. This probably
    // could be written more elegantly.

    $widthratio = $width / $avatar_max_width;
    $heightratio = $height / $avatar_max_height;
    if ($widthratio > 1 && $heightratio > 1 && $widthratio > $heightratio) {
    $usewidth = $width / $widthratio;
    $useheight = $height / $widthratio;
    } elseif ($widthratio > 1 && $heightratio > 1 && $widthratio < $heightratio) {
    $useheight = $height / $heightratio;
    $usewidth = $width / $heightratio;
    } elseif ($widthratio > 1) {
    $usewidth = $width / $widthratio;
    $useheight = $height / $widthratio;
    } elseif ($heightratio > 1) {
    $useheight = $height / $heightratio;
    $usewidth = $width / $heightratio;
    } else {
    $usewidth = $width;
    $useheight = $height;
    }

    $cmd_avatar_image = imagecreatetruecolor ($usewidth, $useheight);
    switch ($type)
    {
    case 1: // GIF
    $image = imagecreatefromgif($_FILES['cmd_avatar_file']['tmp_name']);
    imagecopyresampled($cmd_avatar_image, $image, 0, 0, 0, 0, $usewidth, $useheight, $width, $height);
    $avatar_created = (imagejpeg($cmd_avatar_image, $uploadfile, 100) ? TRUE : FALSE);
    imagedestroy($image);
    imagedestroy($cmd_avatar_image);
    break;
    case 2: // JPEG
    $image = imagecreatefromjpeg($_FILES['cmd_avatar_file']['tmp_name']);
    imagecopyresampled($cmd_avatar_image, $image, 0, 0, 0, 0, $usewidth, $useheight, $width, $height);
    $avatar_created = (imagejpeg($cmd_avatar_image, $uploadfile, 100) ? TRUE : FALSE);
    imagedestroy($image);
    imagedestroy($cmd_avatar_image);
    break;
    case 3: // PNG
    $image = imagecreatefrompng($_FILES['cmd_avatar_file']['tmp_name']);
    imagecopyresampled($cmd_avatar_image, $image, 0, 0, 0, 0, $usewidth, $useheight, $width, $height);
    $avatar_created = (imagejpeg($cmd_avatar_image, $uploadfile, 100) ? TRUE : FALSE);
    imagedestroy($image);
    imagedestroy($cmd_avatar_image);
    break;
    default:
    $avatar_created = FALSE;
    break;
    }
    if ($avatar_created) {
    echo '<div id="message" class="updated fade">File uploaded successfully.
    </div>';
    } else {
    echo '<div id="message" class="error fade">File upload failed.
    </div>';
    }
    }
    }
    echo '
    <div class="wrap">
    <h2>Your Avatar</h2>
    <form name="cmd_avatar" id="your-profile" action="' . $PHP_SELF . '" method="post" enctype="multipart/form-data">
    <fieldset>
    <legend>Avatar</legend>';

    $the_user = $userdata->ID;

    $avatars_path = ABSPATH."wp-content/avatars";
    $image_path = get_bloginfo('wpurl')."/wp-content/avatars/";
    $the_avatar = $image_path.$the_user.".jpg";

    if(file_exists("$avatars_path/$the_user.jpg")){
    echo '
    <img src="' . $the_avatar . '" alt="' . $userdata->user_login . '" class="cmd-avatar">';
    } else {
    echo 'No avatar found...';
    }
    echo '

    <label>Filename: </label>
    <input type="file" accept="Pictures" name="cmd_avatar_file" />

    <input type="hidden" name="MAX_FILE_SIZE" value="' . $avatar_max_upload_size . '" />
    <input type="hidden" name="cmd_action" value="upload_avatar" />
    Click browse to find your avatar image. It can be JPG, GIF or PNG and should be ' . $avatar_max_width . ' x ' . $avatar_max_height . ' pixels or less (if bigger, it will be resized).Images should also be no larger than ' . $avatar_max_upload_size / 1024 . 'KBCurrently animated GIFs are not supported.
    </fieldset>
    <br clear="all" />
    <p class="submit">
    <input type="submit" name="cmd_avatar_update" value="Update Profile &raquo;" />

    </form>
    </div>';
    }

    ?>

    #1804
    smurfdude
    Member

    Does anyone know of a way to include wordpress profile data (posts for example) into the bbpress profile page?

    #57229
    Trent Adams
    Member
    #57281
    Trent Adams
    Member

    I don’t mind if you go into this, no. A topic with a username referenced as a bozo is asking for problems if that user is not indeed a spammer. Forums sometimes are not a ‘pretty’ place and this is definetely the case over at wordpress.com. Ultimately, it is mdawaffe, Matt or I that has to deal with the issues in these forums and we all look at the modlook tag, so it is easier for us to be alerted to these disucssions when we don’t have a chance to read “all” threads.

    It seems that you and Sam were most likely 100% right that the user may be at fault here, but realize that if you are not right on this one it can cause someone hard feelings. Discussion is obviously a great thing and encouraged and closing the thread, while premature, is damage control. Clear as mud? :)

    #57286

    In reply to: LaTex support

    Trent Adams
    Member

    Mdawaffe actually added the support for this in wordpress.com recently and should be able to fire something up for bbPress. Maybe he will see this forum post and do something on it!

    Trent

    #57285

    In reply to: LaTex support

    fel64
    Member

    No idea. My advice would be to find a wordpress plugin and just modify it – there probably won’t be much to do – into a bb plugin. It’s worth a try. :)

    #53671

    In reply to: Newsletter by email

    citizenkeith
    Participant

    How about for those of us who aren’t integrating with WordPress? This would be very useful for me. :)

    #1785
    wittmania
    Member

    Version 1.0

    This plugin automatically turns scripture references into links that will take the visitor to BibleGateway.com, where they can view the verse(s). The administrator can set the default version to one of more than a dozen available versions, including ESV, NIV, KJV, NASB, The Message, and so on.

    The links are created dynamically each time a topic is loaded, so the actual text of the post is left alone. This is nice because it allows you to disable/delete the plugin without having to go back through and edit your posts to remove the extra markup.

    This plugin is ideal for forums that are religious/spiritual in nature, as it will save your users a lot of time from having to hard-code links to passages they reference in their posts.

    This plugin is almost entirely based on a similar WordPress plugin that does the same thing to WP posts. You can view the WP plugin here:

    http://dev.wp-plugins.org/wiki/Scripturizer

    You can read more about the plugin, or download the latest version of bb-Scripture-Links, here:

    http://blog.wittmania.com/bb-scripture-links

    You can see a working demo here:

    http://blog.wittmania.com/bbpress/topic/2

    #56960
    fel64
    Member

    Why don’t you copy the code here or upload and link to it? If anyone’s interested they can modify it then.

    #52911
    citizenkeith
    Participant

    Did you put BOTH database tables and such in the SAME database? Like I said above here?

    Yes, just like that, although I am not integrating my WP with bbPress.

    As far as I know, you would only need to do what’s on this page right? Since we’re not talking about WP here at all?

    That’s correct. That’s what I’ve been trying to figure out… I’m following those directions, but I still get these errors.

    Sorry if I’m not much help.. :(

    Not a problem! I appreciate your efforts.

Viewing 25 results - 25,626 through 25,650 (of 26,674 total)
Skip to toolbar