Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress'

Viewing 25 results - 25,801 through 25,825 (of 26,836 total)
  • Author
    Search Results
  • #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.

    #56959
    Vili
    Participant

    I have modified Dan’s Avatar Thingy to work on both WordPress and bbPress (the avatar is set in the WordPress user interface). It’s really rather easy to do.

    I actually also modified the plugin so that instead of always resizing an image to a certain size, it instead checks that the image is not bigger than X*Y, and only acts if it is.

    Tell me, if you are interested, and I can e-mail you the source for my modified Avatar Thingy. Note, though, that I made the modifications with my own website in mind, so it isn’t really an “out-of-the-box” solution, and you will most certainly need to do some coding to get it work for you (much depends on how exactly your bbPress is intergrated with WordPress).

    #52910
    spencerp
    Member

    Sorry, my mind is waaay off here. I just have so much crap going through it on a daily basis it’s not funny sigh. Sorry if I’m not much help.. :(

    spencerp

    #52909
    spencerp
    Member

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

    If you want, and IF I can find the stuff I had before.. I’ll post it back here. As for the stuff you’re talking about above there… couldn’t ya just change the references from WP database calls to bbPress calls?

    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?

    https://codex.wordpress.org/User:RobLa/bbPress_Auth_for_MediaWiki

    spencerp

    #57108
    cpjolicoeur
    Member

    ttt

    i am wondering the same thing. i am running wp-phpmailer on my blog and have integrated bbpress just today. i want to use phpmailer for the bbpress email as well but it doesnt seem to be working

    #57224
    smurfdude
    Member

    I get this error on my comments page

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘wp_bbpress_post_posts WHERE post_id =]

    SELECT topic_id FROM wp_bbpress_post_posts WHERE post_id = 32 LIMIT 1;

    #1792
    smurfdude
    Member

    I have my forum integrated with wordpress, and all was working fine in both firefox and IE until i turned permalinks on in wordpress only. I emphasize, wordpress only, i’m not using pretty urls in bbpress.

    This is where the odd behaviour starts. My blog works perfectly, permalinks work fine, and my forum works fine in firefox. However, when using permalinks in wordpress, i get “page cannot be found” error in IE7 when trying to browse the forum.

    I’m totally stumped. My server supports permalinks, it works perfectly in firefox, wordpress works in IE7, and bbpress works in IE7 with permalinks off in wordpress. But with them turned on… page not found. What the hell?

    #55704
    kernow
    Member

    Tried adding the TinyMCE to bbpress and it didn’t work. Asked a guy who knows more about this than I do, and he couldn’t get it to work either. Browsing for an answer, its suggested

    • a javascript conflict with a plugin
    • , or template.

    I’m using the latest version of WordPress in case there is a conflict there. (Windows hosting)

    #52908
    citizenkeith
    Participant

    bump :-)

    #55927

    In reply to: Show off your Forum !!

    Vili
    Participant

    Mine is at http://akirakurosawa.info/forums/ . I’ve done a little bit here and there, although more behind the scenes than with the theme.

    The installation is integrated with the rest of the site, which runs on WordPress. So much so, in fact, that I even ended up modifying a WordPress Avatar plugin so that I can use the same plugin for both WordPress and bbPress. (Although I don’t actually use it for the WordPress side at the moment.)

    The bbPress installation itself has the following plugins:

    – Allow images

    – Comment quicktags (with some modifications)

    – Display name (with some modifications)

    – Fix bbPress

    – Quote

    – WordPress Integration

    I’m adding things little by little as the users request new features.

    #57081
    AphelionZ
    Participant

    fel64, thanks :)

    I will try the post plugin

    #57080
    fel64
    Member

    How to do it? Write a MySQL query that transfers the info.

    Otherwise you could use the bb Post plugin, edit the relevant posts so they get created as threads, and then delete them in WP.

    #1783
    stuboo
    Member

    Hello all,

    When I installed bbpress intially, everything worked fine. After about a month of use though, the email message is not being sent during registration. I assume this might be due to a change with my host (dreamhost) but I don’t have any idea where to start looking for the problem.

    I also have many wordpress blogs installed across dreamhost and have experienced no such problem on any of them.

    Can someone please point me in a direction (to test) that might lead to a solution?

    Thanks

    Ryan

    #57079
    AphelionZ
    Participant

    Any ideas on this from anyone?

Viewing 25 results - 25,801 through 25,825 (of 26,836 total)
Skip to toolbar