Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 30,501 through 30,525 (of 32,432 total)
  • Author
    Search Results
  • #56437
    fel64
    Member

    You should install the bbpress-fix plugin, then change the field to 0 (no quotes) and save. This will hopefully fix things. The plugin only prevents you being marked as bozo, but it won’t unmark you (which is why you have to do that yourself).

    Don’t reinstall yet. :)

    Sam Bauers
    Participant

    By default, the alphanumeric code is an md5 hash of the bb_table_prefix that is set in config.php

    For default installs this effectively makes the cookie names:

    'bb_user_' . md5('bb_')

    'bb_pass_' . md5('bb_')

    You can override the name of the cookie by setting values for the following somewhere in config.php:

    $bb->usercookie = 'my_great_user_cookie_name'

    $bb->passcookie = 'my_great_pass_cookie_name'

    Then provided that your website is in the same domain as your forum, you should have no trouble reading these cookies using your own code.

    #56435
    Nola1974
    Participant

    Ok, i uploaded and overwrote all of my files with a fresh archive and I’m still getting the same behavior. This makes me think it’s something that’s already in the database…

    fel64: Well, after I removed the fix-bbpress.php I have “1” in the Bozo field for all of my accounts, INCLUDING the quotes. Should I change these to 0’s or delete the “1” before I install the fix?

    Also, I dont know much about .htaccess.. that’s pretty much the standard wpmu file.

    What does this line mean:

    Topic titled test post started by bb_get_user needs a numeric ID

    That stands out to me as if something is fubared in my database. But wpmu is working just dandy. Some sort of integration problem?

    #56433
    fel64
    Member

    Sounds like a bozo problem…? Open the profile of the troubled account, go to the “Edit” page, and see if there’s a 1 in the bozo field. If there is, you need the fix-bbPress plugin. https://bbpress.org/forums/topic/822?replies=10

    I might have the wrong end of the stick entirely though.

    By the way, Nola, any chance you could help me with some .htaccess code? I’ve been having trouble making it work with WP and got no help on their forums.

    #56404

    In reply to: Freshness Linked

    fel64
    Member

    The only thing better than that is a “go to first new reply” link. :)

    Out of the corner of my eye I thought I saw some code for “views” in a thread, in the 1.0-alpha version. There’s a chance it’ll be in 1.5 maybe? :)

    There’s also my “has a new reply” plugin: https://bbpress.org/plugins/topic/45?replies=5

    #56403

    In reply to: Freshness Linked

    citizenkeith
    Participant

    I’ve been out-geeked! :(

    wittmania
    Member

    I may be reading into his post, but it sounds like he wants a list of people that are currently online (?).

    If so, Thomas Klaiber’s Simple Onlinelist plugin gives you a template tag (<?php show_online_users(); ?>) that you can drop in anywhere to generate a simple list showing users currently online.

    You could modify the plugin to display some kind of message, an image, part of their profile. Anything you want to keep cold, Tommy Boy.

    #56402

    In reply to: Freshness Linked

    wittmania
    Member

    I noticed a typo in your code. I think you meant `<C. Montgomery Burns>Excellent</C. Montgomery Burns>.

    Just kidding.

    #56401

    In reply to: Freshness Linked

    citizenkeith
    Participant

    <Montgomery Burns>Excellent</Montgomery Burns>

    Thanks! That’ll do the trick.

    The only thing better than that is a “go to first new reply” link. :)

    #56431
    Nola1974
    Participant

    Does anyone have any ideas? I’m tearing my hair out here. I was able to create a new user and it appeared in wpmu. It was able to post just fine, the post apears and everything. If I log back in as admin, I cant delete his posts. On front-page.php the admin’s name appears, but when in dashboard it sill comes up as bb_get_user needs a numeric ID

    When in the admin account, I promoted the new user to Key Master.. when i log out of the admin account I get the following error:

    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 'LIMIT 1' at line 1]
    SELECT * FROM bb_online WHERE user_id = LIMIT 1

    The new account, which i made Key Master is also unable to delete any posts – but can post new ones.

    The new account cannot see the posts the admin account made, that were showing up in yellow.

    Anyone reading this? :)

    /.htaccess

    RewriteEngine On
    RewriteBase /

    # www is soooo deprecated
    RewriteCond %{HTTP_HOST} ^www.blognola.org$ [NC]
    RewriteRule ^(.*)$ http://blognola.org/$1 [R=301,L]

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]

    /forums/config.php

    <?php
    require_once('/home/nolageek/public_html/wp-blog-header.php');
    // ** MySQL settings ** //
    define('BBDB_NAME', '
    '); // The name of the database
    define('BBDB_USER', '
    '); // Your MySQL username
    define('BBDB_PASSWORD', '
    '); // ...and password
    define('BBDB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // Change the prefix if you want to have multiple forums in a single database.
    $bb_table_prefix = 'bb_'; // Only letters, numbers and underscores please!

    $bb->domain = 'http://blognola.org'; // Example:
    $bb->path = '/forums/';

    //bb->mod_rewrite = true;

    // What are you going to call me?
    $bb->name = 'BLOG NOLA forums';

    // This must be set before running the install script.
    $bb->admin_email = 'nolageek@gmail.com';

    // Set to true if you want pretty permalinks.
    $bb->mod_rewrite = true;

    // The number of topics that show on each page.
    $bb->page_topics = 30;

    // A user can edit a post for this many minutes after submitting.
    $bb->edit_lock = 60;

    // Your timezone offset. Example: -7 for Pacific Daylight Time.
    $bb->gmt_offset = -6;

    $bb->cookiepath = '/';
    $bb->usercookie = 'wordpressuser';
    $bb->passcookie = 'wordpresspass';

    // 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 BBLANG to 'de'
    // to enable German language support.
    define('BBLANG', '');

    // Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
    // of Akismet's powerful spam blocking, you'll need one. You can get an Akismet key at
    // http://wordpress.com/api-keys/
    $bb->akismet_key = ''; // Example: '0123456789ab'

    // The rest is only useful if you are integrating bbPress with WordPress.
    // If you're not, just leave the rest as it is.

    $bb->wp_table_prefix = 'wp_'; // WordPress table prefix. Example: 'wp_';
    $bb->wp_home = 'http://blognola.org';
    $bb->wp_siteurl = 'http://blognola.org';

    /* Stop editing */

    if ( !defined('BBPATH') )
    define('BBPATH', dirname(__FILE__) . '/' );
    require_once( BBPATH . 'bb-settings.php' );

    ?>

    #56400

    In reply to: Freshness Linked

    fel64
    Member

    Not sure how to do that specifically, however here’s a quick rip of Sam Bauer’s pagination plugin that’ll add a double-forward arrow to the end of each topic name linking to the latest post. Copy it into a text file, save it as something.php and upload.

    <?php
    /*
    Plugin Name: Link to last Post
    Plugin URI:
    Description: Adds page links to topic lists
    Author: fel64
    Version: 0.7
    Author URI: http://www.loinhead.net/
    */

    if (!function_exists('is_tags')) {
    function is_tags()
    {
    return is_tag();
    }
    }

    if (is_front() || is_forum() || is_tags()) {
    add_filter('topic_title', 'fel_addlatestlink', 101);
    }

    function fel_addlatestlink($title)
    {
    global $topic;
    $felgtlpl = get_topic_last_post_link($topic->topic_id);
    $title = $title . ' <a href="' . $felgtlpl . '">&nbsp;&raquo;&nbsp;</a>';

    return $title;
    }
    ?>

    #1678
    Nola1974
    Participant

    I just got finished posting a whole bunch of posts a little while ago. Worked on my theme a bit.. added this to the header, that’s it:

    <?php
    function w3l_tl_pages($before = '', $after = '', $between = ' ') {
    global $wpdb;
    $query = "SELECT ID, post_title FROM $wpdb->posts WHERE (post_type = 'page' AND post_status = 'publish' AND post_parent = 0) ORDER BY menu_order";
    $pages = $wpdb->get_results($query, ARRAY_A);
    $temp_pages = array();
    foreach ($pages as $page) {
    $temp_pages[] = $before . '<a href="' . get_bloginfo('url') . '/' . get_page_uri($page['ID']) . '">' . $page['post_title'] . '</a> ' . $after;
    }
    echo implode($between, $temp_pages);
    }
    ?>

    This is to get the menu of pages from my wordpress.mu install.

    Now, whenever I try to post, after I submit a new topic, it turns yellow and doesn’t not then appear in the discussions list.

    I can’t delete ANY posts. Not even old ones.

    THe new topics appear in the dashboard under “Recently Moderated” and says this:

    Topic titled test post started by bb_get_user needs a numeric ID

    Null
    Member

    Well I know how much time it takes to write a plugin :)

    I do want to request to make this a stand alone plugin and no modification of the private forums plugin, cause I want to merge it with my bbPortal plugin (with your permission ofcourse) and that is done most easily with a stand alone plugin…

    #56373

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Hi,

    I will take a look at the plugin (think after easter) and see if there is a way to implement this. The tab titles are stored in the db, can’t change that, but the title can be replaced with a stringreplace thingy. So technically it could do what you want… Well I’ll try to get that tab in first :D

    edit: seems you’ve got that pm tab working, what did you use to edit it into the table? (saves me time finding it out myself)

    #56388

    In reply to: Syntax questions

    lonemadmax
    Member

    fel64’s assumption is correct. You can see the definition of _e() and __() in bb-includes/l10n.php:

    // Return a translated string.

    function __($text, $domain = 'default') {

    // Echo a translated string.

    function _e($text, $domain = 'default') {

    #56372

    In reply to: Plugin: bbMenu 1.1

    wittmania
    Member

    Null, thanks for the help. Yeah, going into the table isn’t a whole lot of fun, but this isn’t something that would need to be changed very often.

    PM is private messaging, i.e. this plugin:

    https://bbpress.org/plugins/topic/20

    The plugin adds a page (/yourforum/pm.php) that lets you read/write private messages to other users. Because it is a static page, you can define the address in the table.

    What would be really great, though, is a way to make the links dynamic. The PM plugin also comes with a notification function where users can be given an alert when they visit the forum letting them know a new message has arrived. The tab would say something like “Private Messages (1)” or something like that. Unfortunately, since the page addresses are stored in the DB, I can’t really think of a way to do this.

    As far as wanting to see it, you can check my forum here:

    http://www.lne97.com/bbpress/

    I have it locked down so you have to register, which addresses the issue you mentioned above. However, you can log in using:

    user: just a test

    password: justatest (no spaces)

    Thanks again for the plugin!

    #56371

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Well most izi way:

    Wait for the next release, it will have custom tabs adding feature.

    Hard way:

    Using phpmyadmin you can add into the menu table:

    DEFAULT, 'Excample tab', 'inactive', 'pagename.php', 'front-page', 0

    Well ‘front-page’ is more complicated to add it should be changed to something else and added as a plugin (i know this sounds weird), so let it in and see what happens….

    About the pm issue, i am not familair with it what does it do? Can you show me? If it is a page that is added then this is possible INCLUDING that the tab stays active…

    problem that could happen is for non logged in visitors, they will see the tab too

    #1670

    Topic: Syntax questions

    in forum Themes
    wittmania
    Member

    A couple of questions about what syntax to use, especially on template pages:

    1. I see that a lot of people use _e('string...') instead of echo('string...'). Is this just a bbpress/wordpress thing or is this generally acceptable php coding?

    2. In front-page.php of kakumei (and many other places), I see people using this shorthand echo where normal text would work just fine. For instance, in the hottags div, it is:

    <h2><?php _e('Hot Tags'): ?></h2>

    Why would you have PHP echo that when you could just have it as plain ol’ text in the first place? Am I missing something?

    I realize neither of these is of any earth-shaking importance, but I would like to know so I can keep my code modifications in line with the default syntax that is used throughout. Thanks!

    #56368

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Darn that error again, there must be something wrong with that insert part when a table is created.

    Check with phpmyadmin if the table bb_menu is created. If not do so manually (this is not tested, but it contains the stuff needed in the table):

    "CREATE TABLE$bbdb->menu` (

    item_id INT(3) NOT NULL AUTO_INCREMENT,

    item varchar(50) NOT NULL default ”,

    set varchar(50) NOT NULL default ”,

    page varchar(50) NOT NULL default ”,

    location varchar(50) NOT NULL default ”,

    order int(9) NOT NULL default ‘0’,

    PRIMARY KEY (item_id)

    );`

    Then you will have to fill it (again not tested, but it contains what needed):

    "INSERT INTO$bbdb->menu` VALUES

    (DEFAULT, ‘Forums’, ‘active’, ‘index.php’, ‘front-page’, 0),

    (DEFAULT, ‘Search’, ‘active’, ‘search.php’, ‘search-page’, 1),

    (DEFAULT, ‘Statistics’, ‘inactive’, ‘statistics.php’, ‘stats-page’, 0);”`

    When sucesfully created this table, things should work…

    #50832

    In reply to: Avatars

    Trent Adams
    Member

    I use this plugin for MyBlogLog avatars, but looking at the code it seems to be already setup for Gravatars as well! Maybe take a look at it!

    https://bbpress.org/plugins/topic/36?replies=6

    Trent

    #1674
    archasek
    Member

    http://kmr.nazwa.pl/forum/topic.php?id=3&page&replies=1#post-6

    i want to translate headers like this “reply” and

    [Delete entire topic] [Close topic] [Stick topic (to front)]
    Move this topic to the selected forum:

    and

    dodano 2 hour temu

    where can i do this?

    fel64
    Member

    As long as you integrated from the start, no? Are you using the same database for WP and bb? In your config.php, did you add details for these settings:

    bb->wp_table_prefix
    bb->wp_home
    bb->wp_siteurl

    Another way to tell is, did it use your WordPress name for your admin account when you installed?

    #56390
    fel64
    Member

    Might be worth making a trac ticket for it here: https://trac.bbpress.org/ Log in with the details you use here. :)

    #50829

    In reply to: Avatars

    Atsutane
    Member

    U can put that code as a plugin.

    #1667
    davetropeano
    Member

    I recently did my first bbpress install on localhost and it went miserably. I used the latest download from today.

    Checking on this forum I had the same path seperator issues and stylesheet issues others had, etc.

    My $bb->domain and $bb->path were fine. The fresh install just didn’t work properly under xampp and then again a retry on easyPHP.

    This is the solution and findings I found:

    1. The first issue is because in config.php and bb-load.php dirname(__FILE__) is used to get the base path for BBPATH. This is not a good thing on localhost Windows based installs.

    2. There are a number of attempted workarounds to this that I’ve read about in this forum. All of them that I saw didn’t work. Focusing on the issue with the stylesheet href not being correct I noticed that there was logic in the bb_get_active_theme_folder() function.

    By default, the installer does NOT create an option entry ‘bb_active_theme’ in the database table topicmeta. The code logic doesn’t make the correct uri.

    To fix this, do an install and then add a database field bb_active_theme in the topicmeta table.

    For example, I set mine to:

    http://localhost/dev/bbpress/

    Playing regular expression games to change x: and in general is not worth it. This seemed to be simple and worked right out of the box.

Viewing 25 results - 30,501 through 30,525 (of 32,432 total)
Skip to toolbar