Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 25,576 through 25,600 (of 32,468 total)
  • Author
    Search Results
  • #72275
    chrishajer
    Participant

    Remove the second forum link/page.

    Hardcoding the first forum link in your WordPress header.php is fine. Without any styling, that means it will just be a link to your forum page, and inside WordPress, it would NEVER need to be styled as current, because you’ll never be in WordPress when you are in your forum, right?

    How are you getting the WordPress navigation in the forum? That’s where we need to focus on getting the current class on the forum page tab. If you’re including the WordPress navigation by integrating WordPress inside bbPress, then there needs to be a little work done on getting the current class on the forum tab (since you won’t actually ever be on a page called forum for is_page('forum') or is_page('190') to work properly from WordPress.

    #4956
    batesy
    Member

    Hey guys,

    I just installed bbpress at http://www.halifamous.com/staff for writers of a new blog to discuss ideas for the site. I am able to view the main forum page, and get into the admin section. The problem is that I’m getting a blank page any time I try to click through to the test post or into the ‘Introductions’ forum section I created. I also get a blank page when I try to access my user profile.

    I haven’t touched the code. Any idea why this might be happening?

    Thanks,

    Greg

    #4954
    thindery
    Member

    I am using the StudioPress theme and I have fully integrated bbpress into the theme. I think it looks great, and all the pages seem to be working. View at http:.//mipages.net/forum/ The only problem is that the “forum” tab isn’t hilited when viewing the forum. It always does the “home” one instead.

    In my theme I hardcoded the first forum link to http://mipages.net/forum/

    The second forum link is actually to just a page I created in wordpress called “forum”. I thought I could edit the link in phpmyadmin to http://mipages.net/forum/ somehow but I couldn’t seem to figure it out. So the link for the second forum tab is actually just a page, and not the actual forum.

    So basically I just want one of those forum tabs to be hilited when viewing the forums. It doesn’t matter to me how to get it done. Any suggestions by anyone?

    below is my header code for the forum page.

    Code:
    <div id=”nav”>
    <?php function get_the_pa_ges() {
    global $wpdb;
    if ( ! $these_pages = wp_cache_get(‘these_pages’, ‘pages’) ) {
    $these_pages = $wpdb->get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);

    }
    return $these_pages;
    }

    function list_all_pages(){

    $all_pages = get_the_pa_ges ();
    foreach ($all_pages as $thats_all){
    $the_page_id = $thats_all->ID;

    if (is_page($the_page_id)) {
    $addclass = ‘ class=”current_page”‘;
    } else {
    $addclass = ”;
    }
    $output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_all->post_title.'”><span>’.$thats_all->post_title.'</span>‘;
    }

    return $output;
    }
    ?>

      <?php

      if (is_home()) {
      $addclass = ‘ class=”current_page”‘;
      } else {
      $addclass = ”;
      }
      echo “<li” . $addclass . “><span>Home</span>“;

      if (is_page(‘190’) ) {
      $addclass = ‘ class=”current_page”‘;
      } else {
      $addclass = ”;
      }
      echo “<li” . $addclass . “><span>Forum</span>“;

      echo list_all_pages();?>

    <div class=”cleared”></div>
    </div> <!– Closes Nav –>

    I changed the code to use the function is_page() when trying to identify it as a forum because that is what it looked like I needed to use, but I’m still pretty new to wordpress functions. the “190” is the id of the entry in my wp_posts table that contains the guid of http://mipages.net/forum/ (the link itself)

    So I know it is kind of working, because it is grabbing the right url and everything, I just can’t get it to recognize that is is viewing that current page to add the class.

    Help anyone! As soon as I can get this resolved I’d like to publish the modified theme files so other users can easily implement bbpress with their studiopress theme.

    #72181
    johnhiler
    Member

    I just noticed that the unpatched PM plugin is still available in the plugins section, where it’s listed as one of the most popular downloads.

    Is it possible to disable the download for now, until the code is updated with the security patch?

    #72180

    Also: Having it be a plugin means that people who don’t wont those ‘features’ don’t have to disable. It’s the basic idea of bbPress: Simple :)

    #72179
    johnhiler
    Member

    It’s because it is a plugin that we’re all able to patch it without upgrading the entire bbPress install itself!

    I agree that it’d be nice if the top plugins had security audits of some kind. Thank goodness a user reported this and another one fixed it though – that’s exactly how open source communities should work (ideally). Thanks merlin214365 and _ck_!

    I do feel dumb for just installing this plugin without even looking at the code. I’m going to do a personal security audit, and report back if any of the plugins I’m using turn up with security holes. Hopefully we can use this incident to improve the overall security of the most popular bbPress plugins!

    Is there then a way that when a registered bbPress member visits the WordPress area of the site, that WordPress will recognize them as registered bbPress members

    Integrated login will do that. If you only want to use the BB side of things, you can use a ‘Hide Dashboard’ plugin for WP (to … hide things ;) ), and then just never link to the WP profile stuff. I’m doing that and the three smarties who know they can login on the WP side quickly learned: Ain’t nutin’ there.

    As for targeting ads, I suspect you can do that, though it’d be a question for the WP side methinks.

    Hide Dashboard: http://www.kpdesign.net/wp-plugins/wp-hide-dashboard/

    #72262
    masterpo
    Member

    thank you Chris for your reply.

    Now I have try a fresh, clean install.

    Step 1 – Database configuration: I put my data, I don’t edit the advanced settings, I click on “Save configuration database file” and I got this message:

    Step 1 – Database configuration

    !

    Your settings could not be saved to a configuration file. You will need to save the text shown below into a file named bb-config.php in the root directory of your bbPress installation before you can continue.

    So I copy the “Contents for bb-config.php” in a file and i put this one on my site.

    After I follow the instruction:

    “Once you have created the configuration file, you can check for it below”

    I check and i get another time the same error. :(

    What do I do, now? I have not idea! can you give me some further help?

    thank you so much!

    #72260

    All it takes is one borked file :) Glad the reinstall worked!

    #72243
    chrishajer
    Participant

    That’s weird – I never saw that wp(); before. I have no idea what to say in this case.

    What happens if you undo the integration, including whatever you included in the bb-config or wp-config to make them talk to each other? Does the problem go away?

    #72242
    psheld
    Member

    Thanks again Chris for coming back on this thread. I am surprised to read your statement about integration though, as it was this feature of bbpress that made me go for it over other forums! Oh well, may be it’ll come out good in the end.

    Here’s the code for wp-blog-header.php. Line 14 simply says “wp();”.

    <?php

    /**

    * Loads the WordPress environment and template.

    *

    * @package WordPress

    */

    if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

    require_once( dirname(__FILE__) . '/wp-load.php' );

    wp();

    require_once( ABSPATH . WPINC . '/template-loader.php' );

    }

    ?>

    #72174
    _ck_
    Participant

    This is a quick and dirty security fix. Only tested on a basic level.

    This code is for the original, not detective’s mod which I will examine tomorrow unless Detective wants to apply the stuff below himself…

    replace around line 100 the entire function pm_new_message

    from:

    function pm_new_message( $id_receiver, $id_sender, $pmtitle, $message ){
    ...
    }

    to this:

    function pm_new_message( $id_receiver, $id_sender, $pmtitle, $message ){
    global $bbdb, $bb_table_prefix;

    $created_on = bb_current_time('mysql');
    $id_receiver = intval($id_receiver);
    $id_sender = intval($id_sender);

    $pmtitle=substr(strip_tags($pmtitle),0,64);
    remove_filter('pre_post', 'post_regulation');
    $message=substr($message,0,2048);
    $message=force_balance_tags($message);
    $message=apply_filters('pre_post',$message,0,0);
    $message=apply_filters('post_text',$message,0);

    $pmtitle=mysql_real_escape_string($pmtitle);
    $message=mysql_real_escape_string($message);

    $bbdb->query("INSERT INTO ".$bb_table_prefix."privatemessages
    (id_sender, id_receiver, pmtitle, message, created_on)
    VALUES
    ('$id_sender', '$id_receiver', '$pmtitle', '$message','$created_on')");
    }

    This patch should in theory make it virtually completely sanitized (but still not completely validated unfortunately) and has the added bonus that most other plugins that affect posts like bb-smilies, etc. should work inside PM’s

    #72150

    In reply to: Beginnings …

    chrishajer
    Participant

    You mean the size of the font, not the width of the box? I think you want to find this section in your stylesheet and experiment with some different values for line-height and font-size:

    form.login input {

    border: 1px solid #999;

    padding: 2px;

    line-height: 14px;

    font-size: 12px;

    margin: 0;

    }

    #72172
    Detective
    Member

    That’s really sad. I suppose i was too naive when i modded the plugin. In fact, looking at the code now, it really screams “hack me”. There are almost no validations in some critical operations.

    #72258

    What version of bb?

    What plugins?

    The RSS should be a part of the core code, so unless you installed something to bugger it…

    #72252
    chrishajer
    Participant

    I think you change it right in statistics.php, don’t you?

    $bb->static_title = __('Statistics') . ' &laquo;';

    It should probably be done with a plugin, but this is where that character is set.

    najkiie1
    Member

    Alright. Thanks a lot for your help :) I started working on it yesterday, it might actually work.

    And on the bbpress forum, i will have the forum categories in the sidebar, and then just a list of all the topics. So i don’t think that’ll be a prob :)

    Oh and i like the way your sidebar works, how it changes all the time. Pretty cool.

    Thanks again :)

    #4942

    Topic: error when logging out

    in forum Themes
    ste1988
    Member

    Hi, im getting this error on bbpress installation when trying to log out.

    Can anyone help a n00b please :()

    bbPress database error: [Table 'theforum_bbpress.bb_online' doesn't exist]
    SELECT * FROM bb_online WHERE user_id = 1 LIMIT 1

    Warning: Cannot modify header information - headers already sent by (output started at /home/theforum/public_html/bb-includes/db-mysql.php:130) in /home/theforum/public_html/bb-includes/pluggable.php on line 232

    #72240
    psheld
    Member

    Thanks Chris. My version of bbpress is the latest stable one at the time of writing: 0.9.0.4.

    Just changed the secret key in both bb-config.php and wp-config.php to a 37 character long string of letters only, and we have success at http://www.atcv.net/bbpress :-). Awesome. Thanks v much.

    But I get the following at my wordpress root http://www.atcv.net:

    Fatal error: Call to undefined function wp() in /home/philipsh/public_html/wp-blog-header.php on line 14

    so perhaps my integration with WordPress remains flawed?

    #72148

    In reply to: Beginnings …

    chrishajer
    Participant

    No, it doesn’t work like that. Well, sort of. You could include inline CSS in the php files and that would overwrite the stylesheet. But in this case, the field is defined as a size of 13, but it’s not via CSS. You should do one or the other.

    If you had a definition in the CSS, like this:

    #user_login {
    width: 100px;
    }
    #password {
    width: 100px;
    }

    That would make those two fields 100px wide, so long as you got rid of the size="13" in the login-form.php. Now, if you put some inline style in the login-form.php, like this:

    <input name="user_login" type="text" id="user_login" style="width: 274px;" ...

    The field would be 274px wide, not 100px wide. That’s just the Cascading nature of stylesheets.

    Without messing with CSS at all, you could just change 13 in your template’s login-form.php to something wider to suit your needs.

    #72237
    psheld
    Member

    Should have added that line 22 is…

    $bb_table_prefix = 'bb_'; // Only letters, numbers and underscores please!

    #72236
    psheld
    Member

    Opened a copy of bb-config.php in dreamweaver for its syntax highlighting capability as you suggested Chris, thanks. All the comments stuff preceded by // is in orange font until this line, number 18…

    define('BB_SECRET_KEY', 'i have changed this here so my secret key isn't made public'); // Change this to a unique phrase.

    The comment in this line of code and all subsequent lines are in red font. But the format of the definition looks good to me. How about you? My actual secret key, as generated by the WP API, has semi-colons FYI.

    #72235
    chrishajer
    Participant

    My guess is you have a config error in your bb-config.php. Loading this page:

    http://www.atcv.net/bbpress/

    Gets me this error:

    Parse error: syntax error, unexpected T_STRING in /home/philipsh/public_html/bbpress/bb-config.php on line 22

    Line 22 is around the database password. Maybe the previous line is not quoted properly or is missing the semi-colon. My guess is that you have an error in that file and if you fix that, things will probably be OK.

    If you have a text editor with syntax highlighting, it will be easy to find the PHP syntax error that is causing this.

    #72169

    Your search is broken. ;)

    If I search for “yaris” it doesn’t find anything, even though the very first topic has Yaris in the title and body.

    Otherwise to be honest, it looks exactly like every other bbPress theme out there. This isn’t meant to discourage you, quite the opposite actually. It’s a good start and it’s awesome to see another person catching the bbPress bug.

    Welcome to the forum and to bbPress and keep it up!

    #4939

    Curious of bbPress will eventually support the idea of tapping into BuddyPress’s site-wide.css file located in the active BuddyPress theme directory?

    I realize this would take a little bit of hard coded style foresight, and it might even be better set as a plugin for bbPress, but I think it would be a nice little added touch.

    Thoughts?

Viewing 25 results - 25,576 through 25,600 (of 32,468 total)
Skip to toolbar