Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,051 through 29,075 (of 32,499 total)
  • Author
    Search Results
  • #60650

    In reply to: Cookies

    Trent Adams
    Member

    Not sure which file actually ‘writes’ the cookie, but as you know you can play around quite a bit by changing things in config.php. For example:

    For default installs this effectively makes the cookie names:
    'bb_user_' . md5('bb_')
    'bb_pass_' . md5('bb_')

    You can override the name of the cookie by setting values for the following somewhere in config.php:
    $bb->usercookie = 'my_great_user_cookie_name'
    $bb->passcookie = 'my_great_pass_cookie_name'

    Other than that, another user might have to tell you what function creates the cookie and then check the code. function.php maybe?

    Trent

    #60647

    In reply to: Forum Structure

    kanni
    Member

    Hej guys

    I removed the parent category, that’s why you dont see anything. using the newest version (0.8.2.1 ). you can try it yourself, just rebuild the structure in the images above and you will see it doesn’t work…

    I noticed that the category in the admin menu jumps back when i refresh the page.

    thats what it should look like:

    http://img406.imageshack.us/img406/4117/richtigrv0.jpg

    and that is what it looks like after refreshing:

    http://www.monstrs.de/wp-content/uploads/2007/09/falsch.jpg

    changing ex to em didn’t change anything :/

    thanks for your help so far, all!

    e: here is a link to a completely new installation. same problem.

    http://monstrs.de/test/

    #60645

    In reply to: Forum Structure

    chrishajer
    Participant

    I found one problem in the CSS. On line 339 of style.css change this:

    padding-left: 2.5ex;

    to this:

    padding-left: 2.5em;

    That will take care of indenting the nested lists. Not sure if that is your problem or not, but it’s something.

    Also, for creating your own theme, you might want the copy the files over to a theme folder under “my-templates”. Then you can switch back to stock if there is a problem, and your theme files will not be overwritten by any upgrades.

    #60578
    chrishajer
    Participant

    1. No security problems most of the time. Every WYSIWYG editor I’ve seen allows the use of certain HTML code, and everything else is stripped away. With any piece of code, there can always be vulnerabilities, WYSIWYG or not. Without a WYSIWYG editor, there can still be cross site scripting and SQL injection errors.

    WYSIWG editor vulnerabilities

    http://www.google.com/search?q=WYSIWYG+editor+vulnerabilities

    2. Yes, it is used in large forums.

    #2381
    mrmacmac
    Member

    Hi there… I’m a vBulletin veteran, but am considering a switch over to bbPress to use in tandom with wordpress. Can anyone out there tell me the advantages of using bbPress compared to vBulletin? Is it just as powerful? Does it tie into WordPress seemlessly?

    I also need to know if some features I require are available in bbPress… Here is my shortlist:

    – Ability to act as forums admin (edit everything)

    – Ability to add moderators to specific forums

    – Custom avatars and signatures for users?

    – Spam and ‘bad word’ filters?

    – Private email/messaging system?

    – Can I create categories/subcategories?

    – Can I create little thumbnails for these categories?

    There’s more but that’s a short list… Any help anyone can give would be greatly appreciated :)

    #60499

    In reply to: Unread Topics

    henrybb
    Member

    That solution seems a bit hackish to me and prone to incompatibility if anything changes in the code, such as a new condition gets added to the query.

    #56760

    In reply to: Plugin: Avatar Upload

    LMD
    Participant

    Thumbnails are now an undocumented feature in version 0.8.3.

    It’s undocumented because I think it ought to be road tested first. To use thumbnails you have to enable the feature in the plugin file itself, it is not configurable in the admin options page.

    1. Open up bb-avatar-upload.php and in the configuration settings class, scroll down to the following section:

    // Use a thumbnail image (hidden feature for now). 1 = yes / 0 = no (default)
    $this->use_thumbnail = 0;
    $this->thumb_width = 25;
    $this->thumb_height = 25;

    Set $this->use_thumbnail to 1 to enable and change the dimensions if desired.

    When enabled, whenever a user uploads an avatar a smaller copy is created with the prefix ‘thumb.‘ So the avatar username.jpg will have a thumbnail called thumb.username.jpg (the file type changes with the avatar file type, so PNG avatars produce PNG thumbnails etc).

    2. You can access the thumbnail image with the following function call:

    echo avatarupload_displaythumb($user->ID);

    An image tag is returned with the class name avatar_thumb.

    <img src="thumb.username.jpg" width="25" height="25" alt="Username" class="avatar_thumb">

    I think that covers everything, let me know if you have any problems.

    #60597
    ozirr
    Member

    Thank you very much to answer the question… And now i will found gallery for wordpress, and integrate it :) Thanks…

    #60483

    In reply to: Installation problem

    chrishajer
    Participant

    Looks like this is wrong in your config.php:

    $bb->uri = 'http://africanloft/forums/';

    should be:

    $bb->uri = 'http://africanloft.com/forums/';

    Looks like you forgot the .com?

    It’s also possible the ('BBDB_HOST', 'localhost') setting is wrong, but I saw the lack of a .com in the source for your page. None of the links on the index page work because they are all pointed to http://africanloft/forums/{whatever}

    #60585
    chrishajer
    Participant

    Can you post the output from phpinfo? That error message comes up when the installation cannot find either the mysql or mysqli extensions. It’s possible PHP was configured without those extensions.

    Create a file (maybe name it info.php or anything.php) and put this into it:

    <?php
    phpinfo();
    ?>

    Go to the location of that file with a web browser (like http://www.yourserver.com/info.php) and that will echo a whole bunch of data back about the PHP installation.

    http://www.php.net/phpinfo

    That would be the first step, seeing if your PHP was compiled with the proper modules for MySQL.

    #56556

    In reply to: Strut Your bbPress!

    stevepowell
    Member

    My bbPress :)

    Computer Help Forum

    #56758

    In reply to: Plugin: Avatar Upload

    fabianzaf
    Member

    Hey louisedade :) Not that I wanna bother you but its a week since I wrote my reply to your post.

    Are you still interested in helping out?

    #60563
    fel64
    Member

    Oh hey. I think the colon syntax works so that the endif comes after all of it, including the else statements. So just try removing the endif;. If that gets unexpected results, can you copy the entire code for that file to http://pastebin.com/ and link it here for me to look at please? In fact, might be best to do that anyway just to make sure.

    #55747

    In reply to: Anonymous posting

    Replace (in anonymous.php):

    add_action('bb_new_post', 'bb_anonymous_posting_add_post_poster');

    function bb_anonymous_posting_add_post_poster($post_id) {

    global $bbdb;

    $name = bb_get_current_user_info( 'name' );

    $bbdb->query("UPDATE $bbdb->posts SET poster_name = '$name' WHERE post_id = '$post_id'");

    }

    with

    add_action('bb_new_post', 'bb_anonymous_posting_add_post_poster');

    function bb_anonymous_posting_add_post_poster($post_id) {

    global $bbdb;

    $name = bb_get_current_user_info( 'name' );

    $bbdb->query("UPDATE $bbdb->posts SET poster_name = '$name' WHERE post_id = '$post_id'");

    $bbdb->query("UPDATE $bbdb->posts SET post_status = '1' WHERE post_id = '$post_id'");

    }

    Now, new Posts are automaticly marked as spam. You can go to your admin area and undelete them (if its not spam) :D

    sorry for my bad english, im german :)

    #60534
    fel64
    Member

    && and || are just two different things. && means both things have to be true for the entire result to be true, || means just one needs to be true for the entire result to be true.

    On a german keyboard I think it’s the capital letter on button just left of backspace. On a spanish layout it should be the one two left of enter, the one that also gives you ^ and [ (if I’m looking at the diagrams right). :)

    #60498

    In reply to: Unread Topics

    fel64
    Member

    There is one thing you can do – there’s a generic query filter that executes every time bbdb makes a query. You could use a regex to get the thread numbers from that. (If you don’t know regexes that well I could write it.)

    Probably no design decision behind that, just an oversight. Go to trac, log in using your details here and create a new ticket requesting this (marking it as an enhancement not bug). Mdawaffle (^^) is busy with wp or something at the moment but when he sees it he’ll probably either implement or discuss at least.

    #60023
    fel64
    Member

    Sounds like no amount of messing with the template could save you from this fate. I have no idea why you would have done this, but have you replaced profile.php in the root of bb with a template file? This is what profile.php should look like. (Your custom templates should go in a my-templates/ folder in root.)

    <?php
    require_once('./bb-load.php');

    bb_repermalink(); // The magic happens here.

    if ( $self ) {
    if ( strpos($self, '.php') !== false ) {
    require($self);
    } else {
    require( BBPATH . 'profile-base.php' );
    }
    return;
    }

    $reg_time = strtotime( $user->user_registered );
    $profile_info_keys = get_profile_info_keys();

    if ( !isset( $_GET['updated'] ) )
    $updated = false;
    else
    $updated = true;

    do_action( 'bb_profile.php_pre_db', $user_id );

    if ( isset($user->is_bozo) && $user->is_bozo && $user->ID != bb_get_current_user_info( 'id' ) && !bb_current_user_can( 'moderate' ) )
    $profile_info_keys = array();

    $posts = get_recent_user_replies( $user_id );
    $threads = get_recent_user_threads( $user_id );

    do_action( 'bb_profile.php', $user_id );

    bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads') );
    ?>

    #2362

    Topic: User ID bug

    in forum Troubleshooting
    amalinow
    Member

    Problem with inserting users.

    Now, I am having a problem where my last insert id on the bb_users table is 10,000,000,430 and the user registration is broken.

    So I have looked at the code in bb-includes/registration-functions.php

    and I’ve found that this line in the bb_send_pass() function is causing trouble:

    $user = (int) $user;

    After this line $user is set to zero, where it was 10,000,000,430 before.

    After examining further, I found numerous places where you had $user = (int) $user;

    It seems like PHP cannot handle the type cast of 10,000,000,430…

    Btw… I do not know why the last_insert_id is 10,000,000,430, seems like something done by the previous website owner. However, looking at the bb_users.ID column it looks like it is BIGINT by default – which is too large for php integers which is only 32 bit signed…

    #60497

    In reply to: Unread Topics

    henrybb
    Member

    Damn!

    There’s no filter for get_thread()! :-/

    Is there any design decision behind not allowing people to hook into that?

    As I said, for a full page of posts (30), I’m updating my readlog 30 times, when all I really need to do is get things upstream at the get_topic() and just take the last dimension of the array and make that the last read post in that given topic for the user.

    It’d save 29 SQL updates per pageload in busy topics.

    So until there’s a hook there, or an epiphany for another spot I could hook into, Unread Topics 0.4 stands as the best I can do solution for indicating what the user has read so far.

    #60533
    ganzua
    Member

    Thanks for the explanation, do you have to put && insted of ||

    “By the way, the backtick ` that indicates code is on the top left button on most English and European characters. :)

    -> sorry for that because I have it quite difficult, I’m using a german keyboard and OS is in Spanish :s

    #60532
    fel64
    Member

    No problem. :)

    Option #3 was a throwaway possibility, not really meant for actual use as it’s rather silly.

    whatever && !is_bbpress() means, literally, that whatever has to be true AND is_bbpress() is not true. The ! operator inverts the boolean meaning, so true becomes false and vice versa. If is_bbpress() is true, ! makes it read as false. If false, it makes it read as true.

    By the way, the backtick ` that indicates code is on the top left button on most English and European characters. :)

    #60528
    ganzua
    Member

    Thanks again fel64,

    I tried the second one because it seemed the easiest to me :) and I think it is working ok.

    This -> ‘ && !is_bbpress() ‘ means “exclude bbpress”, doesn’t it?

    The first one, ” elseif “, is quite interesting -> in my wp custom theme, I turned index.php into a cms which displays what’s new in the whole web, and I created a static page called “blog” to display the “blog” itself.

    Well, with this configuration, whenever you make a is_home statement , the function points to the static page I created and called “blog” and I can’t find the way to make the function to point to my custom index.php main page. Perhaps because the static page I called “blog” has the loop?

    chrishajer
    Participant

    Quick Google turned up this:

    “Fatal error: Trying to clone an uncloneable object of class mysqli – If this error occurs you must turn off the zend.ze1_compatibility_mode setting in your PHP configuration.”

    ini_set('zend.ze1_compatibility_mode', 0);

    #60527
    fel64
    Member

    Actually the function works just fine, you’re just expecting it to work differently. Try using different flow control or rewriting your logic.

    if( blah_is_true() ) {

    } elseif( foo_is_true() ) {

    } elseif( third_thing_is_true() ) {

    } else {
    // default
    }

    The elseifs mean that if a previous if statement was true, none of the successive ones will be tried. That way, if it is bb, it won’t even check if it’s single or a page.

    Alternatively,

    if( ( is_single() || is_page() ) && !is_bbpress() ) {

    }

    will work just fine.

    If you’ve integrated bb into wp that way, of course some of the WP template tags will work that way. If you wanted everything else to return false when you loaded bb, you’d have to do this:

    function adjust_flags_to_bb() {
    global $wp_query;
    $wp_query->init_query_flags();
    }
    add_action('bb_init', 'adjust_flags_to_bb', 999);
    //not sure if that's the right action, but meh

    but that’s really quite unnecessary.

    #60526
    ganzua
    Member

    “What’s the actual problem? How are you using it, what do you expect it to do, what exactly is it doing?”

    ->

    In my wp-bb integration, bbpress is integrated in wordpress and the forum uses the wordpress sidebar. I want to insert advertising blocks in the free space that I have in the bottom of the sidebar.

    I’m trying to use wp conditional tags to display different ad blocks because in some pages I have space enough for one block, and in other pages I have space for two or three blocks.

    In wp single pages I can display at least two 120×600 blocks so I’m using is_single() but I realized that these blocks are appearing in the bbpress forum too! and I just have no space enough for them so I want to change them for a 125×125 block when the forum is displayed or perhaps I could remove all ads when bbpress displayed.

    So “How are you using it” -> after copy/pasting your function in my theme functions file, I inserted this code in my sidebar;

    <?php if (is_bbpress()

    || is_archive()

    ) { ?>

    <!– 125×125 block –>

    <?php } ?>

    <?php if (is_single()

    || is_page()

    ) { ?>

    <!– 160×600 block –>

    <?php } ?>

    “what do you expect it to do” -> showing different ads blocks in the sidebar when bbpress displayed

    “what exactly is it doing” -> is showing the blocks I set for is_single ()

Viewing 25 results - 29,051 through 29,075 (of 32,499 total)
Skip to toolbar