Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,751 through 31,775 (of 32,467 total)
  • Author
    Search Results
  • #52760
    ardentfrost
    Member

    The function topic_resolved() echo’s back whether the topic is resolved, not resolved, or not a support question. You can even change what it echo’s by passing strings to the function.

    Otherwise you want the function get_topic_resolved($id) which will return yes, no, or mu (for it is resolved, it’s not resolved, or it’s not a support question).

    But if you don’t like that method, you can always get it straight from the database… it’s just more work for the server that way.

    #52755
    Trent Adams
    Member

    Not very had to write plugins if you are a coder and look at pluggable.php as it uses a similar structure as WordPress. Right out of the box, bbPress may never work straight away with WP plugins without a core change in code.

    Trent

    #52623
    Null
    Member

    Fixed it myself. It was the: FROM $bbdb->portal" that didn’t work. Changed it into FROM ".$bb_table_prefix."portal" and added $bb_table_prefix; in the global as well and all seems to work fine now.

    Working code:

    $pforum_id = $bbdb->get_var("SELECT pforum_id FROM ".$bb_table_prefix."portal");

    Thx for the suggestions given

    Null

    #52731
    ardentfrost
    Member

    naw, it’s ok. Spencer just gets the weirdest problems with stuff, but I still got it tested ;)

    #49548

    I have successfully setup my site to integrate registrations/logins between wordpress on its own DB and domain (blog.bakedlog.com) and bbpress on its own DB and domain (forum.bakedlog.com).

    Files:

    WP: wp-content/plugins/bbpress-integration.php

    BBP: my-plugins/wordpress-integration.php

    • I can create a user in wordpress and log into bbpress with it.
    • I can create a user in bbpress and log into wordpress with it.(although the default role set for wordpress does not let me write (how do i change this?))

    However, I too cannot get cookies to authenticate between the two systems.

    I have included the following in bbpress’s config.php:

    $bb->cookiedomain = 'bakedlog.com';

    $bb->cookiepath = '/';

    I monitored the cookies created on my computer as I logged into each system, and noticed that bbpress was creating the cookie correctly, domain: bakedlog.com, while when I logged into wordpress it would set the domain on the cookie to blog.bakedlog.com.

    So the problem is with WordPress..

    Looking in WordPress’ wp-settings.php I see:

    if ( !defined('USER_COOKIE') )

    define('USER_COOKIE', 'wordpressuser');

    if ( !defined('PASS_COOKIE') )

    define('PASS_COOKIE', 'wordpresspass');

    if ( !defined('COOKIEPATH') )

    define('COOKIEPATH', $current_site->path );

    if ( !defined('SITECOOKIEPATH') )

    define('SITECOOKIEPATH', $current_site->path );

    if ( !defined('COOKIE_DOMAIN') )

    define('COOKIE_DOMAIN', '.' . $current_site->domain);

    So, in WordPress’ wp-config.php I inserted:

    // BBPRESS INTEGRATION

    define('COOKIE_DOMAIN', 'bakedlog.com');

    Clearing my cookies and logging into WordPress, I see the cookie domain is correct and matches my BBPress’.

    But, there is still another problem, the cookies set by BBPress appends an md5 hash based on the site url and table prefix to the cookie’s name (ie: wordpressuser_bf17f59023eb22f…..) while WordPress’ cookie name is only: wordpressuser

    I looked around in bb-settings.php and found:

    define('BBHASH', $bb->wp_siteurl ? md5($bb->wp_siteurl) : md5($bb_table_prefix) );

    if ( !isset( $bb->usercookie ) )

    $bb->usercookie = ( $bb->wp_table_prefix ? 'wordpressuser_' : 'bb_user_' ) . BBHASH;

    if ( !isset( $bb->passcookie ) )

    $bb->passcookie = ( $bb->wp_table_prefix ? 'wordpresspass_' : 'bb_pass_' ) . BBHASH;

    So, the next step is to define $bb->usercookie and $bb->passcookie in BBPress’ config.php:

    // COOKIE SHARING WITH WORDPRESS

    $bb->cookiedomain = 'bakedlog.com';

    $bb->cookiepath = '/';

    $bb->usercookie = 'wordpressuser';

    $bb->passcookie = 'wordpresspass';

    I cleared my cookies and tested it, VOILA! I can log into either section (bbpress or wordpress) and switch to the other without losing authentication!

    ==========SOLUTION===========

    BBPRESS CONFIG.PHP:

    // COOKIE SHARING WITH WORDPRESS

    $bb->usercookie = 'wordpressuser';

    $bb->passcookie = 'wordpresspass';

    WORDPRESS WP-CONFIG.PHP:

    // COOKIE SHARING WITH BBPRESS

    define('COOKIE_DOMAIN', 'bakedlog.com');

    ==========********===========

    Thats it I believe, let me know if it works for you or if you see anything I have done that could crash either program.

    -BHensley.com

    -Bakedlog.com

    #52752

    In reply to: bb code?

    Trent Adams
    Member

    I would imagine that this will not occur in the core code. This is something that can be added through a plugin (as with image plugin) and will be worked on by members of this community as time progresses. It shouldn’t be too long for something like this to surface, but it will take a little time.

    Trent

    #1132
    Rod
    Member

    one question … I take simply …

    I have several plugin about layout on my WP posts …

    I can for example do this

    [video]url-youtube-video[/video] … and I have a video with all the good code …

    or …

    [name-of-my-link->url-of-my-link] and my link has the good name … The question is … with integration, is it possible, by default, the forum has these possibilities ?

    #51676
    chrishajer
    Participant

    Hi again. It appears the notification includes the name of the member who started the topic, not the last poster? All the notifications I’ve received have listed the member who started the topic.

    I guess “By:” in the notification could mean the thread was started “by” or the reply was “by” – that part is ambiguous. Was this supposed to send the name of the last person who posted?

    Seems like this will send the name of the member who started the topic:

    $topic->topic_poster_name

    Is there a way to see who the last comment was posted by to see if it’s worth logging on to see the comment?

    #1131

    Topic: bb code?

    in forum Plugins
    vaelrith
    Member

    Are there any plans for integrating bb code instead of using the “Allowed markup” in posts? Or is there a way to make a plugin for this?

    #52633
    ardentfrost
    Member

    The thing is, they kinda F with each other. The way they’re implemented is they setup the profile keys seperately (via a filter). I need a way to figure out how to call the profile keys, return them and ADD one to it.

    Anyone know how to do that? S010 maybe? :)

    #52620
    Null
    Member

    Already tried that (forgot to put it here too):

    $pforum_id = $bbdb->get_var("SELECT pforum_id FROM $bbdb->portal");

    But it doesn’t get the 1 out of the db. The query is good cause in phpMA it does return the 1. I get an error using this:

    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 'ORDER BY topic_time DESC LIMIT 0,10' at line 1]

    SELECT * FROM bb_topics WHERE forum_id = ORDER BY topic_time DESC LIMIT 0,10

    As you can see, the 1 isn’t pulled/ used (WHERE forum_id = ?)

    #1126

    Topic: My forum

    in forum Themes
    veb
    Member

    This forum I am creating for a small indie game (www.toribash.com) and SMF just didnt cut it. Way too difficult to change core code, and to me, make new plugins!

    This is a temporary link, seeing I’m not anywhere NEAR finnished. As you can see I am using the emotions plugin, avatar plugin, PM plugin and a few of my own.

    http://veb.bounceme.net/bbpress/

    Comments welcome :)

    #52630
    veb
    Member

    I think combining them would do the job nicely, and even having it so you can have a small image as a signature too :)

    #51675
    chrishajer
    Participant

    I may have downloaded the wrong version. This is from the file notification_all.php

    * Plugin URI: http://www.la-school.com/2006/bbpress-notification/

    * Version: 1.1

    Oops! “notification all” – haha

    I will download the new version now, with the enhancement on the last poster’s name. Thanks a bunch. Merry Christmas.

    #52273
    ardentfrost
    Member

    Anyone who is having trouble with the server please do this:

    -open a command line and type tracert www.rayd.org

    -Copy the resulting text and email it to thansen@qualitytech.com

    -If it starts timing out over and over, just press CTRL-C to stop the process, copy and send it on.

    Due to spammers, sometimes a lot of the countries in the far east get blocked. Sending that tracert text will allow us make sure legitimate users are allowed through the firewalls.

    Thanks!

    #52329
    implicated
    Member

    Your PHP version is rather old, use this:

    if (!function_exists('file_put_contents')) {

    function file_put_contents($filename, $content) {

    if ($fp = fopen($filename, 'w')) {

    $result = fwrite($fp, $content);

    fclose($fp);

    return $result;

    }

    else {

    return false;

    }

    }

    }

    #51673
    chrishajer
    Participant

    Enhancement request: could the notification include the name of the member who made the post?

    So,

    There is a new post on: POSTTITLE

    By: MEMBERNAME

    URL

    #52572
    weirdtherapy
    Member

    I should have made that sooner because it could have caused confusion. The Link in the first posting no longer shows the first template because I changed the template, cause of problems that coud happen with google.

    That’s how the first one looks like:

    http://www.weirdtherapy.com/images/borderline-green-01-shot.jpg

    can some Mod change the link in the first posting pls? :)

    I also added a note at the template that people should keep the policys in mind – I will try to make one that is more policy friendly :)

    #52629
    ardentfrost
    Member

    Alright veb, it’s updated… so make your change ;)

    Although it MIGHT mess you up a little because I think your plugin will have to be added into mine when Avatar is used (open the new bb-avatar.php file and you’ll see why). Plus, with the new release of Avatar, if people do Signature the way you describe, it won’t work.

    I don’t know, what do you think? Maybe we should just combine the two, or have multiple releases. I don’t know how people are going to want to implement.

    #52628
    ardentfrost
    Member

    Glad you used my code as a base :) I will be updating my Avatar code very soon so that functions.php no longer has to be changed. I’ll expect you to update this when I finish ;)

    #52702

    I think this would be an idea for later versions (around 1.0 or so) … very nice idea =)

    #52270
    nekketsu
    Member

    Table creation is automatic. It should install if you navigate to your domain/pm.php or put the message code on your front page.


    Not automatic for me :/

    #52619

    You want to read out the two single vars from the db, am I right?

    So I suggest using $variable = $bbdb->get_var("SELECT...");.

    #52269
    drtech
    Participant

    I also had to hard code message.php for it to work.

    <– “if (wp_knu_)

    $touser = $bbdb->get_row(“SELECT * FROM “.wp_knu_.”users WHERE ID = $toid”);

    else

    $touser = $bbdb->get_row(“SELECT * FROM “.bb_knu_.”users WHERE ID = $toid”);

    pm_user_form( $touser, ” );

    exit;”–>

    #52267
    Trent Adams
    Member

    message.php is the main one. That is where you would hardcode it.

    Trent

Viewing 25 results - 31,751 through 31,775 (of 32,467 total)
Skip to toolbar