Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,726 through 24,750 (of 32,468 total)
  • Author
    Search Results
  • #74919
    arthaseo
    Member

    this sounds great :) thanks John.

    I am installing on a new domain, so i will be installing latest releases.

    I have integrated WP + BBPress in past but for same domain.

    any more suggestions ?

    #74914
    johnhiler
    Member

    Here is some code I use in my header.php, to add a class to an li if you’re inside a particular forum:

    <li <?php if ( $forum->forum_id == 170) {echo 'class="x-chosen"';}?>><a href="/board/announcements">announcements</a>

    Maybe something similar would work for you? Good luck!

    #15073
    raheelsayeed
    Member

    Hi all,

    I’m writing a plugin where all it does is grabs data from Database and shows it in a topic. when topic is clicked ofcourse :)

    I want this plugin to work only if say the forum id is 1,2,3 and this plugin shouldnt show up in other forums or forum catagories. is there any function for this?

    similarly, in Add New form, i want to add some textboxes that should only show up if inside a specific forum

    any ideas are appreciated.

    im using 1.0 rc-3

    #73642
    esemar
    Member

    Does RC3 include any utilities to import data from atom/rss xml documents? Eagerly awaiting such a feature so I can start using it on learnjazzpiano.com :)

    #60882

    Well, OK, this is pretty strange. I’ve added require_once(ABSPATH . 'forums/bb-load.php'); to the bottom of my wp-config.php file, and it all seems to work fine. Except, my admin interface for WordPress has lost all its colors and images. I have run a diff on the two resulting wp-admin interface’s code, and it looks like the act of loading bbPress is taking over the loading of styles at the top of the WordPress admin interface, which doesn’t really make much sense to me. Anybody understand what’s going on here? I’m using bbPress 1.0-rc-3 and WordPress 2.8.

    #15069
    Eisregen1986
    Member

    Hello People,

    I would anticipate in advance for my bad English sorry.

    I have bbPresss 0.9.0.5 and want to upgrade to 1.0-rc-3 make.

    I have read the upgrading instructions.

    If I call the bb-admin/upgrade.php, the following error message appears:

    ERROR: Could not establish a database connection

    If I have a new installation of bbPress 0.9.0.5 and then upgrade it works, just not at the present, what can this be?

    #74506
    Florian
    Member

    Weird… I have one user where only the login name is used, but another one where the display name is shown. I’ll come back to that if I find out what the difference between those two is.

    But in the meantime, another problem arose: How do I access the login name when the display name is shown? :) I need the login name to build the link to the user’s buddypress profile page. Is there a template tag which (always) returns the login name?

    #73890
    timskii
    Member

    First attempt at providing Wowhead item links. Please post any bugs or weirdness. This requires BBPress 1.0 RC 3+ and PHP 5+ . It has no cache, so may not be suited to ultra-high volume forums.

    <?php
    /*
    Plugin Name: Simple Wowhead Item Links
    Plugin Description: Adds item sudo-html to create links to Wowhead.
    Author: Tim Howgego
    Author URI: http://timhowgego.com/
    Version: 0.1.rc
    */

    /*
    Requirements:

    * PHP 5 or above.
    * BBPress 1.0 RC3 or above.

    Install:

    * Copy the file to the "my-plugins" directory.
    * Active the plugin within the Admin interface.

    Customising:

    * Default language is English. For other languages, edit $lang (in bb_wowhead_item_search) below.
    * Default will color items which are uncommon or rarer. To change this edit $commonest_color (in bb_wowhead_item_search) below.

    Using:

    * Users must enter the following "sudo-HTML" code within their posts: <item>Name</item> - where name is the correct name of the item to be linked to.
    * Wowhead is queried each time a new link is posted. Once the link is created, it is stored as a complete link within the post. A cache should not be required given the amount of traffic on most forums.
    * If Wowhead is unavailable (often due to maintenance), or some other error occurs, the link created will simply point to a Wowhead search for the item.

    Thanks Drexle for some ideas.
    */

    function bb_wowhead_item_search( $find ) {

    // Edit Options:
    $lang = 'www'; // Language: www (english), de, fr, es, ru.
    $commonest_color = 2; // Only color item qualities of this number or higher. 0 colors all items. 2 does not color white and grey items. 101 (or "high") colors nothing.
    // Stop Editing

    $f = trim ( $find );
    $s = 'http://'.$lang.'.wowhead.com/?item='.esc_attr( str_replace(' ', '+', strtolower( $f ) ) ).'&xml';
    if ( function_exists("curl_init") ) {
    $ch = curl_init();
    curl_setopt( $ch, CURLOPT_URL, $s );
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
    curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 3 );
    $output = curl_exec( $ch );
    curl_close( $ch );
    } else {
    $h = fopen( $s, "r" );
    while ( !feof( $h ) ) $output .= fread( $h, 8192 );
    fclose( $h );
    }
    if ( $output and function_exists("simplexml_load_string") ) {
    $xml = simplexml_load_string( $output );
    $link = $xml->item->link;
    $name = $xml->item->name;
    if ( $link and $name ) {
    $quality = $xml->item->quality[id];
    $class = ( $quality and ( $quality >= $commonest_color ) ) ? ' class="q'.esc_attr( $quality ).'"' : ' class="nocolor"';
    $result = '<a href="'.esc_attr( $link ).'" title="Wowhead - '.esc_attr( $name ).'."'.$class.'>'.esc_html( $name ).'</a>';
    }
    }
    if ( $result ) return $result;
    else return '<a href="http://'.$lang.'.wowhead.com/?search='.esc_attr( $f ).'" title="Wowhead - '.esc_attr( $f ).'.">'.esc_html( $f ).'</a>';
    }

    function bb_wowhead_item_link( $text ) {
    $text = preg_replace('|(<item>)(.*?)(</item>)|e', "bb_wowhead_item_search('\2')", $text);
    return $text;
    }

    function bb_wowhead_item_tags( $tags ) {
    $tags['item'] = array();
    $tags['a'] = array( 'href' => array(), 'title' => array(), 'class' => array(), 'rel' => array() );
    return $tags;
    }

    function bb_wowhead_item_header() {
    echo '<script language="JavaScript" type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>'."n";
    }

    add_filter( 'bb_allowed_tags', 'bb_wowhead_item_tags' );
    add_filter( 'pre_post', 'bb_wowhead_item_link' );
    add_action( 'bb_head', 'bb_wowhead_item_header' ); // Comment this line out if the Wowhead javascript file already exists in the header

    ?>

    #74894
    infected
    Participant

    Thank you for the link. It looks interesting. But at the moment it seems to be full @ browserlab and they´re temporarly not accepting new users :( I´ll will try it once again later.

    #74890
    infected
    Participant

    @chrishajer: Thank you, that works fine!


    @johnhiler
    : You´re right. If i set the value to -1 i´m always able to edit the posts. But this is something i doesn´t really need.

    Okay, then there´s only one point left, the edit thing… I will have a look at the plugin and will see how it works.

    Although… I got one more point to figure out. It´s a css thing. At the moment this is my testforum: http://www.test.be-infected.de/forum/topic/test-der-bbcode-buttons

    If you take a look at the 2 post with the smilies in it, you can see that there´s a lot of space in this postings. I tried several things to strip this, but can´t find a solution. I think it´s the css class .threadpost that i have to edit. I know it sounds strange, but in this free space the bbsignatures plugin was showing the users signatures before. Could this relate to it?

    Any help is welcome ;-)

    #69733
    jurasiks
    Participant

    bbpress 0.9.0.5 and phpbb 3.0.5 at localhost:

    when i click on “converting users data”

    i have:

    SQL ERROR [ mysqli ]

    Data too long for column ‘user_url’ at row 1 [1406]

    to small? how to fix and convers users data properly?

    updated: fixed!

    ALTER TABLE bb_users CHANGE user_url user_url VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL

    #74889
    johnhiler
    Member

    A minor note: I think that if you set the edit_lock variable to -1, then members can edit their comments forever. It shouldn’t impact your echo of the edit_lock variable, since you’ll probably be setting it to positive numbers. :-) But just thought I’d mention it!

    #74888
    chrishajer
    Participant

    3) You can put this in you template’s post-form.php:

    <p>You will be able to edit this reply for <?php echo bb_get_option('edit_lock'); ?> minutes after posting.</p>

    I believe that will show the number of minutes from your admin setting.

    I think it would be neat to put this next to the edit link of the reply as well, so people see that they have some amount of time they can edit, and when the message is gone, the edit link is gone. You could extend this in a lot of ways. I think the edit_lock option is the one you want though. Even neater would be to show how many minutes left before they can no longer edit their reply…

    I have no idea what happens if you exclude some users from ever locking editing on their replies (like moderators and admins.) Probably just displays the same option even though they have been exempted from the edit_lock restriction.

    #74639

    In reply to: Deep Integration Issue

    Immelody
    Member

    Thanks, john. My error log says a lot and so I’m trying to figure out if it is a plugin that’s culprit or if it’s something much deeper!


    Okay.. Suddenly the error log got like 100x bigger..

    pastebin: http://pastebin.com/m2e9b3dd7 (DNE)

    #74637

    In reply to: Deep Integration Issue

    Immelody
    Member

    [Sun Jun 21 20:04:07 2009] [error] [client 64.183.193.41] Premature end of script headers: /var/chroot/home/content/a/m/a/amaron11/html/bbpress/index.php

    [Sun Jun 21 20:04:12 2009] [error] [client 72.167.232.7] Premature end of script headers: /var/chroot/home/content/a/m/a/amaron11/html/bbpress/index.php

    [Sun Jun 21 20:04:17 2009] [error] [client 72.167.232.7] Premature end of script headers: /var/chroot/home/content/a/m/a/amaron11/html/bbpress/index.php

    #74724
    Tynan Beatty
    Member

    RC3 works flawlessly on integration with WP2.8 on all my sites now. Great work Sam! As for images, I could never use them unless using both allow images and bbcode lite in combination (bbcode buttons helps here). I just tested it with RC3 and that combo still works just fine :)

    peace~

    #73772
    Derek Herman
    Member

    I need to list the tags like in WP where each topic has it’s own tags separated out, that code is not going to do that? Thanks though for the help.

    #74887
    johnhiler
    Member

    1) Glad to hear it!

    2) I don’t know… there’s no guide to template tags at this point. But a Codex with documentation will be started soon, I think. I wonder if studying the plugin might shed some light on potential tags to use…

    3) Hopefully someone else can help ya with this one! :-)

    #74886
    infected
    Participant

    Thanks for your reply, johnhiler!

    1) Thank you, the linked code works fine.

    2) The plugin works but this is more than i need ;-) Is it not possible to place a short text with the last date/time of edit by a template tag? By the way is there anywhere a overview about available template tags?

    3) Yes, i could hardcode it into the template. I don´t know how often i change the value yet. But everytime i change the value i also have to edit the template. So I wanted to avoid it.

    #15062
    infected
    Participant

    Hi!

    I´m new to bbPress and try to create a theme that suites to my wp-theme. It´s based on the blank theme by refueled. At the moment i have 3 little questions:

    1) I´d like to show the amount of db-queries and the duration of loading the page in my footer. In WP i can add this information by adding a code like this <?php echo $wpdb->num_queries; ?> Queries, <?php timer_stop(1); ?> Seconds. Is there something similar in bbPress?

    2) Is there a way to display a text if a post was edited by a user? Something like “this post was last edited on X at X?

    3) The last point: In the backend i can define how long a post is editable. Is it possible to display this value somewhere above the textarea when writing a post? I´d like to add a short notice like “You can edit your post for X minutes after saving it.” The X-value should change if i change it in the backend.

    That´s it for now… :-) I hope someone can help me.

    Thanks in advance!

    infected

    #74722
    the_Wish
    Member

    • No more images… bbpress just eats the code. allow images plugin installed, and activated.

    This, however, is still true. Has anyone else encountered this trouble?

    Trying to determine if it’s a plugin in need of update, or if it’s an error on my part, or an actual issue in RC3

    Yep, I’m having the same issues since RC2, see this topic (starting bottom page 1):

    https://bbpress.org/forums/topic/final-release-candidate-10-rc-2-is-available

    #74635

    In reply to: Deep Integration Issue

    chrishajer
    Participant

    A 500 error is just a syntax error or maybe a function that’s not available to you. Is there any logging you can look at to see what the actual logged error message might be? Maybe something else in the bb-config.php has a syntax error. Can you check the syntax of that file with command line PHP on the server: php5 -l bb-config.php or php -l bb-config.php maybe? (that’s a lowercase L for “lint”)

    There’s no sense posting a modified config file here since checking the actual file is the only thing that matters.

    #74787
    thechrisd
    Member

    Sorry, been busy.

    Yup, with 1.0-rc3 the old-school method works again. Hope it stays for full release :)

    #74718
    dss
    Member

    • bb latest discussions wordpress plugin now reports an error.

    This was not actually true… Seems I only needed to remove the trailing slash on my bbpress URL and voila! It works fine.

    • No more images… bbpress just eats the code. allow images plugin installed, and activated.

    This, however, is still true. Has anyone else encountered this trouble?

    Trying to determine if it’s a plugin in need of update, or if it’s an error on my part, or an actual issue in RC3

    However, it looks like integration actually works (for the very first time ever!)

    This remains true. So happy about that!

    #74717
    dss
    Member

    Just updated to RC3 with WP2.8

    • No more images… bbpress just eats the code. allow images plugin installed, and activated.

    • bb latest discussions wordpress plugin now reports an error.

    However, it looks like integration actually works (for the very first time ever!)

Viewing 25 results - 24,726 through 24,750 (of 32,468 total)
Skip to toolbar