Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 30,976 through 31,000 (of 32,491 total)
  • Author
    Search Results
  • Fakey
    Member

    After a search for a word that appears only in the topic title (but not the tags, nor post content) the results are listed, followed by:

    No results found.

    This is because the if statement is looking for the local variable $topics, instead of the correct variable $titles.

    It’s a small fix, but I didn’t know how to post on the bbPress bugtracker.

    #54273
    spencerp
    Member

    Thanks for your reply Sam… :) Yeah, for the most part at least lol. Only thing I can’t seem to get working for me though, even followed your instructions over here:

    https://trac.bbpress.org/ticket/520#comment:30

    Is applying a “patch” using SVN access… I’m on dreamhost, but, I go through the: START > RUN > CMD …. then login that way… I tried adding that line of code, and even uploaded the patch to my forums/ root directory.. used that:

    $ patch -p0 < /path/to/patchfile/categories-build701.patch

    Giving my path of “/public_html/forums/categories-build719.patch

    And it fails to find such thing in that directory? I’m not a Pro at SVN-ing yet, but anyone with any thoughts, suggestions, and so forth? I was just going to download the lastest SVN files to the Desktop like normally did, and apply patch via Tortoise SVN.. and only upload those “patched” ones… into the forums/ root..

    Does that sound like it’s my only option, or.. maybe someone can tell me for sure what to do, and how to do patches via SVN or whatever.. Thanks in advance..

    *EDIT* Oh, or does it mean the WHOLE path? I’ll give that a whirl once then, won’t hurt lol.

    spencerp

    Trent Adams
    Member

    It requires you to create a file called .htaccess and place it in your bbpress root folder. Most works with just the following in it:

    Options +MultiViews

    Once you have that in your .htaccess your can turn mod_rewrite on in the config.php and see if it works. If not, try taking that line out of the .htaccess and put whatever you have spit out of this file:

    http://chezmauricekusadasi.com/yeni/forum/bb-admin/rewrite-rules.php

    Then turn that with mod_rewrite on. If that doesn’t work, then it most likely isn’t going to I am afraid and you will have to turn the fancy URL’s off again!

    Trent

    #54340
    Trent Adams
    Member

    Sorry, I should have done this sooner for you (just been crazy busy!). Create a file called whatever you want, but I recommend path-to-url.php and put the following in it and upload it to /my-plugins/ directory:

    <?php

    function fix_bb_path_to_url( $url ) {
    $url = str_replace(array('//', '\\'), array('/', '\'), $url);
    return preg_replace( '|:/([^/])|', '://$1', $url );
    }

    add_filter( 'bb_path_to_url', 'fix_bb_path_to_url', 1, -1 );

    ?>

    That might work with the stylesheet issue. Let me know

    Trent

    #54272
    Sam Bauers
    Participant

    Sound like you’ve got everything under control. :)

    #1479
    spencerp
    Member

    What I’m probably going to do is, just use the CSS file codes that I had, for when using the Forum Category enhancement with my bbPress forums. It’s not going to be a big deal if those Forum Category CSS codes are in the stylesheet anyway.

    For those running the Forum Cat enhancement, or not, I’ll release a Gathering theme version for either route. A) One for the plain Jane bbPress users, and B) One for those that are already using the Forum Category enhancement. ;) :)

    Please note though, that this theme will be an AS-IS type of deal!!

    I’ll try to give a helping hand, and try my best to provide “support” for it, but, I’m just a really, really busy person sigh. I barely have time to sleep and stuff… :( Besides, if any problems arise, your answers should be, or, could easily be answered here, since it’s basically just a theme. If you happen to have issues with the Forum Cat enhancement patch itself, I’m sure Sam would be happy to help you.. :) ;)

    Anyway, here’s what’s on my TO-DO list, starting now!

    1) Delete all the current plugins on my forums, so I have a total plain Jane bbPress install to work with…

    2) On the localhost/computer .. make up the “Gathering” theme on the latest Trunk files of bbPress. With, and without the files containing the Forum Cat enhancement edits… (Again, this theme should (generally) still work for .80, however, not sure about the backwards compatibility for the forum Categories enhancement though)…

    3) Download the latest copies of the plugins I deleted, tweak the new ones, upload and install them…

    4) Try and get some kinks out of the theme, which happens when using some certain plugins sigh..

    5) Release two copies of the Gathering theme, one for plain Jane bbPress users, and one for those already using the Forum Category enhancement…

    6) Then I’ll probably apply the theme I just spent the last 3 days on, non-stop, which I put up on my Vindictive Bastard blog… I’ll apply that on my spencerp.net blog then too.. and make it a theme for bbPress as well … whee! What you think? http://www.vindictivebastard.net/

    7) I’ll try and actually get some sleep!! Geesh, I’m beat!

    Anyway, I’ll keep everyone updated on this.. thanks for your time..

    spencerp

    #54271
    spencerp
    Member

    Okay, I just SVN-ed the forums… :D Now, before I go any farther! I’m going to make the “Gathering” theme for bbPress, on the latest Trunk files… Which should still be ok for those using .80 and .81

    I’m going to start a new post about that “Gathering” theme, after posting this… so.. ;) Thanks again Sam, for the tips, and the awesome Forum Category enhancement. ;):)

    spencerp

    #54966

    In reply to: Users Website in Topic

    DAMN! :D

    #54965

    In reply to: Users Website in Topic

    Hi, öffne die template-functions.php im bb-includes Ordner und editiere die funktion “post_author_url()”. Such einfach in der Datei nach dieser Funktion.

    Man kann es mit SEO auch übertreiben. Deine User schreiben wertvolle Beiträge (gerade in deinem Bereich ist jede Zeile Gold wert). Lediglich meine Meinung, mach wie du denkst. Hoffe ich konnte behilflich sein :)

    Steven

    #54338
    kirkk
    Member

    I did everything but it is still the same :/

    #54268
    spencerp
    Member

    Hi Sam, I already got SVN access on my spencerp.net domain. :) I just hadn’t did any SVN-ing on the WP blog itself, and the bbPress forums though. I manually uploaded the files, ran install, upgrades when needed..

    But, I guess I could though. Just make my way to the forums/ directory, and do a SVN checkout for bbPress right? Here’s how I usually do my SVN checkouts, into a specific folder:

    svn co http://svn.automattic.com/bbpress/trunk .

    Once I’m done with that, then run the upgrade, right? Then worry about applying the patch for the Forum Categories?

    I never applied a “patch” via the SVN way before, I just want to know step by step, briefly even, how-to do this… Do I just slap in the patch URL.. or.. ? Thanks in advanced…

    spencerp

    #54821

    In reply to: Rewriting URLs

    marky
    Member

    Well, I’ve found the solution! Apparently, ModRewrite doesn’t count the query string as part of the URL, so it needs to be addressed separately. These rules did the trick:

    RewriteEngine On
    RewriteBase /forums/
    RewriteCond %{QUERY_STRING} ^t=([0-9]+)$
    RewriteRule ^viewtopic.php$ /forums/topic/%1 [R,L]

    #54337
    chrishajer
    Participant

    Kirkk: that is what the plugin is supposed to do, I think: turn the slashes around. When you pasted the code into that file, did it have line numbers? You should use the plain text version here:

    https://trac.bbpress.org/attachment/ticket/575/path-to-url.2.php

    Is the my-plugins directory readable (0755 permissions) and the file is readable by the webserver (0644 permissions at least)?

    Also, I don’t know the answer to this question, but should it have the .2. in the file name, or should the file be named path-to-url.php? I don’t know if the filename matters at all. I know there was a version one without the 2 in the filename.

    Keep plugging away. You’ll get it.

    #54336
    kirkk
    Member

    I think this problem is about my server, i mean the software that my server use. Because i couldnt see any mistake in the config file, but i have realized something, if i could find BBPATH, the codes which create this variable, i would be able to fix the problem…

    Thanks

    #54694
    fel64
    Member

    Yup, I know that; I just meant that you could quite simply add it to the arguments you took and it’d be a nice addition. My modified code at the end.

    Yeah, it’s mildly annoying that the permalinks aren’t used, but it’s not a killer for me. I’d rather have this functionality than none. :) Thanks again for the plugin.

    function wp_show_posts( $args ) {
    global $bb;

    parse_str($args, $r);
    if ( !isset( $r['before'] ) )
    $r['before'] = "<li>n";
    if ( !isset( $r['after'] ) )
    $r['after'] = "<br />n</li>n";
    $posts = wp_get_posts( $args );
    foreach( $posts as $post ) {
    echo $r['before'];
    echo "<a href='".$bb->wp_home."?p=".$post->ID."'>";
    echo $post->post_title;
    echo "</a>";
    echo $r['after'];
    }
    }

    #54693
    nickbrady
    Member

    Hi, fel64, you can use wp_get_posts() instead of wp_show_posts() and then use a foreach loop, much like the examples in the WP Codex for the get_posts function

    You don’t mind that pretty permalinks are not being used? I think it’s a killer, let’s hope some expert can help us.

    #54692
    fel64
    Member

    Fantastic Nick, worked straight out of the box. I really like the way you take arguments as well. :) Nicest addition would be a before and after so that it didn’t have to be a list.

    #54691
    nickbrady
    Member

    Hi,

    I am writing a plugin for BBPress that shows the latest posts from WP (if WP and BBPress are sharing the same database). It’s still in development, but it already works, you just have to write


    <?php wp_show_posts(\"\" ); ?>

    in any BBpress template.

    As you will see, it works, but it has a problem: it does not show WP’s pretty URLs. I would like to call WP’s get_permalink() function, but it uses many WP functions that are not available when you’re in BBPress.

    Any advice on how to do this? Or maybe it would be easier to read WP’s RSS?

    Thanks!

    Here goes the code of the plugin so far (if you don’t care about pretty permalinks, you can use it, it works):


    <?php
    /*
    Plugin Name: WP Posts
    Plugin URI: http://thesandbox.wordpress.com
    Description: Get a list of WordPress posts from your bbPress (needs to be integrated with WP, sharing database)
    Author: Nick Brady
    Version: 0.1
    Author URI: http://thesandbox.wordpress.com

    Install Instructions:
    - If you don't have a /my-plugins/ directory in your bbpress installaltion, create it on the same level as config.php.

    - Check out: https://codex.wordpress.org/Template_Tags/get_posts

    */

    function wp_get_posts($args) {
    global $bbdb, $bb;

    parse_str($args, $r);
    if ( !isset($r['numberposts']) )
    $r['numberposts'] = 5;
    if ( !isset($r['offset']) )
    $r['offset'] = 0;
    if ( !isset($r['category']) )
    $r['category'] = '';
    if ( !isset($r['orderby']) )
    $r['orderby'] = 'post_date';
    if ( !isset($r['order']) )
    $r['order'] = 'DESC';

    $now = bb_current_time('mysql');

    $posts = $bbdb->get_results(
    \"SELECT DISTINCT * FROM \".$bb->wp_table_prefix.\"posts \" .
    ( empty( $r['category'] ) ? \"\" : \", \".$bb->wp_table_prefix.\"post2cat \" ) .
    \" WHERE post_date <= '$now' AND (post_status = 'publish') \".
    ( empty( $r['category'] ) ? \"\" : \"AND \".$bb->wp_table_prefix.\"posts.ID = \".$bb->wp_table_prefix.\"post2cat.post_id AND \".$bb->wp_table_prefix.\"post2cat.category_id = \" . $r['category']. \" \" ) .
    \" GROUP BY \".$bb->wp_table_prefix.\"posts.ID ORDER BY \" . $r['orderby'] . \" \" . $r['order'] . \" LIMIT \" . $r['offset'] . ',' . $r['numberposts'] );

    return $posts;
    }

    function wp_show_posts( $args ) {
    global $bb;
    $posts = wp_get_posts( $args );
    foreach( $posts as $post ) {
    echo \"<li>n\";
    echo \"<a href='\".$bb->wp_home.\"?p=\".$post->ID.\"'>\";
    echo $post->post_title;
    echo \"</a><br/>n\";
    echo \"</li>n\";
    }
    }
    ?>

    flatworm
    Member

    I do not know php and html. I’ll search for this code line usind WIN. search to find <link rel=\"stylesheet\"

    I really do not want to be involved in the process of development of bbPress.

    All this really makes me think of using Vanilla.

    http://www.getvanilla.com

    Vanilla looks more professional and developed, but it is 50% bigger in size.

    Code is poetry, equaly unconceptional to everyone.

    #54881

    In reply to: Template Tags

    fel64
    Member

    Page numbers – say a thread has more than 30 replies and falls onto the second page, it’s very irritating having to click the thread’s name and then click again to get to the second page. Next to the page’s name you should simply have the page numbers displayed and clickable, hopefully in a smart way (say showing the first few and the last few). You can see it on this forum, too: say I want to read the second page of posts in the Plugin: Forum Restriction thread, I have to click on the name and then on the second page. Is there maybe even a plugin to list the page numbers next to the page name in the thread listing?

    In WordPress you have hooks that let you take actions through your plugin when they’re called, right? I guess bbPress does the same. I specifically want to create an Identicon avatar on registration – it’s not essential, just something I’d like to do. How do I register my plugin to work on that hook, and what hook do I use? Just a list of hooks would be helpful. :)

    #54928
    AphelionZ
    Participant

    Yeah, taking it out was a good idea. My forum doesnt use it and making it something that isnt in the core code makes it more useful as a ‘general’ forum right out of the box and not just a forum software for tech support.

    chrishajer
    Participant

    That is unstyled because the path to the style.css file is incorrect. Can you look at the source of that html page and find the line that begins:

    <link rel="stylesheet"

    My guess is that the path to your stylesheet is incorrect. There have been a couple threads about slashes being changed to back slashes improperly:

    https://bbpress.org/forums/topic/700?replies=28

    Even more relevant for localhost:

    https://bbpress.org/forums/topic/730?replies=9

    Here is a trac ticket for the backslash issue:

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

    HTH

    edit: there will not be slashes before the double quotes in your html source around stylesheet , unlike this post. It’s a bug they’re working on.

    #49932

    In reply to: En español

    lonemadmax
    Member
    #54300
    lonemadmax
    Member

    From all those links, I could only get the es_AR one (I’m having some strange problems with my DNS, so it may be just me). So here is my es_ES version.

    #54903
    lonemadmax
    Member

    At the end of the plugin you can see:

    add_filter('user_sanitize', 'user_sanitize_i18n_fix', 10, 3);

    That adds the function defined in the plugin to the user_sanitize hook. Grepping the core files for user_sanitize, you find return apply_filters( 'user_sanitize'[…] in bb-includes/formatting-functions.php, in the function user_sanitize. When that function is called with strict = true, it removes what it considers not to be a letter, a number or a ‘-‘ from the first parameter (the provided username), and replaces repetitions of ‘-‘ with just one. So the underscore is removed. When strict is false, underscores are kept. Another effect is that accented characters and other such niceties of international scripts are also invalidated.

    After doing that, it runs the filters, telling them its result, the original value and the value of strict. If installed, usernames-i18n-fix will be one of those filters. It returns the original username value (that is, with whatever characters were there from the beginning) if not in strict mode. If strict is true, it just replaces repetitions of ‘-‘ with only one ‘-‘.

    So that’s how I read it. But I don’t know if the names really need the sanitazion.

Viewing 25 results - 30,976 through 31,000 (of 32,491 total)
Skip to toolbar