Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,001 through 27,025 (of 32,467 total)
  • Author
    Search Results
  • #66793
    fel64
    Member

    h4 is a block element and as such it should not be enclosed in a <p> anyway.

    How are you adding the paragraph tags? That could be a source of trouble for your plugin.

    #67201

    In reply to: Private Message Popup

    chrishajer
    Participant

    You don’t need to use a function: you could add the functionality you want just by hacking the plugin. You can always refactor later to move some things into functions.

    Start simple. Find the place where the message is displayed to the user. Then, add some html there to display an image. Make sure you upload the image, then make sure you get the path to the image correct. I think that would be pretty simple.

    I thought there was a “newmail.png” already included though? I don’t use the PM plugin, but if that icon is present, where is it displayed? If it’s not on the page you want, I would use the same method they use to display it, just on a different page.

    Although the title of this topic is “Private Messaging Popup” you’re not looking to create a javascript popup when the user logs in that they have a PM, are you?

    You could also contact the plugin author:

    http://faq.rayd.org/bbpress_private_message/

    From that page:

    Visible representation of when a message hasn't been seen (in your inbox and sent box)

    #54924
    chrishajer
    Participant

    I think you left off the trailing “[space] dot” that indicates “put it in the current directory” or path. From the svn help:

    If PATH is omitted, the basename of the URL will be
    used as the destination.

     

    That means it creates “trunk” for you, which you don’t want.

    Just delete the trunk directory and cd into the forum directory again, and run this whole thing:

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

    There is a / then a [space] then a period at the end there. That will put it into the current directory with no trunk directory being created.

    #3884

    Topic: Private Message Popup

    in forum Plugins
    brad_langdon
    Member

    Does anyone know how to modify the code of the private messages plugin so that an image is inserted when a message is received.

    I was thinking of an image popping up next to the text where it says you have a new message like an envelope icon or something.

    I am guessing you would add some kind of function but I don’t quite know how.

    #67194
    geekymom
    Member

    Good questions! This is an initial install, so there’s nothing previous there. When I click the admin link, it reloads the front page. I can click on a forum or post and it takes me to the right page. The permalinks appear to be numeric. I haven’t made any changes at all. I am using the default theme, no plugins. It’s a pretty virgin install. :)

    #67162
    jbbrwcky
    Member

    That did it! Thanks very much :)

    #66315
    lstelie
    Member

    Hello,

    I would be highly interested if your plug in works with 1.0 alpha and >.

    BBcode and other ways are great for tech-savy people, but for a basic customer website, wysiwyg editor like tinyMCE is far simpler, natural and so on..

    #64520
    shoggy
    Member

    I tried greenhome’s solution and it almost worked. Thanks! :-)

    However I got some minor errors, especially with links like http://domain.tld/forums/topic/test?replies=3#post-17 or http://domain.tld/forums/profile/username/favorites?fav=0&topic_id=1&_wpnonce=10a4ad44b8

    Here is a workaround :

    In /etc/lighttpd/bbpress-rewrite.conf, I have :

    url.rewrite-once += (

    # /forum/FORUM-NAME

    "^" + bbpressdir + "forum/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "forum.php?id=$1&page=$2",

    "^" + bbpressdir + "forum/([^/]+)/?$" => bbpressdir + "forum.php?id=$1",

    # /topic/TOPIC-NAME

    "^" + bbpressdir + "topic/([^/?]+)(?(.*))?$" => bbpressdir + "topic.php?id=$1&$3",

    "^" + bbpressdir + "topic/([^/]+)/page/([0-9]+)(?(.*))?/?$" => bbpressdir + "topic.php?id=$1&page=$2&$4",

    # /tags/TAG-NAME

    "^" + bbpressdir + "tags/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "tags.php?tag=$1&page=$2",

    "^" + bbpressdir + "tags/([^/]+)/?$" => bbpressdir + "tags.php?tag=$1",

    "^" + bbpressdir + "tags/?$" => bbpressdir + "tags.php",

    # /profile/PROFILE-NAME

    "^" + bbpressdir + "profile/([^/]+)/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "profile.php?id=$1&tab=$2&page=$3",

    "^" + bbpressdir + "profile/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "profile.php?id=$1&page=$2",

    "^" + bbpressdir + "profile/([^/]+)/([^/?]+)(?(.*))?/?$" => bbpressdir + "profile.php?id=$1&tab=$2&$4",

    #"^" + bbpressdir + "profile/([^/]+)/([^/]+)/?$" => bbpressdir + "profile.php?id=$1&tab=$2",

    "^" + bbpressdir + "profile/([^/?]+)(?(.*))?$" => bbpressdir + "profile.php?id=$1&$3",

    # /view/VIEW-NAME

    "^" + bbpressdir + "view/([^/]+)/page/([0-9]+)/?$" => bbpressdir + "view.php?view=$1&page=$2",

    "^" + bbpressdir + "view/([^/]+)/?$" => bbpressdir + "view.php?view=$1",

    "^" + bbpressdir + "rss/?$" => bbpressdir + "rss.php",

    # /rss/FEED-NAME

    "^" + bbpressdir + "rss/forum/([^/]+)/?$" => bbpressdir + "rss.php?forum=$1",

    "^" + bbpressdir + "rss/topic/([^/]+)/?$" => bbpressdir + "rss.php?topic=$1",

    "^" + bbpressdir + "rss/tags/([^/]+)/?$" => bbpressdir + "rss.php?tag=$1",

    "^" + bbpressdir + "rss/profile/([^/]+)/?$" => bbpressdir + "rss.php?profile=$1"

    )

    Finally, I just add this configuration for each vhost using bbpress :

    $HTTP["host"] =~ "domain.tld" {

    var.bbpressdir = "/forums/"

    include "bbpress-rewrite.conf"

    }

    Hope this helps!

    #3876
    ramym
    Member

    Hello,

    I like the Latest Discussions on the frontpage, to have a quick look of the active topics, but I’d like to limit it to max. 5 topics.

    Is there a way to do this? I tried several plugins found on the internet/this website, but none of them works.

    Is there a way by changing the code? If yes, in which file should I look?

    Btw, what is the default amount of ‘Latest Discussions’ on the frontpage?

    Thanks.

    #3780
    csseur3
    Member

    Hey, i try to add my own bbcode with http://bbpress.org/plugins/topic/93

    In BBcode-lite.php, i do that:

    $simple = array('t' => 'h4','b' => 'strong', (etc)

    but in my page, the source say that:

    <p></p><h4>Quel statut?</h4>

    so, the normal code must be:

    <p><h4>Quel statut?</h4>
    </p>

    no?

    why the formatting is not correct?

    Bye

    #58007
    chrishajer
    Participant

    It’s OK to start a new topic for a new problem.

    To change the language, you need to make a change to the bb-config.php file, and you need to install the language files. There is an Arabic language file shared here:

    check out this very nice R-t-L Arabic bbPress

    To install a language file, the instructions are right in that area of bb-config.php:

    // Change this to localize bbPress.  A corresponding MO file for the
    // chosen language must be installed to bb-includes/languages.
    // For example, install de.mo to bb-includes/languages and set BB_LANG to 'de'
    // to enable German language support.
    define('BB_LANG', '');

     

    You put the file (downloaded from Google Code) into the `bb-includes/languages/ directory. Then enter the name of the file here in between the single quotes for the BB_LANG constant. For Arabic, I think the file is ar_AR.mo, so your config line would be:

    define('BB_LANG', 'ar_AR.mo');

    There are more files available at that code.google.com site for an Arabic bbPress. It’s actually very nice that someone shared all their work. Looks like there is a localized version of bbPress there as well, possibly with more items translated that were not translatable with a language file.

    #67155
    chrishajer
    Participant

    I have no idea. Might be this (based on looking at another user in my database):

    a:1:{s:13:"administrator";b:1;}

    But I would just change them through the Admin backend, rather than directly in the database. Much safer. Once you have the keymaster back and can log in, you can change anyone you want to administrator or other level one logged in.

    #66343

    In reply to: (Weird) Open Cafe

    thion
    Member

    If any of you is interested in paranormal stuff and you would like to help in developing Open Cafe (both content and php code), please contact me on f.t.mastergreed [at] gmail.com – I’m desperately looking for coder ;)

    #66066
    karlo
    Member

    Well, the installation (with full wp-integration) went as smooth as it could have, but the index.php doesn’t want to load. Not even when fully referred to in the URL (/forums/index.php).

    My ftp-client sees the full installation and the content of the file seems to be ok. What settings could cause this error other than the URL actually not being valid, though I can’t figure out why that should be? :P

    EDIT: I found that Firefox can open and read the readme.txt and licence.txt just fine, but it wont execute the php-files properly… this is just wierd?? What the heck did I miss here?

    #66889

    In reply to: Blank Screen

    chrishajer
    Participant

    The password normally contains special characters and that’s fine. That’s how I can usually tell if the bbPress is an old version or new version, based on the password being sent out when you register.

    There is no problem with having special characters in the secret keys: it’s just that if they’re not properly escaped, the server will choke on the config file because the bb-config.php does not have proper syntax.

    So, make sure the keys are the same for WordPress and bbPress, make sure the bb-config.php is syntactically correct (php -l bb-config.php from a Linux command line) and then figure out why you can’t log in.

    You can also make the secret keys really short and easy to compare while testing to see if that’s the problem.

    It’s also worthwhile to check any php file you edited for the proper syntax. Maybe once you log in, you are being served another page that has a syntax error (a template file?) and that is causing the blank screen.

    Also, access to error logs will help with this, if you have them.

    #67110
    _ck_
    Participant

    Everyone put this in your bb-config.php

    $bb->load_options = true;

    and that number will go down radically.

    For some reason I don’t understand they refuse to make that the default and therefore bbPress just “lazy loads” each option as each plugin requests it.

    If you are using the 1.0 alpha they still have a bit of work to do with query reduction as they rewrote half the routines and storage layout but left it unoptimized. For example each forum on the front page is loaded as a separate query and then the meta for each forum is loaded as a separate query. It’s a bit crazy because if you have a dozen forums that’s 24 queries but I have high hopes Sam or MDA will tackle that soon and do it all in just two queries.

    Last but not least there is a serious optimization problem IMHO in all versions where bbPress will “read before write” every time a meta option is saved, regardless if it’s just been loaded and sitting in the object cache. I have to put a bit of extra code in all my plugins to work around this issue. The reason why they do that is to determine if they should do an INSERT vs an UPDATE because you can have duplicate keys on meta data by design and mysql can’t be told what to do if the key already exists. But there are better ways to do that – since 99.99% of the time it’s going to be an update since the data already exists – do an update and just check for a mysql error on the return (or count rows affected) – then do an insert instead that one time it’s needed.

    #55314
    Detective
    Member

    I use it in WP and bbPress :) It’s easy to adapt, and as you have both integrated …

    Of course you could also print the “about” text entered by the user in their Profile page in the Dashboard. So you only really need a plugin for the gamertags.

    #55313
    pilola
    Member

    Detective – Thanks I’ll take a look. But it doesn’t seem to be what I’m looking for since it’s a wp plugin. And the possibility of adding gamertags isn’t really the only thing I want to get out of this.

    I mean what I’m really looking for i some way to catch the value of a field and echo it inside some code.

    And as i mentioned earlier I’d really like to give my users the op to create “About me”-content.

    Maybe it’s easier to do this outside of the profile-section? But I’m unfortunately not a PHP-coder so I ain’t good at writing php from scratch.

    #55312
    Detective
    Member

    Pilola, you could use this plugin: https://wordpress.org/extend/plugins/gaming-codes/

    I use it here: http://www.ryuuko.cl/bbpress/ (see the “nuestros usuarios” links).

    #55311
    pilola
    Member

    Midnightsun & antonskey already mentioned similair things. I have a site for gamers (integrated wp and bbp using the bbp as the member section) and I wan’t to give them the possibility to add their Xbox Live Gamertag, Wii Friendcode and PSN ID.

    There must be som easy way to, from the profile-template, check if the Gamertag field has a value and then just ad the name to the gamertag embed code. I was looking in the template-functions file and took a look att bb_profile_data and I think that’s kind of similar to what should be used in the theme.

    Also I would like to give the members the possibility of creating something like a About Text. So instead of a normal field i would need a textarea. Hope someone knows what could be done.

    #67137
    orizine
    Member

    no more problem, whith some modifications i had done what iwante :D

    #3870
    outchy
    Member

    I have a band messageboard that’s worked flawlessly for a year now… but when I tried posting myself just now, it didn’t appear on the board. When I checked the dashboard, this is what it said for the latest post:

    Post on
    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND meta_key='views'' at line 1]
    SELECT meta_value FROM bb_topicmeta WHERE topic_id = AND meta_key='views'
    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'views', )' at line 1]
    INSERT INTO bb_topicmeta ( meta_id, topic_id, meta_key, meta_value) VALUES ( NULL , , 'views', )
    Gavin DeGraw by neddi.

    Any idea what’s going on? I’ve never seen this before… and I think I’m the only one with access to the backend.

    #67125
    benzilla069
    Member

    Yeah I’m currently just messing about with it at the moment, I’ve stripped it down to what I believe are the bare essentials… please note I don’t have any PHP experience but I do have other languages like C under my belt so I’m getting the hang of it ok.

    <?php
    /*
    Plugin Name: WordPress to BBPost hacked by Ben
    */

    add_action('publish_post', 'bensyncpost', 999 );

    /* CORE */
    function load_bb() {
    global $bb, $bbdb, $bb_current_user, $page, $bb_cache,
    $posts, $bb_post, $post_id, $topics, $topic, $topic_id,
    $forums, $forum, $forum_id, $tags, $tag, $tag_name, $user, $user_id, $view,
    $del_class, $bb_alt;
    }

    function bensyncpost( $post_id ) {
    global $bbdb, $wpdb, $current_user;

    $post = wp_get_single_post( $post_id );

    if( !load_bb() )
    return false;

    bb_set_current_user( $current_user->ID );

    $post_title = $bbdb->escape( $post->post_title );
    $post_text = benprepposttext( $post->post_content, get_post_meta( $post_id ) );

    if( !$link_exists ) {
    bennewtopic( $post_id, $post_title, $post_text );
    }
    }

    function bennewtopic( $post_id, $post_title, $post_text ) {

    $topic_id = bb_new_topic( $post_title, 2, $tags );
    $reply_id = bb_new_post( $topic_id, $post_text );

    /* if( $topic_id && $reply_id ) {
    felmetalink( $post_id, $topic_id );
    $r = true;
    }*/

    return $r;
    }

    function benprepposttext( $post_text) {

    remove_filter('pre_post', 'encode_bad');
    remove_filter('pre_post', 'bb_encode_bad');
    remove_filter('pre_post', 'bb_filter_kses', 50 );
    remove_filter('pre_post', 'allow_images_encode_bad', 9 );
    remove_filter('pre_post', 'allow_images', 52 );

    return $post_text;
    }

    ?>

    I got rid of the error, but it’s not propogating to the correct forum(I used the forum ID of 2 and I also tried just plain old “Site Posts” as the forum) need to debug some more, fel do you recognise anything plainly wrong with my hacked up code?

    #3869
    ramym
    Member

    Hello,

    I just managed uploading and installing BBPress in a subdirectory of WordPress. Everything works just fine, and when you sign up on WordPress, you will also be able to log in with that account on BBPress, but there’s one problem:

    When you log in on WordPress, and you go to BBPress, you have to log in again. So, members have to sign in 2 times, on the same account, one time for WordPress and one time on BBPress.

    I’m running WordPress 2.6. In wp-config.php there was no SECRET_KEY. There was an AUTH_KEY and a SECURE_AUTH_KEY, but there was a BB_SECRET_KEY in bb-config.php. So, what should I do in wp-config.php?

    I tried to define SECRET_KEY myself, but that didn’t work. The ‘code’ in SECRET_KEY in wp-config.php is the same as BB_SECRET_KEY in bb-config.php, but it still doesn’t work.

    I hope it’s a little clear what my problem is.

    Thanks,

    Ramy

    #66929
    fel64
    Member

    Is there a problem with your wordpress install too?

    To fix bbpress, you need phpmyadmin or a similar tool. Login, go to your bbpress database. Not certain what it’s like on 0.9, but you probably need to go to the bb_topicmeta table and perform a search (or browse through) to find a record where the meta_key is wp_table_prefix. Try deleting that record. Without that setting I think bb would look for its own users again.

Viewing 25 results - 27,001 through 27,025 (of 32,467 total)
Skip to toolbar