Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,001 through 23,025 (of 32,516 total)
  • Author
    Search Results
  • Cripes, no need for all that object-based markey, bbPress has functions to pass as a string rather than echo…

    <?php
    /*
    Plugin Name: Meta Headers
    */

    function meta_heads() {

    global $posts, $tags;

    if ( $posts ) {
    $out = $posts[0]->post_text;
    $out = strip_tags( $out );
    $out = str_replace( array( "n", "r" ), ' ', $out );
    $out = substr($out, 0, 200); // only display the first 200 characters of the first post
    }

    if( empty( $out ) )
    $out = 'Default description';

    echo "n".'<meta name="description" content="'.$out.'" />';

    if ( !empty( $tags ) ) {
    $keywords = '';
    foreach ($tags as $t) {
    $keywords.=$t->raw_tag.', ';
    }
    echo "n".'<meta name="keywords" content="'.substr($keywords,0,-2).'">'."n"; // displays any tags associated with a topic as keywords
    }

    }

    add_action( 'bb_head', 'meta_heads' );

    That will strip HTML, but not bbCode

    #65805
    atwellpub
    Member

    hey guys,

    I solved this issue for myself by adding a row into my wp_usermeta tablein my wordpress database, and adding this :

    INSERT INTO database.wp_usermeta (

    umeta_id ,

    user_id ,

    meta_key ,

    meta_value

    )

    VALUES (

    NULL , ‘1’, ‘bbpcapabilities’, ‘a:1:{s:9:”keymaster”;b:1;}’

    );

    psycheangels
    Member

    thanks, but meta description not working because it will insert embed code and image code to header if the first line of the post have markup code. thats a bad thing ryt?

    #80830

    In reply to: Future of bbPress

    alekseo
    Member

    “Thanks for stopping by Andy. “

    second that

    I just realized that i miss a “quote” button in bbPress =)

    But what i came here to say is that i miss the possibility to show/hide subforums and make then show up as links beneath the description for their parent.

    I must say that im really a fan of this forum software and that it got plenty which i have missed from other forums.

    Hope to see more ongoing core development for bbPress in the future. Is this a goal for you?

    Daniel Juhl
    Participant

    Hi,

    I’m building the community on a portal around bbPress, but how can I check if a user is logged in to bbPress and how to get the basic informations about the user?

    I’ve managed to do this with an earlier version of bbPress, but after upgrading to bbPress 1.0.2 I can’t get the result I’m looking for. I’ve tried to require bb-load.php, but it gives me the following error:

    Fatal error: Call to a member function suppress_errors() on a non-object in /PATH-TO-BBPRESS/bb-includes/functions.bb-core.php on line 63

    Has anyone successfully integrated bbPress with their website (non-WP)?

    #32172
    yangers101
    Member

    I currently am running bbpress 1.0.2. I am trying to insert a google adsense code on my right column/sidebar. My right column/sidebar is currently blank. However, no matter where I put the code, it always displays on my main/left column.

    I read somewhere about putting an “includes” function to fetch the sidebar for wordpress. I’m not sure if it will work here?

    Does anybody have any ideas they can share?

    Thank you!

    #32127
    yangers101
    Member

    I currently am running bbpress 1.0.2. I am trying to insert a google adsense code on my right column/sidebar. My right column/sidebar is currently blank. However, no matter where I put the code, it always displays on my main/left column.

    I read somewhere about putting an “includes” function to fetch the sidebar for wordpress. I’m not sure if it will work here?

    Does anybody have any ideas they can share?

    Thank you!

    #80979
    Navin
    Member

    Holy F, i just tried it on my forum, and it’s working, WOW :D

    #32170
    Pomy
    Participant

    Dear BBCoders…

    I think it is small mistake but it is mistake. Your post editor lose it’s shape when we expand it with mouse click from bottom right corner. you should try to solve this small mistake and you should try to fix it’s width and height?

    Hope all moderators will smile and take notice ;-)

    here are it’s screen shots

    http://img337.imageshack.us/img337/9396/lol1k.jpg

    http://img11.imageshack.us/img11/1031/lol2js.jpg

    Also you should try to solve this mistake in your post plugin :-)

    merlin214365
    Member

    So after trying many plug-ins for meta data i found out that most don’t work at all with the newest version of bbpress and others do a poor job so i decided to write my own little php code no plug-in needed.

    I wrote some php code to include a meta description based on the first 200 characters of the post and a default description if there is no post ( i.e the front-page ). Also meta keyword’s that displays any tags associated with that post as keywords.

    So just add this to your header

    <?php<br />
    if ($posts) {<br />
    foreach ($posts as $bb_post) : $del_class = post_del_class();<br />
    $old=ob_get_contents(); ob_clean(); ob_start(); // you may leave ob_start();<br />
    post_text();<br />
    $out.=ob_get_contents(); ob_clean();<br />
    endforeach;<br />
    $out = preg_replace('#<p[^>]*>(s| ?)*</p>#', '', $out); // takes out <p><br />
    $out = substr($out,0,200); // only displays the first 200 lines of the first post.<br />
    echo '<META NAME="Description" CONTENT="';<br />
    echo $out;<br />
    echo '">';<br />
    }<br />
    else {<br />
    echo '<META NAME="Description" CONTENT="This is your defalt description edit this to what ever you want ">'; // This displays when where is no post<br />
    }<br />
    global $tags;<br />
    if (!empty($tags)) {<br />
    $keywords=""; foreach ($tags as $t) {$keywords.=$t->raw_tag.', ';}<br />
    echo "n".'<meta NAME="keywords" CONTENT="'.trim($keywords,", ").'">'."n"; // This displays any tags associated with that post as a keyword<br />
    } ?>
    #80930

    In reply to: Get Profile Links

    Gautam
    Member

    Or you can just call get_user_profile_link(); function to get the simple link.

    If the user is logged in, it will automatically get the user id.

    Function can be found here –

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

    #80921
    janvi
    Member

    Thanx for your reply.

    Have tried fooling around with tags in ‘post.php’ until now, but it’s going nowhere :(

    it must be possible? ..or?

    #32007
    Klaus.Kuplen
    Member

    Hi,

    I’m setting up a bbpress instance and noticed that the log files have to exist otherwise no logging takes place. This makes my beloved log file rotating impossible.

    But if i edit class.bp-log.php and insert the following after lines in set_filename at about line 143

    if (! file_exists($_filename)) {

    @touch ($_filename);

    }

    This allowes me to do nice things like configure log files to

    define( 'BB_LOG_FILENAME', $global_log_dir . 'bbpress-' . date("Y-m-d") . ".log");

    #80829

    In reply to: Future of bbPress

    There is code in BuddyPress that allows bbPress to install, configure and run all within the WordPress environment.

    But does it work out-of-the-box already? It doesn´t for me.

    #80966

    WordPress themes can’t be used for bbPress without modification, but if it’s a bbPress theme, then yep, just put it in its own directory under my-templates

    #80827

    In reply to: Future of bbPress

    For bbPress to continue moving forward it has to start seamlessly integrating with WordPress.

    There are only two ways of doing that. Move WordPress so that it uses BackPress, or extract BackPress from bbPress and point it to the code existing in WordPress (if it is integrated). Moving WordPress to use BackPress is a considerable job and would likely need the attention of a completely new version number. In the short term the time it would take isn’t feasible for bbPress (or BuddyPress for that matter) to continue moving forward at a reasonable pace.

    The second option is quite possible and has already been done. Despite it not being the truly “ideal” method for the long term it could be used without problems until WordPress moves to BackPress. There is code in BuddyPress that allows bbPress to install, configure and run all within the WordPress environment. If someone was willing to put some time in and extract this code into a plugin (or perhaps a core extension) then the job would almost be done.

    The integration / abstraction code is here: https://trac.buddypress.org/browser/trunk/bp-forums/bp-forums-bbpress.php

    The configuration / setup code is here: https://trac.buddypress.org/browser/trunk/bp-forums/bp-forums-admin.php

    I’m happy to help someone along with this.

    #80920
    Ario
    Member

    It is possible I would think. I am going to do some experimenting on it but if you are looking for a good plugin to deconstruct and learn from (what I am doing since I lack the skill to make something from scratch) then try looking at the Gaming Codes plugin.

    #80928

    In reply to: Get Profile Links

    Ario
    Member

    I was going to hide it behind tags:

    <?php if ( bb_is_user_logged_in() ) : ?>

    What I wanted to do was to replace the standard:

    <?php if ( is_bb_profile() ) profile_menu(); ?>

    With other things including links for the “Your Profile”, “Edit (your) Profile”, PM Inbox, Memberslist, “Logout” etc.

    Basically I am trying tp bypass the profile_menu() non-global status along the lines of this thread that I wasn’t able to work:

    https://bbpress.org/forums/topic/profile_menu-doesnt-work-on-all-pages

    I was trying to force the URL and trying to force such a global profile menu using:

    <?php echo bb_option('uri'); ?>/profile/<?php echo bb_get_current_user_info( ' name ' ); ?>

    But that is pretty ghetto and as you can see it outputs the display name not the username so thus can’t be used for getting a link to the user’s profile…

    #80875
    Ario
    Member

    TinyMCE can work in just about any forum so there should be no reason it wouldn’t work.

    As for videoquicktags do you mean like bbcode? It can be done fairly simply I believe but I am not good enough at PHP to deconstruct the bbcode-lite script to make it for you since that script is so heavily optomized.

    Edit:

    http://urbangiraffe.com/plugins/html-purified/

    Take a look at HTML purifier. It allows your user to use HTML but strips anything bad. That way you can use the regular YouTube embeds or whatever you like w/o need of a bbcode plugin.

    #80927

    In reply to: Get Profile Links

    function bb_get_admin_link( $args = '' ) {
    if ( !bb_current_user_can( 'moderate' ) )
    return;
    if ( $args && is_string($args) && false === strpos($args, '=') )
    $args = array( 'text' => $args );

    $defaults = array('text' => __('Admin'), 'before' => '', 'after' => '');
    $args = wp_parse_args( $args, $defaults );
    extract($args, EXTR_SKIP);

    $uri = esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

    return apply_filters( 'bb_get_admin_link', $before . '<a href="' . $uri . '">' . $text . '</a>' . $after, $args );
    }

    So if you don’t mind bypassing the moderation ability check, just use

    esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

    or

    bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN);

    depending if you’ll be escaping the URL later.

    To keep the check, use if ( bb_current_user_can( 'moderate' ) )

    #32156
    Ario
    Member

    bb_get_profile_link(bb_get_current_user_info( ‘id’ ))

    Is there any way to get the URL to the logged in user’s profile without all that “view your profile” junk it tacks onto the above call?

    I am trying to customize my logged-in.php into something like:

    <ul>
    <li>Profile</li>
    <li>Edit</li>
    <li>PM</li>
    <li>Favorites</li>
    <li>Logout</li>
    </ul>

    Except I can never get it to pump out clean URLs =/

    #32154
    janvi
    Member

    Hello.

    Trying to get the extended user (profile) fields running. This was easy, the solution was relatively easy to find on the forums. But, .. always a but you know. My problem is to display this user information in the forum posts, how can I solve this? I would like to display this info below the gravatars.

    (display only one userfield, not all of them. eg. would like to display a field called ‘distro’)

    Relatively unexperienced with both WP and bbPress.

    Thank you ;)

    #80822

    In reply to: Future of bbPress

    Jiyong
    Member

    BBpress is a very good forum, but the support in franch (the example for me) is nonexistent. So it’s a problem for the BBPress development in the world. Another problem, lack of consistent WordPress plugin -> bbpress (example : Avatar :()

    I like bbpress, I hope everything will change for the better …

    #57472
    OKTeaRoom
    Member

    Hi, 2 problems and I hope you guys can help me out :)

    1. I’m getting this error:

    Warning: require_once(/hermes/web10/b811/pow.oktearoom/htdocs/forum/htdocs/blog/wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /hermes/web10/b811/pow.oktearoom/htdocs/forum/bb-config.php on line 66

    Fatal error: require_once() [function.require]: Failed opening required ‘/hermes/web10/b811/pow.oktearoom/htdocs/forum/htdocs/blog/wp-config.php’ (include_path=’.:/usr/local/lib/php-5.2.2/lib/php’) in /hermes/web10/b811/pow.oktearoom/htdocs/forum/bb-config.php on line 66

    I know that i defined the path incorrectly..i want it to say /htdocs/blog/wp-config.php and NOT htdocs/forum/htdocs/blog/wp-config.php

    How do i write it without it including the htdocs/forum part. (my blog is on my /blog directory and the forum is in the /forum directory). Sorry, i’m a hug newb but I’d appreciate some guidance.

    Problem 2:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /hermes/web10/b811/pow.oktearoom/htdocs/blog/wp-blog-header.php:4) in /hermes/web10/b811/pow.oktearoom/htdocs/blog/wp-content/plugins/wp-e-commerce/merchants/paypal_certified.php on line 741

    That is showing up at the top of my blog. Any idea on how to tackle that?

    Thanks

    Bob

    #80912
    bblover
    Member

    Hurrah……. I got it :-)

    Dear Sir johnhiler….. After conversation with you i was damn researching on this issue to solve this problem over the internet with your telling points. So after watching the video” http://wordpress.tv/2009/01/23/integrating-a-bbpress-forum-with-your-self-installed-wordpress&#8221; I integrated my one bbpress ( Suppose bbpress01 ) to lonely wordpress. so my first “bbpress01” had been successful integrate with one wordpress and all cookies and users was set. so next i want to merge my other 24 bbpress install into this successful integration.

    so my next working was;

    i copy paste my bbpress01 rename it to bbpress02. then i went to the bb-config.php of bbpress02 and add these stuff in it:

    $bb_table_prefix = ‘bb2_’;

    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);

    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    define( ‘COOKIEPATH’, ‘/’ );

    Note: database of all 25 bbpress and 1 wordpress was same just changing in tables prefix like bb1_, bb2_ bb3_ to bb25 and add just custom user table code.

    you can i also view the screenshot of work here is it.

    for wp-config.php: http://img32.imageshack.us/img32/8249/wpconfig.jpg

    for bbpress01 bb-config.php: http://img23.imageshack.us/img23/6034/bb1su.jpg

    for bbpress 02 bb-config.php: http://img21.imageshack.us/img21/2746/bb2xa.jpg

    so here i was successful which i want.

    1. share users

    2. shared database

    3. cookies integration

    but “One” thing is still remain :-(

    if a user “john” login to my bbpress01. he should also show login status on my other 24 forums.

    I think you can understand it. now i need cookies integration for other 24 bbpress.

    cookies integration just was set b/w bbpress01 and wordpress. how can we set cookies for all my other remaining 24 forums.

    I’ll be great thankful to you if you try to solve my final step and give me the smart solution.

    waiting for your reply with great curiosity :-)

Viewing 25 results - 23,001 through 23,025 (of 32,516 total)
Skip to toolbar