Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,876 through 22,900 (of 32,468 total)
  • Author
    Search Results
  • #81271
    tdh11
    Member

    @circuit: i’ve looked at your website, and im genuinely impressed. the latest forum posts on the right hand side are visable on your wordpress pages. Was this achieved by calling bbpress header after wp header? Im wondering if this is an option as I have read some now about it being doable. It seems the code you have included brings in the latest posts in your forum, correct? My aim is to bring in latest posts in a specific forum on my catagory pages, with each forum included different dependent on catagory.

    Does anyone know if what Im trying to do is possible with this software? Im going to be trying to do this with the header method for the next few days, so anyone who has some info on the subject would be a god send. I have a few threads from this forum that I’ve got saved, but they are very dated.

    #81269
    circuit
    Member

    there are a LOT of threads about this on the forum already. so much so that it’s becoming hard to find threads about anything else ;)

    search the site (i recommend the ‘search google’ option) for ‘integration’ or ‘wordpress’.

    what you want is possible but not without a considerable amount of time and some intricate theme modification.

    you can see my wordpress(MU) + bbpress + buddypress install here:

    http://www.copsandrobbers.net

    the forum is actually entirely separate, apart from the wp_users table. what you are seeing is a shared header graphic and cloned stylesheet. that is probably what you need to do.

    #81048

    In reply to: Help out with bbPress

    deadlyhifi
    Participant

    Hi Matt,

    I’ve been running a large bbP community for 11 months now, so I’ve come to know what users expect and the kinds of limitations we’ve had to overcome (or not). My skills lie mostly in user experience and CSS coding, but I’m also getting quite proficient in PHP. I’d be more than willing to help in any of these areas. With PHP some of the lighter side of things would be desirable.

    I’d also love to help out with the codex, answer questions here, and moderate.

    A great person to have on board would be CK ( https://bbpress.org/forums/profile/_ck_ ). She seems to have disappeared off the radar of late, but she wrote many plugin (for 0.9), offered much advice, and stated she’d be updating plugins for 1.0 from December onwards.

    #81046

    In reply to: Help out with bbPress

    Hey Matt!

    Without too much detail, I’ve been neck deep in theme development, bug patching, code re-factoring and clean-up since the Windows 3.11 and Visual Basic 3.0 days. I’ve been interested in making bbPress be better integrated with WordPress for probably a year or so now? I was a long time phpBB2.0 junkie, and moved to WordPress because I was frustrated at how forcibly linear typical forum software is. When I fell in love with the WordPress way, I quickly found bbPress, and expected it to include all of the features that BuddyPress now does, hence my shift in that direction.

    I’d like to help restyle bbpress.org, maybe bring it a little more in line with the other Automattic websites. There’s no doubt that bbPress needs some TLC in the codex and source-code documentation areas too, and I have recent experience absorbing the WP Code Standards from working under Andy with BuddyPress.

    Right now my focus is 100% BuddyPress, but since you asked… I’d love to be more involved in all of the WP projects and communities if there’s opportunity. ;)

    #80849

    In reply to: Future of bbPress

    Justin Tadlock
    Participant

    One could run a filter function on bb_template to check for templates in both the parent and child themes.

    Or, the user could set it in bb-config.php:

    define( BB_DEFAULT_THEME_DIR, 'path/to/default/theme/directory' );

    I don’t really like either of those two options. Your average user gets confused enough as it is. Trying to tell them to input PHP code can cause headaches sometimes.

    As far as I know, there’s no way to filter the default theme directory either. I’m open to ideas though. If anyone could offer a solution with a few lines of code, I’ll be happy to give it a whirl.

    Ideally, the constant BB_DEFAULT_THEME_DIR would be based off the theme’s Template line in style.css. Or, bb_get_default_template() would recognize the Template line.

    #81265
    hatter
    Member

    You can use the bbPress-Wordpress Syncronization plugin for this, found at http://bobrik.name/code/wordpress/wordpress-bbpress-syncronization/. We are currently running bbPress 1.0.2 and WordPress 2.8.5 and have no issues.

    #81243

    In reply to: PHP Warning: parse_url

    hatter
    Member

    I pasted the code with an error in it. Use this function instead:

    function bb_get_path( $level = 1, $base = false, $request = false ) {

    if ( !$request )

    $request = $_SERVER;

    if ( is_string($request) )

    {

    // parse_url throws a warning for a url that has http:// as a query parameter and doesn’t start with http://

    $pos = strpos($request, “http://”);

    // Check if we found http:// in the string and it’s not at the beginning, and the url starts with a forward slash

    if ($pos !== false && $pos > 0 && substr($request,0,1) == “/”)

    {

    // We got here, so it’s not at the beginning and is in the url. Add in the domain to the beginning

    $oldRequest = $request; // Use a new variable since some PHP versions don’t like re-assigning

    $request = “http://”.$_SERVER[“HTTP_HOST”].$oldRequest;

    }

    $request = parse_url($request);

    }

    if ( !is_array($request) || !isset($request) )

    return ”;

    $path = rtrim($request, ” tnrx0B/”);

    if ( !$base )

    $base = rtrim(bb_get_option(‘path’), ” tnrx0B/”);

    $path = preg_replace(‘|’ . preg_quote($base, ‘|’) . ‘/?|’,”,$path,1);

    if ( !$path )

    return ”;

    if ( strpos($path, ‘/’) === false )

    return ”;

    $url = explode(‘/’,$path);

    if ( !isset($url[$level]) )

    return ”;

    return urldecode($url[$level]);

    }

    #32258
    hatter
    Member

    In the php_errorlog, there is a common warning, “PHP Warning: parse_url(…..”. This warning is caused within the bb_get_path function in bb-includes/functions.bb-core.php. The common cause of this issue is due to urls being passed to this function in the following format:

    /bb-login.php?re=http://example.com/tags.php?tag=sometag

    Due to the http:// within the query string, parse_url will fail and log an error. The way to get around this is to pre-pend the website address and http:// to the beginning of the url, such as:

    http://example.com/bb-login.php?re=http://example.com/tags.php?tag=sometag

    This format is valid with the parse_url function. To change your code to use this format, change the bb_get_path function in bb-includes/functions.bb-core.php to the following:

    function bb_get_path( $level = 1, $base = false, $request = false ) {

    if ( !$request )

    $request = $_SERVER;

    if ( is_string($request) )

    {

    // parse_url throws a warning for a url that has http:// as a query parameter and doesn’t start with http://

    $pos = strpos($url, “http://”);

    // Check if we found http:// in the string and it’s not at the beginning, and the url starts with a forward slash

    if ($pos !== false && $pos > 0 && substr($request,0,1) == “/”)

    {

    // We got here, so it’s not at the beginning and is in the url. Add in the domain to the beginning

    $oldRequest = $request; // Use a new variable since some PHP versions don’t like re-assigning

    $request = “http://”.$_SERVER[“HTTP_HOST”].$oldRequest;

    }

    $request = parse_url($request);

    }

    if ( !is_array($request) || !isset($request) )

    return ”;

    $path = rtrim($request, ” tnrx0B/”);

    if ( !$base )

    $base = rtrim(bb_get_option(‘path’), ” tnrx0B/”);

    $path = preg_replace(‘|’ . preg_quote($base, ‘|’) . ‘/?|’,”,$path,1);

    if ( !$path )

    return ”;

    if ( strpos($path, ‘/’) === false )

    return ”;

    $url = explode(‘/’,$path);

    if ( !isset($url[$level]) )

    return ”;

    return urldecode($url[$level]);

    }

    Doing this will get rid of the common error in your error log, and prevent site issues.

    Note: This will need to be changed if your site is using SSL, such as https://

    #81238

    In reply to: bbRating FF issue

    Doobus
    Member

    Upon further inspection of the source code. I noticed that the link to the star.gif was awkward:

    http://localhostbbpressmy-pluginsbb-ratings/star.gif

    To make sure that was an issue with FF, I copied it into the address bar and it returned an error. Changed the backslash to forward slashes and it worked. However now I’m stuck on how to change it, looked into the php file and it just calls the path to bb url. Checked in the bb admin section and the url is set with forward slashes, so I have no clue why it’s backward slashes.

    #32257

    Topic: bbRating FF issue

    in forum Plugins
    Doobus
    Member

    Posted this in the bbRating plugin section, but figured my issue would have more exposure if I posted here.

    I have bbPress 1.0.2 on a test server with bbRating 0.8.5.

    bb_rating() and bb_rating_dingus() work correctly on IE8 and Safari, and oddly does not work in FireFox. Firefox simply doesn’t show anything, looking at the source code it shows the same thing as IE8 and Safari, with my limited coding knowledge I’m not sure what the issue could be.

    Also bb_top_topics, which I assume lists the highest rated threads doesn’t do anything on any of the browsers.

    Thanks.

    #32255

    Topic: BB Seo Tools Bugs

    in forum Plugins
    alegria
    Member

    There’s some conflicts in the bb seo tools plugin with human test. This is the error:

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /web/htdocs/www.alegria.it/home/forum/my-plugins/bb-seo-tools.php on line 178

    #81206

    In reply to: Help with css layout

    The problem is with the menu tabs. If you cut the html part out, the heading aligns fine.

    I tried some css changes, but to no avail. Really odd… in any event, the problem seems to fix itself if you add a div with some height (40px), like this:

    <div id="blog-menu" class="clearfix">
    <ul>
    <li class="about"><a href="/about-2">About</a></li>
    <li class="join"><a href="/join">Join</a></li>
    <li class="blog"><a href="/blog">Blog</a></li>
    <li class="contact"><a href="/contact">Contact</a></li>
    <li class="wiki"><a href="/wiki">Member - Wiki</a></li>
    <li class="forum"><a href="/forum">Member - Forum</a></li>
    </ul>
    </div>
    <div style="height:40px;"></div>

    There must be some other solution, but at least there is a quick fix for now, and you know where to look for the source of the issue.

    Hope this helps.

    #80678
    chrishajer
    Participant

    No, it’s a function of the operating system of the web server and the files. In your FTP program it should be available with a right click on the file, or maybe it’s a column that is displayed by the date and filesize.

    It should look like this: 0644 or rw-r--r--, on the same line in your FTP program as your bb-config.php. Here’s a sample screenshot of what I’m talking about.

    http://www.chrishajer.com/bbpress/permissions.png

    They’re called “rights” in this program.

    Basically, bbPress needs to be able to read the file.

    #80669
    chrishajer
    Participant

    Received the config file. I am guessing that is is actually named bb-config.php. It appears to be correct to me. I’m not certain what is causing your error.

    The only time that error should show up is when that variable is not defined. Here’s the code that checks for bb_table_prefix being set:

    // Die if there is no database table prefix
    if ( !$bb_table_prefix ) {
    die( 'You must specify a table prefix in your <code>bb-config.php</code> file.' );
    }

    So, for some reason it’s not set or not recognized as being set. Are you certain when you moved the files out of the folder that you moved everything? Since you haven’t installed yet, can you save a copy of your bb-config.php, in case you need it, then just upload everything from the bbpress folder that is unzipped from the download onto the html root of your server (probably right where it is now.)

    #80666
    chrishajer
    Participant

    A table prefix is just one way of having lots of different software packages use one database. Since they might use similarly named tables, like user or post, the table prefix allows multiple packages to use the same database and table name, it just gets this prefix added to the table. So, the posts table becomes bb_posts, or wp_posts in the case of WordPress.

    You could change it to chevycamaro_ and then you’d get chevycamaro_post as a table name.

    Just don’t use the same prefix for two different software packages. That has a tendency to wipe things out. (The second package you install with a similarly named table will overwrite the first table, if you use the same prefix. Always use a unique prefix. It’s a non-issue for you now with only one software package installed using that database.)

    #80665
    jeffreyw4
    Member

    In response to your last post, this line is in there:

    $bb_table_prefix = 'bb_';

    Yes this was edited manually ( in a text editor).

    #80663
    jeffreyw4
    Member

    Well basically I’m just trying to figure out what is going on. My assumption is that, since the server is no longer complaining that it can’t establish a connection with the server, it has done so and it is now onto the next piece of the puzzle. It says:

    “You must specify a table prefix in your bb-config.php file.”

    I’m assuming it’s referring to this line:

    $bb_table_prefix = ‘bb_’;

    This does indeed look like something should go there, but I have no idea what. Honestly I don’t even know what a table prefix is:(

    It’s the double edged sword of prepackaged software: code is impossible to understand!!

    #80662
    chrishajer
    Participant

    I see this error now:

    You must specify a table prefix in your bb-config.php file.

    Did you edit the file manually? There is a table prefix by default of bb_ – is that no longer there?

    #81208
    chrishajer
    Participant

    So, the topic title, like “Bold letters in Heading” here? Only on the topic page?

    You need to find this in style.css:

    .topictitle {
    font-size: 26px;
    font-weight: normal;
    display: inline;
    }

    and change the font-weight to bold, like this:

    .topictitle {
    font-size: 26px;
    font-weight: bold;
    display: inline;
    }

    It’s all controllable with CSS. Most of the things you’ve wanted to change in the past couple weeks are just CSS modifications.

    #81186
    fifthhouse
    Member

    Thanks to you both. Yes it was to have links in my forum back to the blog. OK great, I think I can do this (not versed in code but this looks quite straightforward).

    If I could take the question one step further, within my blog, would I then be able to create a widget “latest forum posts” with a list of several, which would link to the posts in the forums? Or would this require deeper integration?

    This would give me everthing I need in terms of functionality.

    #81185

    I believe that the issue was the reverse, that is: how to add the blog menu onto the forum.

    If this is the case – the way I have done it – you edit header.php of your forum theme and add the menu tabs there, to match the ones of your blog. Make sure it is a custom theme and add it to my-templates folder, or you will lose it when you upgrade bbPress next time (if left as the default Kakumei).

    Just after

    <div id="header" role="banner">

    you add the html for the tabs (for id “navigation” add it to the style sheet). For example:

    <div id="header" role="banner">
    <ul id="navigation">
    <li><a href="blog url" title="Main Blog">Blog</a></li>
    <li><a href="forum url" title="Forums">Forums</a></li>
    <li><a href="another page url" title="Whatever Page">Whatever Page</a></li>
    <li><a href="contact page url" title="Contact Me">Contact Me</a></li>
    <li><a href="about page url" title="About">About</a></li>
    </ul>
    </div>

    Hope this helps.

    #81178
    InvTrdr
    Member

    Changing this line helped. pre, p { margin-bottom: 0.0em; }

    Thanks.

    #81176
    InvTrdr
    Member

    This is what I saw in the CSS of my stock theme.

    #thread .post {
    _height: 90px; /* Hack to fix broken .alt coloring in IE6 */
    }

    So modify it to something like this?

    #thread .post {
    _height: 90px; /* Hack to fix broken .alt coloring in IE6 */
    margin-bottom: 20px;
    }

    Thank you.

    #63075
    citizenkeith
    Participant

    @_ck_: My code is still working perfectly for me. Post what you are actually using.

    I’m using this (with my domain name inserted):

    <?php
    /*
    Plugin Name: Target Nofollow External Only
    Description: append target="_blank" and rel="nofollow" only on external links
    Plugin URI:
    Author: _ck_
    Version: 0.0.1
    */

    add_filter('post_text', 'target_nofollow_external_only',999); // unfortunately we have to do this on every page load and not in pre_post

    function target_nofollow_external_only( $text ) {
    $domain="citizenkeith.com"; // domain to exclude from target and nofollow
    $text = preg_replace('|<a (.*)rel=['"]nofollow['"](.+)?>|iU','<a >', $text); // strip ALL nofollow
    $text = preg_replace('|<a (?=([^>]+http://))(?!([^>]+'.$domain.'))(.+)>|iU', '<a rel="nofollow" target="_blank">', $text); // add back in when needed
    return $text;
    }
    ?>

    External links don’t actually work… all the CSS works (rollover changes, etc) but the browser (Firefox and IE for Windows) doesn’t actually recognize a link. I can’t click on it and open it anywhere (same window, new tab, etc).

    #81175
    chrishajer
    Participant

    It’s controlled by your CSS. The [p] tags are there for paragraphs, but they need more space. Something like this:

    #thread .post p {
    margin-bottom: 20px;
    }

    That will space them out. I added it around line 647 in style.css and it worked fine.

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