Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,901 through 22,925 (of 32,481 total)
  • Author
    Search Results
  • #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.

    #32169
    InvTrdr
    Member

    How can the attribute “rel=no follow” for links be added to links in a topic? Is there a plugin in bbPress that renders all links or a chosen few to “rel=no follow”? When I used it like this <a href="http://........."rel="nofollow">.....</a> my stock theme removed it and made the link non-clickable.

    Thank you.

    #81162

    In reply to: Search Bar Disabled

    lisamorosky
    Member

    Ah, okay. Yeah that makes sense. Didn’t know about that FireFox add-on. Definitely going to get it. :) Thanks!

    #81161

    In reply to: Search Bar Disabled

    chrishajer
    Participant

    Take a look at these 3 screenshots taken using the web developer toolbar for firefox. The red outlined area is the current element being highlighted and the toolbar shows the name of that element. I suspect you didn’t intend for these elements to be positioned this way?

    http://www.chrishajer.com/bbpress/div-header.png

    (why so much to the right?)

    http://www.chrishajer.com/bbpress/div-login.png

    (why so wide, and why does it include the search box)

    http://www.chrishajer.com/bbpress/div-search.png

    (look how low it goes)

    Also, check when I hover the mouse in the search input field: the toolbar shows

    form .login , but nothing about the search div.

    http://www.chrishajer.com/bbpress/form-login.png

    (the cursor is a crosshair in the search input)

    I suspect that’s a clue to why you cannot access the search input or the search button: it’s “behind” the login form.

    #81093

    In reply to: Comment Lenght Limiter

    chrishajer
    Participant

    You could do it with JavaScript like this:

    http://www.mediacollege.com/internet/javascript/form/limit-characters.html

    That will just prevent someone from going over that limit accidentally. Since it’s done browser-side, there’s no guaranteed way to limit the input to just 2000 characters. But to prevent a normal user from posting a comment longer than 2000 characters, this would be one way to do it.

    There is probably a way to add a maxlength to the input, but I’m not sure which template file you would need to modify to make that change (probably just post-form.php and edit-form.php, add maxlength="2000" to the textarea for a new post):

    http://www.w3schools.com/tags/att_input_maxlength.asp

    Again, since that’s browser-side, it can be circumvented as well. You’d have to check the input on the server side to ensure it doesn’t exceed 2000 characters. But these two methods will prevent people from posting really long comments.

    #55977

    In reply to: Show off your Forum !!

    Adventure Canoe Forum

    I started a canoeing specific forum. It’s finally starting to get some traffic. I’ve used some standard plugins as well as writing some of my own.

    _CK_’s plugins are indispensable.

    here’s a could packed into one that do a lot of SEO stuff like titles, canonical links and opening links in new windows.

    <?php
    /*
    Plugin Name: Target Blank
    Description: append target="_blank" to all links and other fun stuff
    Author: James
    Version: 1
    */
    //add rel=external to post links... there's also some stuff in here to allow more tags

    function bb_target_blank( $text ) {
    $text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
    return $text;
    }
    add_filter('pre_post', 'bb_target_blank');

    // Add Tags with allow_tags

    function allow_more_tags( $tags ) {
    $tags['p'] = array('style' => array());
    $tags['h3'] = array('style' => array());
    $tags['span'] = array('style' => array());
    $tags['b'] = array('style' => array());
    $tags['em'] = array('style' => array());
    $tags['ol'] = array('style' => array());
    $tags['target'] = array('style' => array());
    $tags['iframe'] = array('style' => array());

    return $tags;
    }

    add_filter( 'bb_allowed_tags', 'allow_more_tags' );

    function meta_keywords() {
    global $tags;
    if (!empty($tags)) {
    $keywords="";
    foreach ($tags as $t) {$keywords.=$t->raw_tag.', ';}
    echo "n".'<meta NAME="keywords" CONTENT="'.trim($keywords,", ").'">'."n";
    }
    } add_action('bb_head', 'meta_keywords',8);

    function set_canonical_links() {
    global $page;
    if (is_front()) {

    $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

    echo '
    <link rel="canonical" href="'.$url.'" />'.PHP_EOL;
    } elseif (bb_is_topic()) {
    $tlink = get_topic_link();
    if ($page > 1) {
    $turl = $tlink.'/page/'.$page;
    } else {
    $turl = get_topic_link();
    }
    echo '
    <link rel="canonical" href="'.$turl.'" />'.PHP_EOL;
    } elseif (is_forum()) {
    echo '
    <link rel="canonical" href="'.get_forum_link().'" />'.PHP_EOL;
    } else {
    return;
    }
    }
    add_action('bb_head','set_canonical_links');

    ?>

    This one makes better page titles…it has some canoe specific stuff in it but I think you can see how it works and change it for your needs.

    <?php
    /*
    Plugin Name: Better Titles
    Author: James Dixson
    */
    add_filter('bb_title', 'titlemodify');

    function titlemodify( $title ) {
    //your code that does something to $title;

    switch ( bb_get_location() ) {
    case 'topic-page':
    $title = get_topic_title() . ' - ' . get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    break;

    case 'front-page':
    $title = bb_option('name') . ' &mdash; Canoeing and Paddling Discussion' ;
    break;

    case 'forum-page':

    $find = 'Canoe';
    $string = get_forum_name() ;
    if(strstr($string,$find)){
    $title = get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    }else{
    $title = 'Canoe ' . get_forum_name() . ' &mdash; Adventure Canoe Forum' ;
    }

    break;

    case 'profile-page':
    $title = 'Profile for ' . get_user_name() . ' - Adventure Canoe Forum &mdash; Canoeing and Paddling Discussion' ;
    break;
    }
    return $title;
    }
    ?>

    Anyway enjoy… and if you like canoeing post on the Adventure Canoe Forum

    #80932

    In reply to: Fictional Hybrid

    Ario
    Member

    Is this a theme people would be interested in using?

    I don’t mind sharing just my CSS would need some major cleaning and will probably try to work at improving W3C compliance. Also I still think parts of my bbpress main page template aren’t working quite right =/

    #80847

    In reply to: Future of bbPress

    Justin Tadlock
    Participant

    Codex. Codex. Codex.

    Open up a BB Codex like we have with WP. How are we going to get more devs to start hopping on the bbPress bandwagon? While many of us enjoy sifting through code when we get the extra time, good documentation is always helpful to get people started. Heck, even some better inline documentation would do wonders right now.

    Seriously, when was the last time this page and its subpages have been updated?

    https://bbpress.org/documentation/

    I’ve got more work than I can possibly handle, but I’d be willing to develop things for the bbPress community. I just don’t have time to spend reading through all the code, line by line, to see how things work.

    Give developers a chance to make the platform shine.

    The success of WordPress comes from the vast number of add-ons (themes and plugins) for the system. Without them, WordPress probably would’ve died a long while ago.

    The lack of documentation is probably turning a good number of developers away from the system, developers that could be creating plugins for many of the features that users want.

    This is the area that needs the most improvement. Let’s work on documentation first. Then, we can start thinking about other things bbPress needs.

    Themes

    I’ve seen a handful of decent themes I’d use, but (as far as I know) there are no major theme developers in the bbPress community. Documentation would go a long way in helping here. This is especially true for designers that don’t know all the ins and outs of the platform’s PHP code.

    I’d personally start coding bbPress themes if it supported the same type of parent/child theme setup that WordPress has. I’d be happy to port all of my WP themes like this.

    #81135

    In reply to: Move Tag Cloud

    t_shea
    Member

    Thanks, but I know almost nothing about editing PHP. I’m used to working in Dreamweaver but I normally use the ‘Split’ mode so that I can see visually how the code corresponds to what I see. But with PHP, it’s all code and no visual references.

    I need even more specifics of how to do this. I see my ‘hottags’ div, but I need to know exactly where to put it so that it will appear at the top of my page like it does here on the front page of the forums.

    Then when modifying the CSS, I realize the ‘top: 0’ and ‘left: 0’, absolute are pinning it to the top left corner of the screen, I think I understand the ‘width’, but I don’t know what the ‘overflow: hidden’ does. From seeing the #front-page #discussions right below it showing a width of 590px, I assume that is the width I’d want to change the #hottags to. Is that correct?

    Thanks again

    #32228
    moshe100
    Member

    Hi Everyone

    bbPress is great. I love it and I appreciate every bit of effort put into it.

    I am setting a new site which has only one, single forum in it.

    My goal is to have the main/home page show the same view as if I would select a specific forum from a multiple-forums website (stickies on top, marked in color….)

    My first idea was to replace front-page.php with forum.php (copy & rename), and add the following code:

    <?php $forum_id=”1″; ?> right after <?php bb_get_header(); ?>.

    This does create the appearance of a single forum, but in a different presentation. for example, sticky topics are sorted with all other topics by date, and are not forced to the first lines in the topics table.

    I would really really really appreciate any help or directions I can get.

    Thanks a lot !

    Moshe.

    #80846

    In reply to: Future of bbPress

    Elias
    Member

    […] I don’t think it is really using much (if any) MySQL specific code.

    bbPress uses a lot of SQL statements not working with Oracle and is highly optimized for MySQL. To make it independent from the RDBMS will not be easy, and coding a RDBMS independent layer and not using “JOIN”, “LEFT JOIN”, “MATCH” and “FULLTEXT INDEX”, “LIMIT” would degrade the performance of bbPress, which isn’t exactly the thing wanted for it.

    #81134

    In reply to: Move Tag Cloud

    chrishajer
    Participant

    Just find the page you want to change it on (probably front-page.php) and then edit that file in your template. Just move the div that is usually called hottags. Here it is from the stock theme

    <div id="hottags" role="main">
    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>
    </div>

    Just put that wherever you want it on your page. To change the size, you will need to find the CSS in style.css and adjust that to allow it to be wider and not float or whatever else you want it to do. Copying the styles from here is one option, to see how it was done. Here’s the corresponding CSS that controls the layout in the stock theme:

    #front-page #hottags {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    overflow: hidden;
    }

    Thank DKB. To disable that line, go to line 1017 in the WordPress-side plugin file wpbb-sync.php and comment out (put \ before each line):

    $comments[count($comments)-1]->comment_content .= '<br/><p class="wpbb_continue_discussion">'.
    __('Please continue discussion on the forum: ', 'wpbb-sync')."<a href='$link'> link</a></p>";

    You can also just change the text there too. Someone tell these guys about array_push() ?

Viewing 25 results - 22,901 through 22,925 (of 32,481 total)
Skip to toolbar