Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,476 through 23,500 (of 32,481 total)
  • Author
    Search Results
  • #31783
    Burkie
    Participant

    I’m currently adding content to my membership page, using the memberlist plugin. I have added a few extra details to the sign up page e.g. About, Skills etc… I had found the following line echo "<a>user_url."">".$member->user_url."</a>"; so modifying this to echo $member->about; It thought it should work but doesn’t, any ideas?

    #79227

    In reply to: Google Analytics

    mba-studium
    Member

    I think you can track this seperataly with two codes.

    #79252
    johnhiler
    Member

    Check out the comments on the plugin… it’s a bit tricky to configure since you have to make sure to create the upload directory about your webroot (for security reasons):

    # make a directory /bb-attachments/ ABOVE your webroot ie./home/username/bb-attachments/

    # chmod 777 the above /bb-attachments/ directory

    It’s definitely worth it though – the security help keeps your site safe. :-)

    #31778
    Mark
    Member

    v1.0.2

    Even though by technicality you are on your profile page, when I’m viewing my ‘manage favorites’ page (bb-templates/blah/favorites.php) I’m getting ‘profile-page’ returned by bb_get_location() instead of ‘favorites-page’ as I would expect. This also means bb_is_favorites() is of no use to me for this page. :(

    If that’s not the favorites page, what is?

    #79178

    I’ll check the config file to make sure the code is correct. I have no idea where all the spam tags came from. They’re pretty lame though. whoever it is, they are wasting tons of time!

    #79209

    In reply to: Mail me after post

    @Olaf: Your sidebar is going past the end of your main div :(

    #79238
    Olaf Lederer
    Participant

    Hi,

    I don’t think that there is a standard function for that, do you tried some custom code?

    since version 1.0 it’s possible to have custom functions in the template functions.php file. Just like in wordpress.

    #79205

    That code is probably fine, the version number is okay anyway but it’s slightly different to the one above.

    There’s an upload plugin for PostImage: https://bbpress.org/forums/topic/request-image-upload-with-free-image-hosting#post-56890

    That’s the only one I know of

    #79203
    InvTrdr
    Member

    That code above did not work for me chandersbs. The one below did. Is it safe to use the one below?

    <?php

    /*

    Plugin Name: Allow Images

    Plugin URI: https://bbpress.org/#

    Description: Allows <img /> tags to be posted in your forums. The image must be a png, gif or jpeg.

    Author: Michael D Adams

    Author URI: http://blogwaffe.com/

    Version: 0.7.1

    */

    // You can add more tags here

    function allow_images_allowed_tags( $tags ) {

    $tags = array(‘src’ => array(), ‘title’ => array(), ‘alt’ => array());

    return $tags;

    }

    function allow_images( $text ) {

    if ( preg_match_all(‘/<img(.+?)src=(“|’)(.+?)\2(.*?)>/i’, $text, $matches, PREG_SET_ORDER ) ){

    foreach( $matches as $match ){

    if (preg_match(‘/src=/i’, $match[4]) /* multiple src = someone’s trying to cheat */ || !in_array(substr($match[3], -4), array(‘.png’, ‘.jpg’, ‘.gif’)) /*only match .jpg, .gif, .png*/ && ‘.jpeg’ != substr($match[3], -5) /*and .jpeg*/){

    $text = str_replace($match[0], ”, $text);

    }

    }

    }

    return $text;

    }

    add_filter( ‘pre_post’, ‘allow_images’, 52 );

    add_filter( ‘bb_allowed_tags’, ‘allow_images_allowed_tags’ );

    ?>

    #79202
    InvTrdr
    Member

    Thanks. Will the above code posted by chandersbs work in 1.0?

    Thanks.

    #79221

    That’s in a core file… what have you managed to do in your CSS to make it not go underneath? D:

    Short-term fix:

    Put this in your theme’s functions.php

    <?php
    function add_topic_br_special() { ?>
    <br />
    <?php }
    add_action( 'pre_post_form', 'add_topic_br_special');
    ?>

    #79236

    In reply to: Link to Home Page.

    It depends on your theme design.

    In mine, I have four main divs: header, content, sidebar and footer

    So on my footer.php, at the top, I put in this: <?php require('/home/domain/www/forums/my-templates/themename/sidebar.php'); ?> and then built the sidebar as I wanted it.

    #79226

    In reply to: Google Analytics

    So it works similar to WP but just that you cannot do it through Editor in WP, rather do it directly in the files on the server, correct?

    Correct. There’s no theme editor built in to BB at this time, so you have to edit the template file.

    And you can use the same GA code from WP to BB without changing anything, but as it’s a different page, you have to edit the bbPress and WordPress templates separately.

    #79225

    In reply to: Google Analytics

    InvTrdr
    Member

    So it works similar to WP but just that you cannot do it through Editor in WP, rather do it directly in the files on the server, correct? If I have GA code on my site already, will it help as the forum is just an extension of the domain? Or not, as it is a different page altogether?

    Thanks.

    #79235

    In reply to: Link to Home Page.

    InvTrdr
    Member

    Thanks. Where exactly in the header.php do I add it and what is the code to add to it?

    Thanks.

    #79224

    In reply to: Google Analytics

    chrishajer
    Participant

    Just paste the Analytics code in your template’s footer.php.

    #31763

    Topic: Google Analytics

    in forum Installation
    InvTrdr
    Member

    Is it possible to add Google Analytics code to a bbPress forum? Did not see Editor under Appearance.

    Thank you.

    #79087
    kirpiit
    Member

    Thanks Kawauso, it does the trick!

    The Case Is Closed :-)

    [Well, not so closed, actually, as long as the basic Kakumei suffers from this (although tiny) css bug. Maybe this should be noticed to the guys who maintain the theme.]

    #79199
    chandersbs
    Member

    Copy and paste this code and save it as allow-images.php

    <?php

    /*

    Plugin Name: Allow Images

    Plugin URI: https://bbpress.org/#

    Description: Allows <img /> tags to be posted in your forums. The image must be a png, gif or jpeg.

    Author: Michael D Adams

    Author URI: http://blogwaffe.com/

    Version: 0.7.1

    */

    // You can add more tags here

    function allow_images_allowed_tags( $tags ) {

    $tags = array(‘src’ => array(), ‘title’ => array(), ‘alt’ => array());

    return $tags;

    }

    function allow_images_encode_bad( $text ) {

    $text = wp_specialchars( $text );

    $text = preg_replace(‘|
    |’, ‘
    ‘, $text);

    foreach ( bb_allowed_tags() as $tag => $args ) {

    if ( ‘br’ == $tag )

    continue;

    if ( $args )

    $text = preg_replace(“|<(/?$tag.*?)>|”, ‘<$1>’, $text);

    else

    $text = preg_replace(“|<(/?$tag)>|”, ‘<$1>’, $text);

    }

    $text = preg_replace(“|(.*?)|se”, “‘' . encodeit('$1') . '‘”, $text);

    return $text;

    }

    function allow_images( $text ) {

    if ( preg_match_all(‘/<img(.+?)src=(“|’)(.+?)\2(.+?)>/i’, $text, $matches, PREG_SET_ORDER ) )

    foreach( $matches as $match )

    if (

    preg_match(‘/src=/i’, $match[4]) // multiple src = someone’s trying to cheat

    ||

    !in_array(substr($match[3], -4), array(‘.png’, ‘.jpg’, ‘.gif’)) // only match .jpg, .gif, .png

    &&

    ‘.jpeg’ != substr($match[3], -5) // and .jpeg

    )

    $text = str_replace($match[0], ”, $text);

    return $text;

    }

    remove_filter( ‘pre_post’, ‘encode_bad’ );

    add_filter( ‘pre_post’, ‘allow_images_encode_bad’, 9 );

    add_filter( ‘pre_post’, ‘allow_images’, 52 );

    add_filter( ‘bb_allowed_tags’, ‘allow_images_allowed_tags’ );

    ?>

    Upload it to your my-plugins folder, create if it doesn’t exist. And activate it.

    #79137
    InvTrdr
    Member

    The error message was “DB Error: cannot find”. Figured out that for some reason the database name filled in during step1 was not caught by the bbpress-config.php file as you can see in the code above. The BBDB_NAME has been left “bbpress” as in default. Changed it in the file and it worked. Now onto Step2.

    Thanks.

    #79173
    chrishajer
    Participant

    I just checked out 1.0.2 via svn and I see backpress is included as an external:

    Fetching external item into 'bb-includes/backpress/pomo'
    A bb-includes/backpress/pomo/mo.php
    A bb-includes/backpress/pomo/sample
    A bb-includes/backpress/pomo/sample/app.php
    A bb-includes/backpress/pomo/sample/languages
    A bb-includes/backpress/pomo/sample/languages/app.pot
    A bb-includes/backpress/pomo/sample/languages/bg.mo
    A bb-includes/backpress/pomo/sample/languages/app-side.pot
    A bb-includes/backpress/pomo/sample/languages/bg-side.mo
    A bb-includes/backpress/pomo/sample/languages/bg.po
    A bb-includes/backpress/pomo/sample/languages/bg-side.po
    A bb-includes/backpress/pomo/po.php
    A bb-includes/backpress/pomo/streams.php
    A bb-includes/backpress/pomo/entry.php
    A bb-includes/backpress/pomo/translations.php
    Checked out external at revision 191.

    It’s actually included in the packaged download here too:

    https://bbpress.org/latest.zip

    https://bbpress.org/latest.tar.gz

    I don’t think using trac to grab the source is the same as actually downloading the package. Maybe that was the problem?

    #79188
    Mark
    Member

    It does. ;)

    <?php printf(__('%1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>

    #79165
    62gr
    Member

    I paste this code

    into my-profile-fields.php file

    into my-plugins

    but its not working !!

    this code :

    <?php

    /*

    Plugin Name: My Profile Fields

    Description: My profile fields for my lovely forums

    Version 1.0

    */

    function my_profile_fields( $fields ) {

    /* This removes the Occupation profile field: */

    unset( $fields );

    /* This adds a new optional field called Favourite Band: */

    $fields = array(0,’Favourite Band’);

    /* This adds a new *required* field called State: */

    $fields = array(1,’State’);

    /* You must return the array at the end of the function: */

    return $fields;

    }

    add_filter( ‘get_profile_info_keys’, ‘my_profile_fields’ );

    ?>

    morgan-wick
    Member

    I’m trying to install a new bbPress forum at http://forums.morganwick.com. The “wrapper” div is set in style.css (the only file I’ve changed) to have position:static. It appears to be absolutely positioned, and I don’t see anything in either style.css or in the code that appears when I “view source” that would overrule style.css (the only places in style.css where anything is absolutely positioned either have “display” set to “none” or don’t appear on all pages) unless I have to go hunting through JavaScript. Having to deal with absolutely positioned elements is a pain for an amateur developer like me, and I’d much rather have elements appear as part of the normal flow, like I can do in WordPress; what’s the problem here?

    UPDATE: I just removed the background image from “wrapper” and added it to “header”, but it doesn’t show up at all. I’m trying to make it look as much like http://www.morganwick.com as possible.

    #74583
    chandersbs
    Member

    I’m sure it has to do with if and else things but how to code it :(

Viewing 25 results - 23,476 through 23,500 (of 32,481 total)
Skip to toolbar