howtogeek (@howtogeek)

Forum Replies Created

Viewing 25 replies - 101 through 125 (of 127 total)
  • So far I’ve had no issues with removing the javascript entirely… sure, administration functions aren’t quite as pretty, but it’s a lot less load on the server.

    In reply to: Plugin: Avatar Upload

    Thanks… I’ll wait for the update then =)

    Adding / removing favorites works fine for me with the ajax disabled. Deleting topics works as well, it just doesn’t prompt you before.

    Thanks for the heads-up on the option… I’ll check that out.

    In reply to: Limit long words

    oh right, auto… duh! (slaps forehead)

    In reply to: Plugin: Avatar Upload

    This plugin is great…. I’m just having one small issue.

    If I upload a PNG image with transparency, it always ends up with black color behind it instead of being transparent. I’m assuming it’s because it’s being resized, but it’s still a little annoying.

    Is there a way to fix this?

    In reply to: Limit long words

    You could try this:

    .post {overflow: scroll; }

    Should scroll the extra content… I think that’s what they are doing here, or something like that.

    Just thought I’d throw this out there… if you want to put the two new views first in the list, you can first unset the existing view, and then re-set it below where you add the new views.

    unset($views);

    if (bb_is_user_logged_in()) {

    $views = "Topics I've Started";

    $views = "Topics I've Participated In";

    }

    $views = "Topics with no replies";

    You can also rename the view that way if you want.

    Sweet, the plugin works for me!

    Thanks a ton!

    Using standard 0.8.2.1 release… wasn’t sure how stable the trunk is.

    I activated this plugin, but when I click on the link for “topics i’ve started”, all I get is a white page… looking at a sql trace, it doesn’t appear to be running the code at all.

    Any idea what I could be doing wrong here?

    I just noticed you said something about cache? Is the cache working in the current bbPress release?

    That’s good to know… I’ll update my local copy.

    I think the moderation functions are definitely severely lacking… but with Akismet integration you shouldn’t get much spam.

    The whole point of bbPress from my view is that it’s really simple for the users to actually use, and will hopefully generate more interaction because of that, especially from people that aren’t as forum-savvy.

    I should mention that my code is a horrible hack… hopefully they’ll fix the problem in the core.

    In reply to: Plugin: bb-Topic-Views

    fel64: I’d think that’s the best way to handle it for normal usage.

    Personally, I moved that functionality into a memcached module… not entirely useful for regular installs.

    I used this command from the bbPress root directory…

    grep -ir ‘bb_is_user_logged_in’ *

    Note that I’m using linux… if you are on Windows then you can download cygwin or grep for windows.

    In reply to: Plugin: bb-Topic-Views

    One issue with this plugin is that it does a separate SQL call for every single topic on the page…. that’s 30 unnecessary SQL calls per topic list view.

    You might want to take a look at that…

    It’s in bb-includes/pluggable.php somewhere around line 116 (in the version I’m using)

    You should read up on the grep command =)

    Ok, this version fixes the issue with spaces in the profiles… it’s mostly a hack, but I haven’t found any issues with it.

    <?php

    /*

    Plugin Name: HowToGeek Functions

    Plugin URI: http://www.howtogeek.com

    Description: Cleanup functions for bbPress issues

    Author: The Geek

    Author URI: http://www.howtogeek.com/

    Version: 0.0.1

    */

    function htg_resanitize( $text, $raw ) {

    return preg_replace(‘/[^ ta-z0-9_-]/i’, ”, str_replace(“%20″,” “,$raw));

    }

    function htg_repermalinkfix($permalink){

    return str_replace(” “,”%20”,$permalink);

    }

    function htg_wp_redirect($location,$status){

    global $is_IIS;

    if(!stristr($location,’ ‘)){

    return $location;

    }

    $location = preg_replace(‘|[^ ta-z0-9-~+_.?#=&;,/:%]|i’, ”, $location);

    $location = wp_kses_no_null($location);

    $strip = array(‘%0d’, ‘%0a’);

    $location = str_replace($strip, ”, $location);

    if ( $is_IIS ) {

    header(“Refresh: 0;url=$location”);

    } else {

    if ( php_sapi_name() != ‘cgi-fcgi’ )

    status_header($status); // This causes problems on IIS and some FastCGI setups

    header(“Location: $location”);

    }

    return false;

    }

    add_filter(‘wp_redirect’,’htg_wp_redirect’,1,2);

    add_filter(‘bb_repermalink_result’,’htg_repermalinkfix’,1,1);

    remove_filter(‘bb_user_sanitize’,’bb_user_sanitize’);

    add_filter(‘bb_user_sanitize’,’htg_resanitize’,1,2);

    ?>

    Note that the profile editing doesn’t seem to work for usernames with spaces. Will fix.

    I created a plugin that allows usernames with spaces… not in the most elegant way, but it seems to work for me.

    <?php

    /*

    Plugin Name: HowToGeek Functions

    Plugin URI: http://www.howtogeek.com

    Description: Cleanup functions for bbPress issues

    Author: The Geek

    Author URI: http://www.howtogeek.com/

    Version: 0.0.1

    */

    function htg_resanitize( $text, $raw ) {

    return preg_replace(‘/[^ ta-z0-9_-]/i’, ”, str_replace(“%20″,” “,$raw));

    }

    function htg_repermalinkfix($permalink){

    return str_replace(” “,”%20”,$permalink);

    }

    add_filter(‘bb_repermalink_result’,’htg_repermalinkfix’,1,1);

    remove_filter(‘bb_user_sanitize’,’bb_user_sanitize’);

    add_filter(‘bb_user_sanitize’,’htg_resanitize’,1,2);

    ?>

    Another thing to note, you should make sure that the .htaccess file is not writable by the web server. There seem to be some web hosts that prohibit that for security reasons.

    You need to make sure your apache configuration is also set to allow all overrides. The relevant line should be:

    AllowOverride All

    This should be in your apache configuration file, or the same relevant option should be set in plesk/cpanel.

    Doesn’t work for me… thanks for the suggestion though.

    I’ve noticed that the URLs such as the profile links are broken as well.

    I’m hoping there’s a plugin hook that I can use to override the default sanitize function… haven’t looked into it yet, but it seems like that’s where the problem is coming from.

    @box87:

    That’s exactly what I was talking about… it would be trivial to implement.

    It would be better to have a table/interface where you could configure the different titles and levels, of course… but in a pinch, that would do just fine.

Viewing 25 replies - 101 through 125 (of 127 total)