Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,176 through 28,200 (of 32,522 total)
  • Author
    Search Results
  • #56768

    In reply to: Plugin: Avatar Upload

    chrishajer
    Participant

    Is it possible the extension was in all caps? I think the plugin expects to see one of a specific list of extensions, and they’re all lower case.

    'file_extns' => array("gif", "jpg", "jpeg", "png")

    If it wasn’t one of those extensions, I think you would get an error.

    #2956
    lucaiz
    Member

    hello,

    I’m working on a two column template.

    in the front-page.php it’s possible to have the forum list in a table.

    I’d like to have this list also in other pages, that is, for instance, in the forum.php or in the topic.php.

    if I try to run this list in other pages than front-page.php I obtain this error:

    Warning: Invalid argument supplied for foreach() in [my template path]forum.php on line 23

    (the line number is not relevant because I modified the code).

    it seem that the variable $Forums in this foreach is not loaded with the needed data.

    foreach ( $forums as $forum ) { ...

    I’ve tried to find out where it is that is loaded, so that I can load it also in forum.php etc., but I was not able to find out.

    someone can tell me where it is that is loaded, and other suggestion on how to have the list of forums in all pages?

    thanks.

    #63013
    zappoman
    Member

    by the way, an even better way to implement this is to use the args of bb_forums() properly… namely if you change your theme to call bb_forums(“depth=1”) you will only get 1 level of forums on the page.

    This change can be made to the front-page or forum of your theme. If your theme calls bb_forums($forum_id) then it is asking for the child forums of the existing forum and you need to change the code to something like this… bb_forums(“depth=1&child_of=$forum_id”)

    #63237

    In reply to: Integration questions

    triipriit
    Member

    That’d be great!

    I’ll be waiting :)

    my e-mail is triipriit at gmail dot com, just in case

    #63234

    In reply to: Integration questions

    zappoman
    Member

    In the interest of sharing what I’ve learned so far, let me describe what I want to do, and what I’ve accomplished so far.

    1) I want to have a stand alone instance of bbPress running on my site that shows ALL the forums.

    2) I want to embed a single forum into a wordpress blog (actually a wordpressmu blog– but there’s nothing mu specific about my work so far)

    3) I want the forums to share the same DB, so if a topic is updated inside of my blog, I also see it updated in the standalone Forum.

    4) I want to be able to essentially allow the bbPress template functions to work inside of a wp page or post… ideally I’d like to implement a simple function like “embedd_bbpress_forum()” on a page template and have it display a fully functioning bbPress instance in the page.

    5) I want to use the chrome/theme from wordpress for the header, sidebar, footer, etc… but I also want to support the basic bbpress template structure as well.

    So far I have this working about 90%…

    What I’ve done is build a WP-plugin, that “includes” bbpress/bb-load.php. And implements a couple functions for embedding the bbpress instance in a page or post or where ever you call the embed functions.

    Things that are working:

    * forum home page

    * topic pages

    * new topic

    * comments

    * profile pages

    * favorites

    Things that aren’t working yet:

    * ajax — none of the ajax stuff is working properly yet…

    * some pages that use wp_redirect – because of how I’m embedding in wordpress, the headers are already sent before I have a chance to do the redirect, so… some functions that rely on this are reporting errors.

    How I did this so far:

    * declare GOBALS!!! – This is the biggest “sneaky trick” – basically, most of bbPress is implemented outside of a function or class context, and so the “local” variables on the bbPress pages are actually global in context. Since I’m wrapping these into a wp-pluing, I need to declare them as explicitly global. If I get all the globals right, then bbPress just works.

    * turn off mod_rewrite support in bbPress… since I want my pages to get handled by WordPress, the URL needs to end at the same location of the wordpress page, this means that my forum page has a url something like:

    http://mydomain.com/blog/forumpage/?command=topic.php&id=1

    Notice I introduced the concept of the “command” parameter, that my plugin then uses as a dispatcher to “load” (include) the right bbPress file. MOSTLY bbPress will do the rest of it’s work from the URL params.

    * Lots of filters – I’ve implemented several filters for URL remapping so that bbPress will override the standard link formation to point to my new embedded page urls

    * A COUPLE HACKS – the only hard part I’ve had to hack so far relates to bbPress’s get_bb_location() function. This function appears to be a bit of bbPresses standard “dispatcher” which tells the rest of bbPress what type of page it’s supposed to be rendering. The only problem with this approach is that in my instance of the code base it does all this logic based on PHP_SELF, SCRIPT_FILENAME, or SCRIPT_NAME… which will be pointing to my wordpress files. I made a small change to add a new filter that allows me to pull out my command param and do the bb_location determination from that.

    Has anyone else attempted this? Have they gotten further? Is there an easier way?

    Mostly this isn’t a lot of code, it’s just discovering how to make it work and testing that everything works as planned.

    #2954
    triipriit
    Member

    Hi!

    I’ve been searching through this forum like a maniac and my bad – I didn’t find any answers for my questions.

    I somehow managed to “integrate” my bbpress with WP (the part of users, cookies), BUT:

    1) How can I wrap the forum inside my WP blog (like in wordpress.com) ?

    2)…. well, the first one actually was the big one :)

    #63204
    Sam Bauers
    Participant

    I meant “guys” in it’s androgynous sense of course. :)

    #63208

    In reply to: Line Break

    Onion
    Member

    I ran into the problem when using imagevenue, a popular image host.

    It breaks the rows by using <BR>

    For me, it’d work fine since I have the plugin to let me post anything, but for users, it outputs the link break code and threats the <BR> as a tag that isn’t allowed.

    I’ll play around with the changes. And the stuff you suggest. I have it working well enough for now, just not “exactly” what I wanted.

    Thanks for the advice _ck_

    Love your plugins btw, great job on them.

    #62457
    _ck_
    Participant

    You’d probably want to try running stand-alone but integrated instead of running both of them at the same time. Loading both at the same time causes nothing but problems and slow downs from all the extra code.

    #63118
    _ck_
    Participant

    you want get_topic_id() for the current topic id

    or get_post_id() for the current post id

    #63174
    _ck_
    Participant

    Integration is better than running under wordpress.

    This allows your wordpress side to be down while the forum still works and via versa.

    Once backpress and talkpress is available I suspect however there will be much more shared code and essentially they will start to merge together in many ways.

    ps. the forum plugin for wordpress supposedly has or had security issues if I remember correctly…

    #62345
    _ck_
    Participant

    You’re asking about gravtars but then talking about uploading avatars which are two different features.

    There are plugins for bbPress to show a user’s gravatar but if it’s a locally uploaded avatar within WordPress, someone would have to come up with some code to display it on the bbPress side. So it’s possible but would take someone to look at it.

    The avatar upload plugin on the bbpress side has some documentation or user comments on how to access the avatar from wordpress.

    #63187
    _ck_
    Participant

    Well you’re asking two different things but the answer to both is yes with some code changes to your templates.

    You can get the last poster for any topic in the list via this:

    <?php echo '<a href="'.get_topic_last_post_link().'">'.get_topic_last_poster().'</a>'; ?>

    but there is also a plugin that I believe will change the last poster’s name into a link too. So either way.

    You might be able to paginate the lastest discussions by putting this at the bottom of latest discussions outside the loop:

    <?php forum_pages(); ?>

    However it’s a 50/50 chance it won’t work.

    Or you can use the “My Views” plugin which will give you a paginated Latest Discussion view that you can link to.

    example:

    http://bbshowcase.org/forums/view/latest-discussions

    plugin:

    https://bbpress.org/plugins/topic/my-views/

    #63228
    _ck_
    Participant

    If the background goes yellow that probably means it flagged you as a “bozo” which is a feature that has never worked quite right in bbpress.

    You can disable the “bozo” feature completely by editing bb-settings.php and commenting out the line:

    // require( BBPATH . BBINC . 'bozo.php');

    around line 110 or so

    #63207

    In reply to: Line Break

    _ck_
    Participant

    I think I better understand what you are asking about after running into a similar problem today on my bbcode lite plugin. I filed a trac ticket:

    https://trac.bbpress.org/ticket/795

    bbPress seems to encode non-ending tags into html entities if you save a post twice. Not good.

    #63206

    In reply to: Line Break

    _ck_
    Participant

    Doesn’t your code zap all BRs?

    This is not quite what you are trying to do, but maybe you can add BR to this list and see if bbpress will bypass the self-closing requirement.

    function bb_allow_extra_tags( $tags ) {
    $tags['del'] = array();
    $tags['strike'] = array();
    $tags['s'] = array();
    $tags['b'] = array();
    $tags['i'] = array();
    $tags['u'] = array();
    $tags['bq'] = array();
    $tags['blockquote'] = array();
    $tags['pre'] = array();
    $tags['hr'] = array();
    $tags['br'] = array(); // see if this allows non-closed br
    $tags['BR'] = array(); // see if this allows uppercase BR
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'bb_allow_extra_tags' );

    As far as uppercase/lowercase that would be tricker if it’s hard coded in the code. You’d have to filter the post text ahead of time, find all tags and convert them to lowercase. Or try adding $tags['BR'] = array(); to the above list and see if that makes a difference.

    Personally I’d just add the bbcode plugin if you’ve got people trying to make fancier posts. It’s far more common across all forums.

    #63210
    _ck_
    Participant

    I think they are trying to integrate/convert the main WordPress.com site to the new cookie method which is more secure and it’s affecting here.

    I just hack the cookie and change the expire time to 2018 and that solves the re-login ;-)

    #2947
    Onion
    Member

    I’m new to bbpress, and was playing around with an install. I noticed that it doesn’t allow all forms of line breaks, only the current proper one that is self closing.

    <br> and <BR>

    Do not seem to work properly. This was an issue because I noticed that my users are sloppy HTML coders and the tags would just print out.

    I don’t know if it has been covered before. I searched and found nothing. I did get it to work with a small php tweak.

    In formatting-functions.php, I put the following under bb_encode_bad:

    $text = preg_replace('|& lt;BR& gt;|', '', $text);
    $text = preg_replace('|& lt;br& gt;|', '', $text);
    $text = preg_replace('|& lt;br /& gt;|', '', $text)

    (The code tag won’t output the code correctly, so I put a space after the &, so they wouldn’t get converted.)

    It works, but all three forms now convert to<br>, instead of

    Which works well enough, but even self closing br tags will now drop the /

    I’m not strong at PHP. Only enough to get by. What do you think. Is there another way to do it? Or a better way? Or hell, a plugin?

    #63203
    _ck_
    Participant

    Awh, thanks! Well not sure about “vigilant” as I wax and wane here as I have the time and energy but I try to help when I can. Hope it’s helping someone! bbPress installs seem to have doubled since October 2007 so that’s probably a good sign… appreciate the hugs, I needed that…

    ps. that would be guys and gals! ;-)

    #63223

    In reply to: php fail.

    saintmain
    Member

    I joined IRC #bbpress last night, and a kind soul figured it out.

    It was all because of the plugin. After installing the plugin, all went great.

    #chrishajer; on my server, the admin-tool lets me turn glob on and off. “off default”

    and, it IS an error when I cant login :)

    This plugin-problem should be in the FAQ.

    Thank you both.. :)

    #63193
    Trent Adams
    Member

    I would like to, but the plugin I am using is restricted to WPMU exclusively (not normal wordpress) and was purchased through WPMUDEV Premium services and the copyright is so that you have to pay them to use it.

    If you are looking at a combination avatar plugin, have you searched google for “wordpress bbpress common avatar” or something similar? Have you checked out the plugin directory to see what is offered here for avatars up and above the “service” company avatars like gravatar?

    Trent

    #63171

    In reply to: Private Forums Problem

    janellers
    Member

    Hi Trent,

    thanks for your reply. I’am using this plugin:

    https://bbpress.org/plugins/topic/private-forums/

    The hide-option is checked, and tested in both themes. The unregistered user can only Enter the Forums flagged “open for all” but that is useless when they cant see them ;)

    Jan

    #63192
    stereopoly
    Member

    Can you give me a short introduction, howto? =) Just some step by step thingy? Pleease ;)

    #63170

    In reply to: Private Forums Problem

    Trent Adams
    Member

    JanEllers are you using the plugin from so10 from the plugin browser? Do you have the following checked?

    Hide Private Forums and Topics

    I have this working fine for me. Does it work with the main theme (for testing)?

    Trent

    #63191
    Trent Adams
    Member

    It can be done as I am using a custom avatar plugin that I use with my wpmu install that pulls the avatar from the wpmu side when comparing the user id from bbPress and the wpmu user (as they are the same with integration).

    In terms of normal wordpress, I am not sure if one exists. I know lots have used gravatar or mybloglog as their base avatar system (myself included) just to make integration easier :)

    Trent

Viewing 25 results - 28,176 through 28,200 (of 32,522 total)
Skip to toolbar