Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

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

    #81120

    Pretty much. The non get_ version is just an echo of the get_ one anyway :)

    https://trac.bbpress.org/browser/trunk/bb-includes/functions.bb-template.php

    #80844

    In reply to: Future of bbPress

    bbhack
    Member

    The reason why bbPress needs Oracle support is because if you are trying to integrate it into any existing site run by an actual company and not a hobbyist, there’s a good chance their user database is in Oracle (or MS SQL Server).

    PHP supports Oracle so why should bbPress be tied to just MySQL. I don’t think it is really using much (if any) MySQL specific code.

    This is one of the main selling points of PHPBB – it supports FireBird, MySQL, MS SQL Server, Oracle, PostgreSQL and SQLite.

    #81118

    Use get_topic_title() to retrieve the topic title as a string while in the loop.

    To get the actual index keys of the $topics array, you can use array_keys, or if you want to actual topic IDs, you’d need to use $topic->topic_id inside a foreach loop assigning $topic.

    #81117
    Bagi Zoltan
    Member

    Hi,

    $query="SELECT topic_id FROM bb_topics";will return the array of the topic ids.

    Regards

    #81124
    chrishajer
    Participant

    You can use browser add-ons for Firefox like Firebug or the Web Developer Toolbar, or you can use a command line tool, or there are places online that you can submit your URL to and they will show the headers returned.

    Using the Web Developer Toolbar for Firefox, I get this:

    Response Headers - http://fakeplasticfish.com/discuss/

    Date: Sun, 01 Nov 2009 21:27:42 GMT
    Server: Apache
    Keep-Alive: timeout=15, max=99
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    200 OK

    Which is correct, and different from before, and it looks like you fixed it.

    #81123

    Oh my god, I love you. Will you have my babies???!!!!!

    Changing from wp-blog-header.php to wp-load.php fixed the problem. At least it looks that way. The pages are loading in IE now.

    How would I check to headers to make sure this problem is truly fixed? I don’t know what “check the headers” actually means. Sorry. :-)

    Oh, and maybe bbPress could change the instructions here

    https://bbpress.org/documentation/integration-with-wordpress/

    to indicate that wp-load.php should be used instead?

    Beth

    #81122
    chrishajer
    Participant

    I think you should be including wp-load.php instead of wp-blog-header.php

    I think the difference between browsers is due to your forum returning a 404 but still displaying the content. Some browsers ignore the 404 and display the content (Safari and Firefox, apparently) but others treat the 404 as a 404 (IE8).

    Check the headers being returned from http://fakeplasticfish.com/discuss/ :

    Date: Sun, 01 Nov 2009 20:34:48 GMT
    Server: Apache
    Cache-Control: no-cache, must-revalidate, max-age=0
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Pragma: no-cache
    X-Pingback: http://fakeplasticfish.com/xmlrpc.php
    Last-Modified: Sun, 01 Nov 2009 20:34:48 GMT
    Keep-Alive: timeout=15, max=98
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    404

    https://bbpress.org/forums/topic/deep-integration-google-might-not-be-indexing-your-forum-pages

    https://bbpress.org/forums/topic/help-404-error-but-page-displays

    https://bbpress.org/forums/topic/bbpress-wordpress-mu-or-not-leads-to-404-errors-but-pages-still-load

    I think those are related.

    #32216

    Not sure if this question should go to the Installation forum or Troubleshooting. I actually posted this question last night to the forum, and this morning it has disappeared. So trying again…

    I have spent all weekend installing bbPress and modifying the kakumei template to integrate with my site. It all looked great in Firefox and Safari, but when I view the site in Internet Explorer 8, I cannot reach any pages besides front page, and only then if I browse to http://fakeplasticfish.com/discuss/index.php. Simply browsing to http://fakeplasticfish.com/discuss/ in Internet Explorer brings up a 404 Error, as do all the other forum pages.

    Here are details of my install:

    WordPress 2.8.4 installed at the root: http://fakeplasticfish.com

    bbPress 1.0.2 installed at http://fakeplasticfish.com/install/

    bbPress is installed into the same database as WordPress on a GoDaddy Linux server.

    I have added this code to my bb-config file as instructed:

    /** Integrate with WordPress */

    require_once(‘/home/content/b/e/t/bethfish/html/wp-blog-header.php’);

    This is because I want my WordPress plugin menu bar to appear in bbPress as well as other WordPress functions.

    I thought perhaps the issue had to do with pretty permalinks, as I read some entries in this forum on that issue, so I actually switched back to the original ugly permalinks, cleared the browser cache and restarted IE. IE will still not open any of the bbPress pages besides index.php and returns a 404 error from the server (not my WordPress 404 page.)

    I have two .htaccess files, one in the root folder created by WordPress and one in /discuss/ created by bbPress. I tried deleting that file after switching back to ugly permalinks, and now there is a new one there.

    I am a novice. I don’t understand the information in the .htaccess file, but I am happy to copy the information from both files over here if that would help.

    I just really don’t understand why the bbPress pages work fine in Firefox and Safari and not in IE.

    #32215
    Collisionx
    Member

    Hi

    I have tried integrate wordpress into bbPress according to the documentation, in my localhost, and im getting this error.

    Fatal error: Call to undefined function bloginfo() in C:wampwwwgm_wordpresswp-contentthemesdefaultfooter.php on line 12

    Do i have to call every file in wordpress with “require_once”… Or is there any other solution ?

    I ll be great if you guys can help me out.. :)

    Thanx

    #32214
    psymatix
    Member

    Hello,I’m a wordpress user and I just downloaded bbpress for a project I’m working on since I can’t get some key features on wordpress. My project involves polls that can be created by users of the site, and also regular forum topics.

    I have gotten the polls plugin bbpress polls and it adds ‘[poll]’ in front of the topic title. now I want to use this feature to display topics with polls separately from topics that don’t have polls since this seems to be the most distinguishing factor.

    My question is how can I get the topic title in the loop for use in my code? the Function topic_title() displays the topic i.e. it echoes it, but I would like to get it as a string that I can use in functions.

    Also, I would like to know how I can get a reference of all the index keys in the $topics array so I can use them in my code.

    #32213
    Basti1900
    Member

    Hi all,

    just installed bbPress at http://www.autogas-umruestungen.de/forum

    Do I have to protect this directory somehow? The index.php is in the same directory with bb-config.php etc. and other vital files?

    Seems unsafe? Or am I wrong?

    Thanks for your help..

    Great tool this bbPress :-)

    Sebastian

    #81104
    Pomy
    Participant

    where are coders… I’m waiting for reply… please help

    #62402
    Bagi Zoltan
    Member

    I faced with the very same problem with two bbpress installations along with a WP. I slightly modified the function is_404() in the /wp-includes/query.php so the function returns true when the requested uri belongs to the forums.

    function is_404 () {

    global $wp_query;

    if (preg_match('/(firstbbpressfoldername|secondbbpressfoldername)/i', $_SERVER))

    {return true;}

    else{

    return $wp_query->is_404;}

    }

    After saving the irritating 404 issue has gone.

    Regards

    Zoli

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