Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 25,876 through 25,900 (of 32,516 total)
  • Author
    Search Results
  • #4716
    Andrew
    Member

    I am upgrading an old .83 bbpress installation to Alpha 1.0r6.

    I have about 6k posts in the .83 database.

    After upgrading the database I’ve noticed the following problems. Several of the posts in the database were made by users no longer in the database. If a topic containing posts by these now ‘anonymous’ users is displayed, I get the following error at the top of the screen.

    DB Error in wp_users::append_meta: 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 '32) /* WP_Users::append_meta */' at line 1

    SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1,,32) /* WP_Users::append_meta */

    If I delete the anonymous posts in the thread, the problem goes away. Using PHPAdmin I checked the user ID’s assigned to the posts and there are no users with those user ID’s in wp_users. (I have an integrated installation).

    I thought the problem was a result of an upgrade, so I created a new user, made some posts, and then deleted that user. The problem still exists. I have not tried this on a clean install and it would be useful if someone could try that.

    I am running the default Kak. Blue theme.

    I believe I tracked the problem request to a backpress file.

    bb-includes/backpress/class.wp-users.php:

    if ( $metas = $this->db->get_results("SELECT $meta_field, meta_key, meta_value FROM {$this->db->$meta_table} WHERE $meta_field IN ($ids) /* WP_Users::append_meta */") ) {

    I am not a SQL sleuth but I believe the $ids field is being populated with nulls associated with deleted users.

    #50501

    In reply to: post count – 1

    ganzua
    Member

    The problem with adding a filter is that you lose the function for counting the total amount of posts.

    How can you convert nolageek code into a new function “topic_replies”? ;

    <?php
    function bb_decrement( $value ) {
    return $value-1;
    }
    add_filter( 'get_topic_posts', 'bb_decrement', 1);
    ?>
    <?php
    function bb_decrement_topic( $value ) {
    global $forum;
    return $value;
    }
    function bb_decrement_forum( $value ) {
    global $forum;
    return $value-get_forum_topics();
    }
    add_filter( 'get_topic_posts', 'bb_decrement_topic', 1);
    add_filter( 'get_forum_posts', 'bb_decrement_forum', 1);
    ?>

    #71492

    In reply to: Hot Tags not updating

    chrishajer
    Participant

    Looks like the function bb_tag_heat_map takes some parameters. In your tags.php template file, you will find something like this:

    <?php bb_tag_heat_map( 9, 38, 'pt', 80 ); ?>

    That calls this function:

    function bb_tag_heat_map( $args = '' ) {

    $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 45, 'format' => 'flat' );

    So, the smallest is 9pt, largest is 38pt, UOM is pt (points) and the limit, at least in my template, is to return 80 tags. That much you can control from just calling the function with different parameters. As far as most recent tags, I am uncertain how to do that, but it sounds like it would be a good plugin (not sure if this does what you want: I don’t think so):

    https://bbpress.org/plugins/topic/enhanced-tag-heat-map/

    The information is stored in the database when something is tagged, so I’m pretty sure you could grab the latest N tags by date, DESC and display them as Recent Tags.

    #71490

    In reply to: Hot Tags not updating

    chrishajer
    Participant

    I just added the tag “futurama” to the following 4 topics:

    http://geek.thinkunique.org/bb/topic/womanizer-cover-by-the-all-american-rejects
    http://geek.thinkunique.org/bb/topic/cowboy-mouth
    http://geek.thinkunique.org/bb/topic/new-releases-on-dvd-and-blu-ray-december-30-2008
    http://geek.thinkunique.org/bb/topic/amazon-quick-linker

    I took a look at the hottags div before and after. There were lots of changes, due to the increase in the use of the futurama tag, but here is the futurama tag information:

    Before:

    <a href='http://geek.thinkunique.org/bb/tags/futurama' title='1 topics' rel='tag' style='font-size: 8pt;'>Futurama</a>

    After:

    <a href='http://geek.thinkunique.org/bb/tags/futurama' title='5 topics' rel='tag' style='font-size: 14.2222222222pt;'>Futurama</a>

    So, the hot tags are updating. What makes you think they’re not?

    #71479
    chrishajer
    Participant

    I knew this was going to be a good discussion :-)

    #71415

    In reply to: No Setting Screen

    karlheinz
    Member

    The Problem ist the IE 6. The Menu is outside the Window. In Opera and Firefox it is ok. :-)

    yokima
    Member

    Hello,

    I would like to have bbPress in two languages, using the same forum DB. So when viewing in language 1, the forum’s interface would be in language 1 with all the postings listed, and in language 2, the interface would be in language 2 with the same postings listed.

    I plan on achieving this with bbPress theme switcher ( http://bbpress.org/plugins/topic/bbpress-theme-switcher/ ) and the link to switch between the themes/languages would be /bbpress/?bbtheme=lang1 and /bbpress/?bbtheme=lang2

    I would also like to set up a php page at the root of the web domain to auto-detect and forward to the appropriate mediawiki language page based on

    1) user’s browser language preferences if this is a first time visit

    2) last connection’s languages preferences, which would be saved in the form of bbPress’s theme preference cookie.

    with a file structure of

    /blog

    /blog/bbpress

    /blog/wiki

    /langdetect.php

    My code so far is:

    ?php

    /* langdetect.php */

    $defaultlang = ‘en’

    $lang = $defaultlang;

    /* bbPress theme cookie detection */

    if cookie exists {

    (read cookie and set $lang to either en or ko.. bla bla)

    }

    /* WordPress and/or MediaWiki last visit language detection */

    elseif previous visit info exists {

    (i’ll figure this out later)

    }

    /* detect in-browser lang pref … modified from http://kaldung.com/en/php_detectbrowserlanguage.html */

    else {

    $langlist = explode(‘,’, $_SERVER);

    foreach($langlist as $curLang) {

    $curLang = explode(‘;’, $curLang);

    /* use regular expression for language detection */

    if (preg_match(‘/(ko|en)-?.*/’, $curLang[0], $reg)) {

    $lang = $reg[1];

    break;

    }

    }

    }

    /* redirect */

    if ( $lang==’ko’ ) { header( ‘Location: http://ENGLISHPAGE&#8217; ) ; }

    else { header( ‘Location: http://ENGLISHPAGE&#8217; ) ; }

    ?>

    How can I read the bbPress cookie that contains the Theme Switcher theme preference?

    #71476

    chris, add that code to your functions.php in your theme folder. No plugins needed.

    #71474
    ganzua
    Member

    You can create a function to remove wanna and add something new. This is an example that Ipstenu provided in another thread;

    // This sets closed lable to read as 'read only' instead of 'closed'
    remove_filter('bb_topic_labels', 'bb_closed_label');
    function my_closed_label( $label ) {
    global $topic;
    if ( '0' === $topic->topic_open )
    return sprintf(__('[Read Only] %s'), $label);
    return $label;
    }
    add_filter('bb_topic_labels', 'my_closed_label');

    1 You find the function where “wanna” is.

    2 Next, you copy/paste the function between remove/add filter lines of the code above.

    3 Modify the copy-pasted function; change “wanna” for “want to”

    4 Then, rename that function with a new name, ie “no_wanna”

    5 Change accordingly the remove/add lines

    6 Finally, place the whole code in a plugin or a functions.php in the template folder.

    Another option is probably using a language file but I don’t know if you can set an english-english file.

    chrishajer
    Participant

    There are a couple place where bbPress uses the word “wanna” as in “are you sure you wanna do that”. I’d like to change that to something more professional, like “want to” but I don’t want to change the core. How can I accomplish that with a plugin?

    Using bbPress Alpha trunk (but this “wanna” wording has existed for a long time, maybe back to 0.73). The word wanna can be found in these files:

    ./bb-includes/js/topic.js
    ./bb-includes/functions.bb-script-loader.php
    ./bb-includes/functions.bb-script-loader.php
    ./bb-includes/functions.bb-template.php
    ./bb-includes/functions.bb-template.php

    Thank you.

    #71386
    eclipsenow
    Member

    Anyone know if Lynda.com is about to do the latest WordPress, (let alone bbpress?) They covered using WordPress.com 2.6, but not 2.7 yet, and have about 3 courses on Joomla.

    I’m there to learn Adobe CS4, and have ambitions of learning Dreamweaver, Photoshop, Indesign, etc and delusions of grandeur that I might one day understand my mac almost as well as my wife. (Who’s a VERY professional graphic designer, but a web-illiterate like I currently am). So I paid up for a year at Lynda.com (and will claim that on tax), and sat through 10 hours of CSS training and 3 hours of XHTML and am now starting on Dreamweaver. All this slowed down by Christmas, kids home for 6 weeks in the Australian summer break, and my messing about with Joomla! (There are some things I like about Joomla, but some bad experiences with trying to modify their templates left me a bit blech…. as well! :)

    Yet I hear there is a state of the art Dreamweaver integration pack for $60 that will let me style up WordPress themes in DW! Woah! That almost won me over and gave me delusions of grandeur about one day donating a few state-of-the-art templates to the WordPress world as advertising for my own WordPress theme’s business.

    And then the kids came in demanding ice-cream, and reality slapped me across my fantasising, drooling, delusional face.

    So… in this vulnerable state of mind, I need a hug. ;-) Cult like it is, this “choosing software before you know software” business and frame of mind!

    As a bit of an activist with other causes (and having had a little exposure to marketing, not a lot but enough) can I just comment that I think it would be better “press” if bbpress had some more features turned on in this forum? I personally really rely on email notification that someone has replied to a forum, and only check my RSS about once a day. (It’s all inconvenient). Instead of just clicking “Send post” I have to then click RSS, and then click Google Reader when that comes up, and then remember to check my RSS. I think the vast majority of bulletin board users like email notification of a reply. Is there a reason bbpress decided not to showcase some of their best plug-ins on their leading forum?

    Anyway, so tired I’m nearly hallucinating. Night night, and no offence meant by any of the above.

    #69496

    Not yet they haven’t. Be nice, but I still keep a backup of my site on a separate DB so I can play with things like ThemeHybrid ;)

    #69525

    In reply to: Change Post Author?

    I think I may try to tackle this plugin when I have more time, because I find myself wanting it more and more.

    I guess I come from the old school, where a webpage is basically just a snazzy interface for a database, so the interface should allow for any kind of manipulation of the database that you’d need, and only stop you from doing something silly. :)

    #71385

    The title of this post made me chuckle, so I had to chime in.

    If worse really comes to worse, I am willing to assist on a more personal level. I can’t ethically advertise myself or my services here, but if you can google your way into contacting me outside of bbPress.org, I’d do my best to help you.

    …And Joomla, blech… :)

    #71366
    chrishajer
    Participant

    Just edit the link in header.php in your template folder to point it to your WordPress home page, rather than the bbPress home page.

    So instead of this:

    <a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a>

    You would have something like this:

    <a href="http://www.example.com/home/">WordPress Home</a>

    #71422
    chrishajer
    Participant

    When you say “copy” do you mean “have the wordpress sidebar in bbPress” so it will be dynamic, just like it is in WordPress? Or, will you just copy and paste the code for a static sidebar into bbPress and it will never change?

    If you want the former, you need integration, and you need to include WordPress inside bbPress so you have access to WordPress functions, like get_sidebar();.

    If you want the latter, you just need to modify your template files to include the sidebar where you want it, and then modify the CSS to allow the space to exist in your forum.

    #71388
    chrishajer
    Participant

    Did you try any of the WordPress-style tricks?

    <?php $topics = get_latest_topics('exclude=3' ); ?>
    <?php $topics = get_latest_topics( -3 ); ?>

    #65375
    tinkerer
    Member

    Hi,

    chrishajer ist right, the wp-blog-header is required in order to make it work.

    But apparently this is still not enough; you’ll need to make sure bbpress accesses the event calendar’s CSS files as well; furthermore the events list from this plugin is designed in a way that it will display the details of an event by making use of javascript; this, however, fails. I couldn’t get this to work yet. So in my bbpress people see that there is an event on a certain day, but cant click on it.

    Any ideas how to fix that?

    Also I’d like to know whether there is a way of accessing the plugin via the bbpress dashboard instead/in addition to the wordpress dashboard. Or, skipping the bbpress dashboard altogether and have one dashboard for WP and bbpress. :-)

    #68238
    vertus
    Member

    I’m not a php-programmer… Where I can add the code from topic starter to make it work?

    #71383
    eclipsenow
    Member

    Thanks, that’s a really useful post.

    Almost won over. ;-)

    However, that installation + configuration video did freak me out a bit. I remember something about copying over cookies looked quite intimidating? How do I store the WP cookies the way the install video did, that didn’t seem clear?

    Also, what’s your favourite theme been? I note that this thread alternates between grey and white, and that’s nice, but what happens when people just want it to be one colour and have quotes in some other colour? (So you can automatically tell, phpbb3 style, that someone is quoting someone else and replying to them specifically.)

    mousenator
    Member

    Just wanted to thank you for this post, you’re a genius :)

    #71382
    Malice
    Member

    Sound interesting eclipsenow :)

    You can backup bbpress using a wordpress backup tool. If integrated, bbpress and wordpress use the same databases anyway. The plugin I use sends a backup of the whole blog & forum to my mail every week, day, month or whatever you want).

    I use this plugin: http://www.blogtrafficexchange.com/wordpress-backup/

    Though this seems the most popular: https://wordpress.org/extend/plugins/wp-db-backup/

    If you customize your template you should manually take a backup of that template as well, though. It’s just one folder you should get from your webserver whenever you change the template. If you don’t change the template (which I think is probably the case for you), then backing up your template folder is not of your concern yet.

    More info & alternatives:

    https://codex.wordpress.org/WordPress_Backups

    (I’m sure the experts in this forum can tell you a lot more about general backup through cpanel and such. I’m just a guy learning through tutorials & trial and error just like you:p )

    #71380
    eclipsenow
    Member

    Hi all,

    thanks for your comments, some of you have had a lot of experience at this!

    My site is probably more about the forum, but with blog/website article functionality leading to discussion in the forums. It’s a political reform agenda, with Phd level people recommending that we abolish the States in Australia and have a unified National legislation parliament with far more efficiency and streamlined structures than the mess we now have, and a strong Constitutionally recognised Local government responsible for the local implementation and management of the currently state run (and failing) public services (health care, etc). Sound controversial? YOU BET, so that’s why the BLOG comments will be “off” but the forum has to be absolutely state of the art, to handle all the quite long and technical posting.

    So… while WP might have state of the art blogging, I’m really looking for forum functionality.

    Also, as this topic is on databases, has anyone used Brinkster? I suck at even normal Cpanel phpmyadmin stuff, let alone Brinkster… they seem to want people to hand code stuff in php.

    I don’t have to know php if I’m going to use bbpress do I?

    Lastly, why doesn’t this forum have email replies turned on?

    #71270

    Okay, the fix (one file) did not work. What did work was re-uploading everything from the latest trunk build.

    Leaving the stuff below to show I recognize I’m a tard

    Sam, it’s really NOT fixed.

    On a BRAND NEW post I get this

    <a href="http://thisis.my/link"">This is my link</a>

    TWO quotes at the end. TWO. Not one. And I can’t edit ’em or they break worse. They ONLY work if I leave out quotes.

    #4700
    Ryan Hellyer
    Participant

    Hi,

    I’m trying to setup a demo forum of bbPress (Version 1.0-alpha-6 ) to allow users to create their own bbPress themes. The template generator itself is powered by WordPress, and bar the occasional bug seems to work fine. The bbPress themes it exports seem to be working okay too bar a few code gremlins which I intend to iron out once I get the system up and running.

    What should happen, is that you should be able to go to the following URL, make as many modifications as you want, click submit and bam! a new design for your bbPress forum should be shown. However for some reason, whenever the bbPress forum loads it kills the session variables which store all of the data relating to the current design :(

    http://pixopoint.com/demo/bbpress/?generator=on

    When you go back to the WordPress version (http://pixopoint.com/?generator=on) the original design is gone and it reverts back to the default :(

    Any ideas?

    As a temporary measure I plan to create a WordPress Page with the same HTML as would be in the bbPress forum so that users can see their design as they’re modifying it. But it would make a lot more sense if they could modify it within a real live bbPress forum.

Viewing 25 results - 25,876 through 25,900 (of 32,516 total)
Skip to toolbar