Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,751 through 22,775 (of 32,481 total)
  • Author
    Search Results
  • #77224
    TimBurden
    Member

    adam’s fix will mean backslashes will be stored in the database. Worse, on upgrade, his changes will be lost and there all the backslashes will be.

    Better to do this as a plugin, and filtering content before it goes in the db.

    Just write a plugin, upload it and activate it. Like this:

    <?php
    /*
    Plugin Name: Strip Slashes
    */
    add_filter('pre_topic_title', 'stripslashes', 40);
    add_filter('pre_post', 'stripslashes', 40);
    add_filter('bb_add_topic_tags', 'stripslashes', 40);
    ?>

    #81741
    johnhiler
    Member

    Ah wow, only six donations huh. :-(

    _ck_ already said three months ago that if things didn’t change by December, she wouldn’t be doing plugins upgrades for 1.0:

    http://bbshowcase.org/forums/topic/suggestion-to-ck-regarding-donations#post-1641

    I can’t understand why Automattic doesn’t send her a $5-10k donation… bbPress would lose so much momentum if she stopped contributing.

    @Nightgunner5 – Thank you for the tip. I will try to do as you suggest. It’s so much better to leave the core files in their original state. I have never tried to create a plugin, this is a good reason to start! :-)

    #32300

    Topic: rss.php patch

    in forum Troubleshooting
    soundgnome
    Member

    Hey there, just had an issue with the “favorites” RSS and wanted to share my solution in case anyone else was having the same problem. Maybe it was just a Firefox thing, but the favorites URL (e.g., rss.php?profile=1) was interpreted as “unformatted XML”–there was an error message and the entire markup was displayed. I eventually discovered this was caused by an <a> tag inside the channel’s <link> tag. By changing the “bb_get_profile_link” call to a “get_user_profile_link” call in rss.php I got the URL without the tag, and the feed was interpreted correctly.

    Incidentally, I also noticed a couple other things about the script that seemed a bit off–

    1) There are a number of calls to “die()” if the feed turns out to be empty–seems like either an empty feed or an error page would be preferable to this silent failure.

    2) The “bb_send_304()” call doesn’t take into account that the feed itself may have changed recently, e.g. threads added to a “favorites” list won’t show up until activity on one of the threads causes the feed to be refreshed. (Which is not totally illogical, but it can be confusing for the user to add a favorite, refresh the feed, and still not see the newly-added thread.)

    I thought about working up a patch to address these issues, but decided to post this first–maybe the script’s working exactly as intended and I’m just not understanding it correctly.

    I am sharing this, just in case it may help someone else looking to implement this feature. There is a great plugin that does this, bbAvatars, but it was interfering with other functions I wanted to implement, so I had to find a workaround (bbPress 1.0.2).

    With the premise that I really don’t like to edit core files, because you have to remember to edit them each time you upgrade, this time I had no choice, as any avatar plugin I tried did not work out for my purposes. There are a few simple steps you can use to set your own custom avatar, when users have not set a gravatar account.

    1 – I have noticed that the “blank” choice in the settings is the only one that refers to an internal image, so you just want the code to point to your own custom image, rather than “blank.gif” (which may be also used for other calls, so I wanted to leave that one alone and not replace it with another custom blank).

    In “bb-includes”, look for the file “functions.bb-pluggable.php”, and edit around line 895, where it says

    case 'blank':
    $default = bb_get_uri( 'bb-admin/images/blank.gif', null, BB_URI_CONTEXT_IMG_SRC );

    and change blank.gif with your image, default.jpg or any other name.

    2 – Upload your custom image in bb-admin/images (if you store it somewhere else, change the path in the code above accordingly).

    3 – In your Admin Dashboard –> Settings –> Discussions, set the choice to “blank”.

    Voila!!!!

    To change the avatar size from the bbpress default size, in post.php of your templates, look for

    <?php post_author_avatar_link(); ?>

    and add the number of pixels inside (), for example:

    <?php post_author_avatar_link(80); ?>

    Hope this helps!

    #81061

    In reply to: Help out with bbPress

    sockmoney
    Member

    I’m a new bbPress user for about 10 months now. I’ve been promoting bbPress in all the other forums I participate in. Love the product and would love to help out in any capacity I could.

    I work for myself as a web publisher. I’m a developer at heart (Computer Engineer), but I mostly do community management and marketing these days.

    Would not even know where to begin in regards to where I could help. I would like to see the product get a bit more mainstream usage. Every forum I bring it up in or recommend it, no one seems to know anything about it. I find myself sticking up for it against the big hitters like vBulletin, etc. Perhaps a volunteer marketing/advocate role might be useful… ;-)

    Regards,

    Max

    #81916
    chrishajer
    Participant

    2. – apparently none is just shorthand for noindex, nofollow. I’ve always explicitly set them, and there’s really just 4 combinations.

    index, follow
    index, nofollow
    noindex, follow
    noindex, nofollow

    In any case, looks like you sorted that.

    Never having tried to do what you’re doing, I’m not sure what the answer is to making the Hidden Forums plugin work for you.

    Making the whole installation require a login is not that big a deal. Sometimes you can protect a whole directory in your host’s control panel. The bigger problem (for me) is getting the password to everyone you want to have it, unless it’s a group that communicates in other ways, then you can distribute it there.

    #81915
    yaysloths
    Member

    1. Thanks for the lower-case tip; actually not sure how they ended up in all caps. I’ll blame it on the cat.
    2. I hadn’t heard of robots=none either, but a fairly net-savvy friend said it was easier than entering the various individual instructions (since apparently there are some obscure ones besides noindex, nofollow?). A Google search turns up pages that seem to agree (see # 4), but maybe I should change it back to be safe.
    3. The intranet idea is a neat one, but I think it’s beyond the scope of my capabilities right now (inasmuch as I have no idea how to go about it). I think I’d feel ok with just the Hidden Forums plugin, but I don’t know how to configure things such that it doesn’t keep crashing the site when someone not authorized (or not authorized yet) tries to log in. I don’t know PHP well enough to manipulate the code such that a person would just be directed to a “sorry, this site is private” page instead of causing the infinite redirect loop. Bummer.

    #81914
    chrishajer
    Participant

    I would use the Hidden Forums plugin.

    For the meta tags, since bbPress tries to use XHTML 1.1 strict, you should make those lowercase and self-closed:

    <meta name="robots" content="noindex, nofollow" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="pragma" content="no-cache" />

    Also, I’ve never heard of robots =none – read up on that to be sure you have it right. noindex, nofollow is how I’ve seen it.

    The meta robots tag and the robots.txt just tell search engines that listen to not index the content. Some search engines still might index the content if they don’t obey the robots ‘standards’. So, you need to ensure the content is not visible to anyone unless that individual is logged in. I would use hidden forums for that. Or password protect the whole installation, like an intranet, and give everyone in your group that login.

    #81895
    chrishajer
    Participant

    You should really figure out how to unzip files on your Vista machine. An unzip utility was included with Windows XP and I suspect one is included with Vista. You’re going to need it.

    Anyway, you can download all the files here:

    http://chrishajer.com/bbpress/avatar-upload/

    The php files were all renamed php.txt so you can display them in your browser and save them, then upload them. You will need to keep the same directory structure. There is also a readme.txt file that is included that I did not rename.

    Also, you’ll note on the plugin page that this says compatible up to 0.8.2.1 which is very very old. I have no idea if that works at all with whatever version you’re installing.

    When you’re done, you should have something like this:

    http://www.example.com/bbpress/my-plugins/avatar-upload/bb-avatar-upload.php
    http://www.example.com/bbpress/my-plugins/avatar-upload/identicon.php
    http://www.example.com/bbpress/my-plugins/avatar-upload/readme.txt
    http://www.example.com/bbpress/my-plugins/avatar-upload/unsharpmask.php
    http://www.example.com/bbpress/my-plugins/avatar-upload/additional-files/avatar-upload.php
    http://www.example.com/bbpress/my-plugins/avatar-upload/additional-files/avatars/default.png
    http://www.example.com/bbpress/my-plugins/avatar-upload/additional-files/my-templates/avatar.php

    #81886

    In reply to: Last poster link

    I tried this and it works: <a href="<?php echo get_user_profile_link(bb_get_user_id($topic->topic_last_poster)); ?>"><?php topic_last_poster(); ?></a>

    I am not sure if it is the best way to approach it, though.

    hpguru
    Member

    Now we deleted spam topics and deleted topics

    DELETE FROM *bb_topics* WHERE *bb_topics*.*topic_status* =2 ;

    DELETE FROM *bb_topics* WHERE *bb_topics*.*topic_status* =1 ;

    PLEASE CHANGE ALL * TO BACKTICKS `

    2 = spam

    1 = deleted topics

    hpguru
    Member

    You need phpMyAdmin. In PHPMYADMIN´s bbPress database choose SQL. Go here. Please backup first!

    DELETE FROM *bb_posts* WHERE *bb_posts*.*post_status* =2 ;

    DELETE FROM *bb_posts* WHERE *bb_posts*.*post_status* =1 ;

    PLEASE CHANGE ALL * TO BACKTICKS `

    OK. Spam and deleted posts now deleted from db.

    2 = spam

    1 = deleted posts

    #81710
    chrishajer
    Participant

    As summae says, you are missing some folders. There should be subfolders under forum1, but there aren’t any. You need to upload all the files and folders exactly as they are distributed by bbPress. You should at least have these 4 folders once you install, directly beneath the top level forum1 folder:

    bb-admin
    bb-includes
    bb-plugins
    bb-template

    #81722

    In reply to: changing tag list view

    Null
    Member

    Ok I have written a function to get the tags in a row, but I want to have them comma seperated, any ideas?

    function bb_row_tags( $args = null ) {
    $defaults = array(
    'tags' => false,
    'format' => 'row',
    'topic' => 0,
    );

    $args = wp_parse_args( $args, $defaults );
    extract( $args, EXTR_SKIP );

    if ( !$topic = get_topic( get_topic_id( $topic ) ) ) {
    return false;
    }

    if ( !is_array( $tags ) ) {
    $tags = bb_get_topic_tags( $topic->topic_id );
    }

    if ( !$tags ) {
    return false;
    }

    $r = '';
    switch ( strtolower( $format ) ) {
    case 'row' :
    default :
    $args['format'] = 'row';
    foreach ( $tags as $tag ) {
    $r .= _bb_row_tag_item( $tag, $args );
    }
    break;
    }
    echo $r;
    }

    function _bb_row_tag_item( $tag, $args ) {
    $url = esc_url( bb_get_tag_link( $tag ) );
    $name = esc_html( bb_get_tag_name( $tag ) );
    if ( 'row' == $args['format'] ) {
    $id = 'tag-' . $tag->tag_id . '_' . $tag->user_id;
    return "t" . '<a href="' . $url . '" rel="tag">' . $name . '</a>' . "n";
    }
    }

    #81902

    It is working now! Tried with Firefox, Opera, and Safari. All is back to normal. Thank you :-)

    #81601
    TrishaM
    Participant

    @chrishajer – I’m not sure – I use 1&1 for hosting but I can poke around to see if some logs are available and report back…

    @buddha trance – yes, after the <?php but I appreciate the troubleshooting 101 :)

    FWIW, I also tried several other things I found in the docs for integrating, such as require_once with the path to wp-blog-header.php but as mentioned everything I try to load WP first so I can access it’s functions causes the 500 error.

    I haven’t given up yet, though! I’ll keep trying a few things and report back this weekend….

    #81721

    In reply to: changing tag list view

    Null
    Member

    Hmm this wont work since I need to edit _bb_list_tag_item too. Hmm perhaps I need to write some new code for this. Kinda hoped this could be done easier :)

    #81600

    When you say you added the line to the top, you mean after the opening tag

    <?php

    … just in case…

    #81729
    chrishajer
    Participant

    the w00tw00t.at.ISC.SANS.DFind is a different problem altogether. Looks like someone is scanning the server for vulnerabilities.

    If you have root on the server you should be able to resolve this. It might be in a php_error.log or maybe it is in an apache access or error log, but those lines there are not the ones you want.

    I would determine the IP address you’re visiting from, then grep through the logs for that IP and you should see the error.

    #81717

    In reply to: CSS failed to load?

    ciaravino
    Member

    I tried what you suggested starship trooper, but it didn’t work :(

    Why would you be able to see it, but I can’t chrishajer?

    *EDIT* Wow… I just used pagewash.com to view it, and it looks fine… Why isn’t my computer updating with the new changes? It’s been like 20 hours and it still looks like it has no style sheet.

    #81322

    There is a thread discussing export capabilities for bbPress, where the project “bbxf.org” is mentioned by chrishajer. Maybe you can ask him there, if the alpha version of the plugin they have on Google Code can be used for your purposes. That is, export bbPress as an XML file and import it into WordPress.

    https://bbpress.org/forums/topic/importexport-work

    The alpha version can be also found on the site of one of the developers, Dan Larkin.

    http://www.stealyourcarbon.net/category/bbxf/

    You could give it a try with a fresh “test” install of WP, and a full bbPress database backup…

    #75703
    noz
    Member

    Hi,

    To change it open ‘bb-avatar-upload.php’ line in my-plugins/ 173

    >> add_profile_tab(__(‘Avatar’) …. >> put ‘Image’

    ;)

    #81725
    asterix35
    Member

    I just tried again, i got the white screen when i click on “check for configuration file” button.

    I’ve also tried to chmod 777 the config file, i still get the same results.

    I tried to put wrong dbname, user, password within bb-config.php and i got an error message telling me that mysql info are not correct, therefore i assume that when i put the good credentials bbpress was able to connect to the mysql database.

    I’ve also tried to delete the mysql db and recreate everything (new db, new user) and i still have the same error message. This is driving nuts :D

Viewing 25 results - 22,751 through 22,775 (of 32,481 total)
Skip to toolbar