Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,151 through 22,175 (of 32,516 total)
  • Author
    Search Results
  • #84695
    chrishajer
    Participant

    If you’re getting a blank screen, it’s likely a 500 Internal Server Error. If you have access to logs you will be able to resolve this.

    Where did you put that code? It should start at the 2nd line of bb-config.php, right after the opening <?php. If not, use a syntax highlighting editor to see what’s going on with the bb-config.php file.

    #33050
    roamfox
    Member

    I have search the forum and find there is a slolution like this

    put following code in to bb-config.php

    Code:
    require_once(‘path/wp/wp-blog-header.php’);

    that I can call wordpress functions in bbpress template

    but once I add the line to bb-config.php . The homepage of the forum became a blank page. no html , no error hints, just a blank page

    I am sure the path to wp-blog-header.php is correct . I do not know what happend and how to fix .

    The wordpress version is 2.91 and the bbpress is 1.02 .

    Thank you for your help

    #84683
    citizenkeith
    Participant

    Perhaps that’s implicitly done by activating the plugin itself?

    That’s correct. You should be good to go. :)

    #84648

    Hi Neotoxic,

    No i’m afraid you’ll have to figure out your own SQL script for the users. My code isn’t tested or anything, i’m afraid you’ll have to write teh custom code for your own specific solution yourself. the code i’ve posted above just does 95% of the work for you :)

    #82904

    It’s done. We’re good. :)

    #84495

    In reply to: Email to members

    4 topics below your topic is your answer mate :)

    https://bbpress.org/forums/topic/notify-all-forum-users-of-new-topic

    #84530
    kvener
    Member

    Here is a solution I found…

    There is probably a better solution, but this fixes the going back to front page for blocked users…

    Add this code to bb-includes/functions.bb-core.php line 1183

    // If user blocked logout user and clear auth_cookie

    if ( $id = bb_get_current_user_info( ‘id’ ) ) {

    if( bb_get_usermeta( $id, ‘been_blocked’ ) === “1”) {

    bb_logout();

    bb_clear_auth_cookie();

    }

    }

    #84635
    chrishajer
    Participant

    Can you get the phpinfo for your installation and see if there IS a tmp folder?

    Put this into a file called whatever.php, then access it with your browser at http://www.example.com/bbpress/whatever.php

    <?php
    phpinfo();
    ?>

    I think you’re looking for a value called upload_tmp_dir

    If it’s not there someone will need to look at the plugin and see what’s actually needed.

    Please post a link to the plugin you’re using too.

    #84647
    neotoxic
    Member

    kevinjohngallagher – Thank you very much for your help. I understand you caution completely, however given the nature of my community I am sure that this will be appreciated.

    Can you confirm that the following will only select users who are bbpress members and above, and not all users in my WordPress users table.

    $bbdb->users WHERE user_status=0"

    #82701

    In reply to: bbBlog 2.0 (plugin)

    chrishajer
    Participant

    You will always have the code you have right now, which is standalone. The old version will always be available. (I know nothing is forever, but if you want a copy of the standalone version, grab it now to ensure you have it.) It might not keep up with developments, but you’d at least have a version to use. Barring any security problems, I don’t see why you couldn’t just keep using that.

    #84646

    Depending on how many members you are talking about, or how many time you expect a new post to be on the forum, i would definitely be sceptical of something like this. It’s a massive hark back to the old ways of doing things.

    So my suggestions:

    1) When you make a new post, physically email everyone.

    I’m not sure when e-mail became incredibly difficult to do manually.

    2) If you really want to write a plugin it should go something like:

    function notification_new_post($post_id=0) {
    global $bbdb, $bb_table_prefix, $topic_id, $bb_current_user;

    $all_users = $bbdb->get_results("SELECT ID, user_email FROM $bbdb->users WHERE user_status=0");
    foreach ($all_users as $userdata)
    {
    $message = __("There is a new post on: %1$s nReply by: %2$s nText: %3$s nn%4$s ");
    mail( $userdata->user_email, bb_get_option('name') . ': ' . __('Notification'),
    sprintf( $message, get_topic_title($topic_id), get_user_name($bb_current_user->ID), strip_tags(get_post_text($post_id)), get_topic_link($topic_id) ),
    'From: '.bb_get_option('name').' <'.bb_get_option('from_email').'>'
    );
    } //foreach
    }
    add_action('bb_new_post', 'notification_new_post');

    You may need to edit some of that code, but found that by searing for email notification on this website (props to Thomas Klaiber who’s code i quickly edited). Amazing what searching first does :)

    Again Neotoxic, i strongly suggest against this unless you know for sure that everyone’s going to be ok with getting an email everytime. RSS readers on email clients, phones, browsers etc save so much hassle…

    Take Care

    #33010
    #84628

    In reply to: BBPM Translation

    Step 1: open google.com

    Step 2: type in ‘bbpress process translation file “.pot” ‘

    Step 3: click on the first link.

    Step 4: do what it says

    Step 5: ???

    Step 6: Profit :)

    And Jongeren Forum, with all due respect, we answer your questions, and you don’t seem happy. We’re not going to do it all for you, this isn’t our job :)

    Maybe next time follow the advice given and also say THANK YOU to people like Olaf that reply, whether you think it’s “not usefull for me” or not. Manners cost nothing :)

    #61353

    In reply to: get favorites list

    The entire website?

    So it’s going in an infinte loop?

    Please, be less specific, don’t post any code, oooh and don’t include a screenshot. Guessing is a really worth while use of my time :)

    #61352

    In reply to: get favorites list

    56alifar
    Blocked

    Like i said, i got the entire website loading serveral times in my sidebar where i put the code.

    #61351

    In reply to: get favorites list

    What error do you get mate?

    :)

    #84188

    In reply to: Thanks plugin

    bingsterloot
    Member

    @ Paulhawke

    I rest my case :O) works perfectly now. Thanks a lot for your fast updates.

    #61350

    In reply to: get favorites list

    56alifar
    Blocked

    Nope didn’t work, i got the entire website loading serveral times in my sidebar where i put the following code:

    <?php

    $topics = get_user_favorites( $user->ID, true );

    $favorites_total = isset($user->favorites) ? count(explode(',', $user->favorites)) : 0;

    bb_load_template( 'favorites.php', array('favorites_total') );

    ?>

    #77325
    Michael
    Participant

    @Shagalaga – That has already been mentioned in this post.

    @Sam – Nice to see you’re still checking bbPress updates. :)

    #61349

    In reply to: get favorites list

    chrishajer
    Participant

    Was that snippet of code wrapped in <?php tags ?>?

    <?php
    $topics = get_user_favorites( $user->ID, true );
    $favorites_total = isset($user->favorites) ? count(explode(',', $user->favorites)) : 0;
    bb_load_template( 'favorites.php', array('favorites_total') );
    ?>

    #61347

    In reply to: get favorites list

    56alifar
    Blocked

    Sorry, a bit of a PHP Noob, if I insert the following code in my template:

    $topics = get_user_favorites( $user->ID, true );

    $favorites_total = isset($user->favorites) ? count(explode(‘,’, $user->favorites)) : 0;

    bb_load_template( ‘favorites.php’, array(‘favorites_total’) );

    I get an error

    #61346

    In reply to: get favorites list

    Two ways:

    1) It’s an array, so just cycle through it and output the bits you want, this will allow you to style it as you please. If you’re unsure of what it returns use: print_r($topics);

    2) Alternatively, you could just copy all 3 lines from the Favourites.php file:

    $topics = get_user_favorites( $user->ID, true );

    $favorites_total = isset($user->favorites) ? count(explode(‘,’, $user->favorites)) : 0;

    bb_load_template( ‘favorites.php’, array(‘favorites_total’) );

    This will output the favourites in the way you’ve described in your template folder.

    ==========================================

    At the end of the day, BBpress has a number of issues, but if it can already do something, all you really need to do is copy and paste the code :)

    #61344

    In reply to: get favorites list

    Looking in “favourites.php”, right in the root of BBpress (so its not hidden), i found this:

    $topics = get_user_favorites( $user->ID, true );

    I’d use that and output the array, but then again, i’d not have bumped 2 different 2 year old threads, let alone doing it before looking in the file cunningly named Favourites.php ;-)

    #84185

    In reply to: Thanks plugin

    bingsterloot
    Member

    Hi Paulhawke

    Thanks a bundle, it works like a charm :O). I have only one thing left which is very minor.

    Would it be possible to use Ajax when you have voted, so the vote appears right away, instead of having to reload the page before it appears?

    Bingster

    #84591

    In reply to: BBPM Problem

    paulhawke
    Member

    I installed the plugin, deleted the table … then walked through rebuilding the database from what I saw in the code. The following SQL is an export of my bb_bbpm table direct from mySQL. If you run it, you should get PMs back up and running.

    CREATE TABLE IF NOT EXISTS bb_bbpm (

    ID bigint(20) unsigned NOT NULL auto_increment,

    pm_title varchar(100) collate utf8_unicode_ci NOT NULL,

    pm_read tinyint(1) NOT NULL default 0,

    pm_from bigint(20) unsigned NOT NULL,

    pm_to bigint(20) unsigned NOT NULL,

    pm_text text collate utf8_unicode_ci NOT NULL,

    sent_on int(10) NOT NULL,

    del_sender tinyint(1) NOT NULL default 0,

    del_reciever tinyint(1) NOT NULL default 0,

    reply_to bigint(20) unsigned default NULL,

    thread_depth int(10) unsigned NOT NULL default 0,

    pm_thread bigint(20) unsigned NOT NULL,

    PRIMARY KEY (ID),

    KEY pm_to (pm_to,pm_from,reply_to),

    KEY pm_thread (pm_thread)

    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;

Viewing 25 results - 22,151 through 22,175 (of 32,516 total)
Skip to toolbar