Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,126 through 29,150 (of 32,491 total)
  • Author
    Search Results
  • #55739

    In reply to: Anonymous posting

    rashantha
    Member

    i don’t see any instruction on how to use this code. do you have any tips?

    #55738

    In reply to: Anonymous posting

    matt123
    Member

    Just wanted to put up a link to where to find the code to make anonymous posting happen. It took me a lot of searching before I found it. Works like a charm only problem is that it tries to let you pm the anonymous person.

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

    #60406

    In reply to: Anonymous Post

    rashantha
    Member

    okay so i found some talk about anonymous post.

    it seem like there is no solution at the moment other than a suggestion of ‘anonymous’ ‘anonymous username/password combo.

    how about a simple plugin that ask to decode a number sequence like in facebook.

    does anyone have anything like this?

    #60366
    chrishajer
    Participant

    Did you try recounting from the admin panel?

    Admin > Site Management > Recount

    "The following checkboxes allow you to recalculate various numbers stored in the database. These numbers are used for things like counting the number of pages worth of posts a particular topic has. You shouldn't need to do do any of this unless you're upgrading from one version to another or are seeing pagination oddities."

    (sure wish blockquotes were styled here!)

    #2333
    gusext
    Member

    Hi all.

    (Sorry for my bad english. I tried to be verbose in order to avoid my bad english affect your understanding)

    I wrote a plug-in, in order to have the best rewrite rules (in my opinion :p ) in the world.

    this plugin achieves two things:

    One: I need to show, in the URL, the logical parent-to-child relation between forums and topics, so

    http://www.example.com/bbpress/topic/my-sweet-dog

    URL has to show the forum that contains the topic, and become

    http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog

    when performing the rewrite, the rules totally ignore the forum part, so it’s only a visual thing.

    and, more difficult,

    Two: I need to shorten the URL and have fewer subdirectories, so

    http://www.example.com/bbpress/forum/pets-discussions/topic/my-sweet-dog

    has to lose the useless “/forum/” and the useless “/topic/” parts, and become

    http://www.example.com/bbpress/pets-discussions/my-sweet-dog

    ATTENTION: you cannot do the second thing without the first thing. you must be able, in rewrite rules, to discriminate between a topic and a forum. you then will have that forums have one string (the forum slugged name), while topics have two strings (the forum slugged name and the topic slugged name), so you can do that, and /pets-discussion/my-sweet-dog will belong to “My Sweet Dog” topic in “Pets Discussions” forum

    In order to do so, I need to

    – modify forum link creation

    – modify topic link creation

    – modify rewrite rules

    – avoid a forum to have a reserved name, as using bbpressfolder/forumname to reach a forum is risky! I have to prevent a forum from having a slugged name like “bb-admin”!!! here’s a list of reserved words:

    – all words with a dot. those are files, like style.css and so on. the slugged names never have a dot. I have only to avoid rewrite of dotted words.

    – all bbpress subfolders and special folders. these are all that start with

    bb-* , my-*

    – every other reserved word already used by rewrite engine:

    tag, profiles, view, rss

    All this is achieved adding a “r-” string in front of the slugged string. so a forum named “My Forum!” will have “r-my-forum” as slugged name. Unfortunately, this filter operates also for topic names and maybe other things. this mean that a topic named “rss” will have “r-rss” as slugged name. Not so bad, in facts.

    So these are the operations:

    – add a filter to get_forum_link (delete the “/forum” part)

    – add a filter to get_topic_link (add the “forum/slug-forum-name” in the link, and eliminate the “/forum” and “/topic” parts)

    – modify the rewrite rules (I used IIS isapirewrite, but apache is pretty the same)

    – add a filter to bb_slug_sanitize (avoid a forum to have a reserved word as slugged-name, like “rss”, “profiles”, “my-plugins”, etc

    And there is the code for these operations:

    function my_get_forum_link_filter( $link , $forum_id = 0 ) {
    //retrieve the forum object
    $forum = get_forum( get_forum_id( $forum_id ));

    //check for rewrite
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    //what kind of rewrite there is? slug use "forum_slug" column, else the column is "forum_id"
    $column = ($rewrite === 'slugs')?('forum_slug'):('forum_id');

    // change /forum/pets-discussions in /pets-discussions
    // this work only if the rewrite module is modded!
    // and this work only if the slugged name will NEVER
    // be a reserved word like "rss" or "bb-images"
    // and this is achieved by a filter on bb_slug_sanitize
    $link = str_replace('forum/' . $forum->$column , $forum->$column, $link);
    }
    return $link; // Very important line!
    }

    add_filter( 'get_forum_link', 'my_get_forum_link_filter' );

    function my_get_topic_link_filter( $link, $topic_id = 0) {
    //retrieve the topic object
    $topic = get_topic( get_topic_id( $topic_id ));

    //retrieve the forum object that is the topic container
    $forum = get_forum( get_forum_id( $topic->forum_id ));

    //check for rewrite
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    //what kind of rewrite there is? slug use "forum_slug" column, else the column is "forum_id"
    $column = ($rewrite === 'slugs')?('forum_slug'):('forum_id');

    //create the "forum/pets-discussions" chunk to show the hierarchical relation forum->topic
    $forum_nice_uri = "forum/" . $forum->$column . "/";

    //attach the hierarchical chunk to the link
    $link = str_replace(bb_get_option('uri'), bb_get_option('uri') . $forum_nice_uri, $link);

    // change /forum/pets-discussions/topic/my-sweet-dog in /pets-discussions/my-sweet-dog
    // this work only if the rewrite module is modded!
    // and this work only if the slugged name will NEVER
    // be a reserved word like "rss" or "bb-images"
    // and this is achieved by a filter on bb_slug_sanitize
    $link = str_replace('forum/' . $forum->$column , $forum->$column, $link);
    $link = str_replace('topic/' . $topic->$column , $topic->$column, $link);
    }

    return $link; // Very important line!
    }

    add_filter( 'get_topic_link', 'my_get_topic_link_filter' );

    function my_bb_slug_sanitize_filter( $text_slug, $text_original = '', $length = 0 ) {
    // add "r-" by regex when the string begins with "bb-" or "my-" or is a reserved word
    return preg_replace('/^(my-.*|bb-.*|rss|tags|view|profiles)$/', 'r-$1', $text_slug);
    }

    add_filter( 'bb_slug_sanitize', 'my_bb_slug_sanitize_filter' );

    And there’s the rewrite rules! ATTENTION!!!!! these rules are for IIS isapirewrite, so these are to be modded to work with apache! sorry but I don’t have any apache installation to play with. It’s a simple task, anyway. Every regex guru and regex accolite can do that. Even a regex wannabe can find out googling.

    #	first we rewrite the pages for normal slug-rewrite usage

    RewriteRule /bbpress/tags/([^/?]+)/page/([0-9]+)(?:?(.*))? /forum2/tags.php?tag=$1&page=$2?3&$3: [I,L]
    RewriteRule /bbpress/tags/([^/?]+)/?(?:?(.*))? /forum2/tags.php?tag=$1?2&$2: [I,L]
    RewriteRule /bbpress/tags/?(?:?(.*))? /forum2/tags.php(?1?$1:) [I,L]
    RewriteRule /bbpress/profile/([^/?]+)/page/([0-9]+)(?:?(.*))? /forum2/profile.php?id=$1&page=$2?3&$3: [I,L]
    RewriteRule /bbpress/profile/([^/?]+)/([a-z-]+)(?:?(.*))? /forum2/profile.php?id=$1&tab=$2?3&$3: [I,L]
    RewriteRule /bbpress/profile/([^/?]+)/([a-z-]+)/page/([0-9]+)(?:?(.*))? /forum2/profile.php?id=$1&tab=$2&page=$3?4&$4: [I,L]
    RewriteRule /bbpress/profile/([^/?]+)/?(?:?(.*))? /forum2/profile.php?id=$1?2&$2: [I,L]
    RewriteRule /bbpress/view/([a-z-]+)/page/([0-9]+)(?:?(.*))? /forum2/view.php?view=$1&page=$2?3&$3: [I,L]
    RewriteRule /bbpress/view/([a-z-]+)(?:?(.*))? /forum2/view.php?view=$1?2&$2: [I,L]
    RewriteRule /bbpress/rss/(?:?(.*))? /forum2/rss.php?1&$1: [I,L]
    RewriteRule /bbpress/rss/forum/([0-9]+)(?:?(.*))? /forum2/rss.php?forum=$1?2&$2: [I,L]
    RewriteRule /bbpress/rss/topic/([0-9]+)(?:?(.*))? /forum2/rss.php?topic=$1?2&$2: [I,L]
    RewriteRule /bbpress/rss/tags/([a-z-]+)(?:?(.*))? /forum2/rss.php?tag=$1?2&$2: [I,L]
    RewriteRule /bbpress/rss/profile/([0-9]+)(?:?(.*))? /forum2/rss.php?profile=$1?2&$2: [I,L]

    # then we have a rule for special words, so they are left as they are, and the isapi module does not proceed further

    RewriteRule /bbpress/(my-.*|bb-.*|rss|tags|view|profiles)(/.*)? /forum2/$1$2 [I,L]

    # then we have the forum and topic rules.
    # ATTENTION: we DO NOT rewrite a dottet word, because dotted words can be files like style.css and so on

    # before there are the topic rewrites, that are longer
    # ATTENTION: note that the forum name is totally skipped trough ?: notation. In facts, bbpress doesn't need the forum name when reading a topic
    RewriteRule /bbpress/(?:[^./?]+)/([^./?]+)/page/([0-9]+)(?:?(.*))? /forum2/topic.php?id=$1&page=$2?3&$3: [I,L]
    RewriteRule /bbpress/(?:[^./?]+)/([^./?]+)/?(?:?(.*))? /forum2/topic.php?id=$1?2&$2: [I,L]

    # and after there are the forum rewrites, that are shorter
    RewriteRule /bbpress/([^./?]+)/page/([0-9]+)(?:?(.*))? /forum2/forum.php?id=$1&page=$2?3&$3: [I,L]
    RewriteRule /bbpress/([^./?]+)/?(?:?(.*))? /forum2/forum.php?id=$1?2&$2: [I,L]

    And that’s all. I hope someone can use this plugin :)

    Gus

    email: shiawase at gmail dot com

    #2331
    wpitn2shape
    Member

    I want to hook, et whatever, into the author id of a post to make my avatars plugin work with BBPress.

    The docs just say it’s the same as WordPress, but not exactly. The tags are different and my original plugin doesn’t work anyway (or perhaps it’s an integration problem with my installs. I’m running MU).

    I’m looking for equivalents like these or anything related

    $the_author = get_the_author_id();

    Where are the docs for the plugin API, basically? I don’t require you to look into what exact hooks, etc. I need, just lead me to info. If you want to do more, that’s fine, too. :-)

    #60363
    wpitn2shape
    Member

    An update:

    I don’t think my integration in general is working too well, because my avatar from my own avatar plugin is not displaying my user’s av. Of course this could be my plugin, and perhaps I need to work on an integration for THAT, too – ha ha.

    But I’m really worried about my MU integration..

    Looking closer I think it is the plugin in the sense that the post doesn’t bring up WP-type post code, but BBPress and the plugin doesn’t have that written. It’d have been nice for it to be more integrated on its own. I read others use their plugins on the forum pages. Sigh.

    #2326
    baptiste
    Member

    I’ve been working on updating a theme to be more ‘navigable’. I found the new_topic function could not be used when viewing a topic, so I modified the function to return a proper ‘Add New Topic’ link when called from a topic view (topic.php)

    The code changes can be found in ticket 736:

    http://trac.bbpress.org/ticket/736

    Here I added a ‘New Topic’ link in the topic meta section:

    http://onthepitch.org/talk/topic/coaching-youth-soccer

    #59879
    _ck_
    Participant

    I need to go back and change the bottom into a table like I did with the FutureKind theme. That will solve both the border on the headers and the spacing is an easy fix with line-height. I haven’t released it because I still have to clean up some CSS laziness that I did and put in some conditional code for bb-topic-views (so it will still work right if people don’t have it installed)

    The server load on dreamhost is always wrong (as with their microtime so the page render time is always wrong). Dreamhost uses a NFS filesystem where the files are remote from the server the code is executing on. So if there is a file queue, the load will be artificially high, it’s not CPU load, it’s disk load (which affects the overall load numbers).

    I only paid $20 for that dreamhost (for a year promo) and will not be renewing. It’s mind-boggling that some people pay over $100 a year for that hosting.

    #57091
    baptiste
    Member

    I put together a plugin that will allow you to include navigation links to flip forward or backward through forums and/or topics within a forum.

    http://plugins.baptiste.us/plugins/nav-links-for-bbpress/

    This is a first stab. No online config, etc. yet – just the main code to get the right links and forum/topic IDs. I hope to add some things to it and improve the API a bit to let templates get individual ‘next’ or ‘previous’ links.

    I ended up having to do direct DB queries – I couldn’t find a way in the main bbPress code to get me the info I needed, but I’m not super familiar with the core code either so I may have missed something. But no functions or class methods jumped out at me.

    I’ll post the bbPress plugin URL for it once it’s approved, but you can download it from the link above.

    Here’s a look at what it does on a forum I’m still setting up/messing with.

    Topic Nav – look in the meta section under the RSS link:

    http://onthepitch.org/talk/topic/test-topic-2

    Forum Nav – look under the list of topics:

    http://onthepitch.org/talk/forum/soccer-parents

    Yes – I know the forum navigation disappears in forums with no posts – side effect of the action hook I used to insert (it seems to return without applying filters when there are no posts – which I guess makes sense if you’re figuring there’s nothing to ‘filter’. But many filers append :( )

    This definitely makes navigation for my setup much easier.

    #59878
    neyoung
    Member

    When are you going to make kakumei too available _ck_ ? I’ve been drooling over it for a week or two now :)

    #59877
    benbeltran
    Member

    Aha! It’s nice, I think it needs a small bottom border on the Views and Hot Tags headers, you know, like the other headers ^_^.

    Again, I think the list of views could use a bit more space between lines.

    Seriously, what’s with your serverload O_O. Do you want some free hosting for that stuff? It’s not healthy to live in a server with 9+ server load.

    #60301
    chrishajer
    Participant

    Do you have a file called /my-templates/ronjroy/screenshot.png ? AFAIK, it needs to be a png, it needs to be called screenshot.png and it needs to be in that directory. If it is, then I’m not sure what the problem is. That works for me. Mine is 300×225 also, not sure what happens when it’s smaller or larger than that.

    #60259
    _ck_
    Participant

    It’s kinda offtopic for here but it’s such an easy fix.

    The reason why the news doesn’t turn white is because the link does not have the class “current_page_item” set. It should be something like <a class=current_page_item href= but I am not familiar with your menu system, if it’s hard coded or if it’s part of some plugin.

    I am guessing it’s hard coded and then it would be just a matter of editing the template for the news page to add class=current_page_item

    #57090
    baptiste
    Member

    This is definitely worth doing. bbPress needs to have template functions that allow you to get the ‘next’ or ‘previous’ forum and topic. This would allow themes to include nice navigation links like ‘Next Thread’, ‘Next Forum’ instead of always having to jump to the front. WordPress does this for posts.

    I’ve looked all around and I’m just not seeing anything like this.

    I’m going to mess around with some code – it looks like the BB_Walker has a stepping ability built in that SHOULD make this pretty trivial, but I’m still getting comfortable with the inner bbPress classes and such. I’ll post here if I come up with anything. If anyone else has tried this or knows of a plugin that exists already – let me know. I couldn’t find one. Again – this isn’t pagination when you have lots of posts/threads. This is when you are in a topic or post view, being able to navigate to the next post, thread, or forum – i.e. like flipping pages of a book.

    #58895
    _ck_
    Participant

    No I don’t mean a folder within a folder, that’s just fine and not a problem. I mean executing one within the other where they are both running at the same time on one page. That’s a huge amount of code and memory for any server, shared or dedicated.

    The nice thing about the registration and login process is you can route back to any page you want as the wordpress system is much more developed. I have the code around here somewhere and posted it before…

    see #5 on the list in this post:

    https://bbpress.org/forums/topic/user-intregation-between-wordpress-038-bbpress-not-work?replies=7#post-10428

    #58893
    _ck_
    Participant

    Ah apparently Detective’s method is for sites running WP at the same time as bbPress (not just integrated, running within each other – which I do not recommend). So this won’t work for most people.

    I solved the problem by forcing all registration links to go through WordPress but obviously that’s not a perfect answer (and needs core hacks).

    So this problem needs to be revisted again :-(

    #60360
    chrishajer
    Participant

    Usually that is from white space at the end of a file you edited. There should be no blank lines or whitespace after the closing ?> in the config.php. Is that the problem?

    Also, in your pasted config, there is no <?php – in the real file there is?

    And, when you edited out the password, you accidentally removed the closing quote, right? In the real config.php the password is enclosed in single quotes?

    define('BBDB_PASSWORD', 'pwpw);
    ^

    #60073

    In reply to: top 100 bbPress sites

    benbeltran
    Member

    Sure … but i had to make some hacks to the template-functions *shame* to allow for color-changing tag-cloud.

    :( I don’t know better.

    #53362
    baptiste
    Member

    I use this theme at:

    http://plugins.baptiste.us/forums/

    matching the site theme itself. Works great. I should put together a diff of the modifications I made to tweak things like removing the urchin code and fixing a few other quirks….

    #60122

    1. The post only shows up for the user who posted

    2. It’s not registered in the users postcount

    3. It’s not registered as “last poster” in the topic list

    4. The thread is not moved to the top in the topic list

    5. It does not happen every time

    6. It has happened to several users

    I think I’m beginning to lose users over this :( Anyone? Ideas?

    #2321

    I’ve been thinking about a good way to display the profile page for some time now. I’d like the avatar to be a fixed size and an extra field for some personal text, kind of like myspace or other communities. Do you think I’ll just have to dig in there or has someone already made all the hard work for me? :)

    #2320

    http://www.doublepeace.se/forum/tags.php

    It’s quite a mess, I guess in both IE and Firefox :) Any help with this? I’d like it sorted left-to-right by popularity (font-size) as well.

    #60239

    This seems to work on all versions:

    .post { display: block; width: 100%; overflow-x: auto; }

    Except! In older versions of IE the sidescrollbar is on top of the last line of text in the post. Any takers? :)

    #53361
    _ck_
    Participant

    Very nice work. Extremely visually pleasing theme.

    However you just might want to remove your google urchin tracking code from the template footer you distribute. Most bbPress newbies won’t catch that and it could get your Google account banned if they report it.

Viewing 25 results - 29,126 through 29,150 (of 32,491 total)
Skip to toolbar