Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 20,901 through 20,925 (of 32,481 total)
  • Author
    Search Results
  • #87483
    sureshdrim
    Participant

    @ kevinjohngallagher

    Hey dude you are genius.My problem is solved.

    But just a small doubt-I made a counter (initial value=0) which will count number of posts in foreach loop (Line 33 of topic.php),if counter is equal to 4 – code for ads – reset counter to 0,else increment counter by 1.This works.Ads are displayed after every 4 posts.But only first two ads are visible rest of the ads are invisible i.e a white space is felt at the place of ads after second ad.

    I just want to ask u,is there any policy of google which doesn’t allow to put ads in a loop or doesn’t allow to display same ad repeatedly on a page ? Any idea about this ?

    #87482

    Line 33 of topic.php has the for loop that goes through all the posts.

    Insert your code there :)

    #34135
    sureshdrim
    Participant

    Hello Guys,

    Is there any way to insert some code between/after every fixed number of posts.

    For Example:If I want to display google Ads after every fourth or sixth post on topic.php page,where can I put Ads code.

    Any help will be really appreciated !!

    #89729

    I don’t think anyone’s against getting the next version of bbPress out the door :)

    My concerns are:

    • If bbPress0.9 support was meant to last until late 2010, why end it in May?
    • Why/When was this decision taken?
    • Why not inform us before the code was deleted?
    • In fact, why not inform us at all?

    Basically:

    Sam wrote, as an employee of Automattic, that bbPress0.9 branch would be maintained until ‘late 2010’, how can this be true if we’ve had patches for 0.9 sitting since July2009 without a rollout, and are now not being released?

    bbPress 1.0.2 and bbPress 0.9.0.6 legacy version released

    That effectively means we’ve not been supporting 0.9 since 0.9.0.6 was released on 28thJuly 2009. Awesome, we supported it for a whole 25 days after 1.0 was released (on 3rd July 2009).

    Thats a heck of a decision to go back on One’s word like that. And a considerable slap in the face to those of us who have forums still stuck on 0.9 due to 1.0’s failings.

    Here’s another issue.

    I don’t think we should update the 0.9 branch anymore, and probably not 1.0 either. (Same as WP.)

    Matt looks at this project as if it’s working in the same way WP is. It’s not. And I think thats why he’s found the “bbPress community” so hard to get a grip on.

    bbPress0.9 and bbpress1.0 are very very different. It’s not a simple upgrade in the way that many versions of WordPress have been – it’s a total and utter rewrite of the backend to use external code being run by a totally different team as an independant product.

    bbPress0.9 and bbPress1.0, whichever you prefer to work with, are not incremental releases in the traditional sense – they are very close to being different products. That was reflected in the communities strong desire to have support for bbPress0.9 extended when Sam asked us. Thats right folks, we were asked and voted. Then a decision was made. And thats the crux of the problem.

    Saying one thing, doing another, then not mentioning it in the hope no-one notices until weeks after – man, thats just not cool. And the kicker is, I don’t think it’s intentional at all. That’s worse though, because it means we’re a total afterthought (maybe not even an afterthought).

    If the decision was made to drop 0.9 support, all someone had to do was make a blog post, or a forum sticky before hand and give folks a heads up. Why is it so hard to treat us with any respect?

    Those of us who can’t write brilliant code, attempt to do our best by answering questions on the forums. My plugins will never rival some of _ck_s / Nightgunners / Zaerls. Thats a good thing. My code will never be as good for the Core as Gautam / Sam / mdwaffe. Thats even better news. But really, how can we answer questions that people ask with any certainty at all, when things like this happen (constatly)?

    Help us, help you!

    please.

    #89283
    _ck_
    Participant

    Okay I think I found a fix – we simply have to bypass the malfunctioning secure_auth method in 1.x and just use the regular auth cookie. It’s what’s fighting us as soon as it detects SSL mode.

    So add this to the bottom of the plugin for 1.x

    function bb_validate_auth_cookie( $cookie = '', $scheme = 'auth' ) {
    global $wp_auth_object;
    return $wp_auth_object->validate_auth_cookie( $cookie, $scheme );
    }

    Test it carefully of course.

    view: http://pastebin.com/embed_iframe.php?i=wSYPsdjT

    download: http://pastebin.com/download.php?i=wSYPsdjT

    #89519
    Elias
    Member

    Ouch, “minor errors” and “Forums not installed” isn’t exactly user-friendly…

    I suspect the installer script wasn’t able to create the file bb-config.php caused by too restrictive permissions in the directory bbPress is installed in. To create this file, the directory have to be writeable for the user running the webserver. If this is the cause of this failure (look for a file bb-config.php in the bbPress directory, if it is missing, it is the problem), just give the directory 0777 permissions before starting the installation. After the installation completed, the permissions can be (and should be) set more restrictive.

    #89728
    ckeck
    Member

    Yes, lets get 1.1 out the door please :)

    #89762

    In reply to: Custom Theme

    Glad it helped mate.

    If building your own theme, I’d advice making a wordpress theme first.

    The technique is the same and once you’re in the right mindset, you’d be amazed hoe easy theming bbPress is. But you will/might hit a few roadblocks if you try and pull data in a differnet way. Don’t be peturbed, just come back and ask :)

    #89670

    At the current rate of maximum of 1 release a year… no idea, sorry.

    That said, there are some really good people working on it, so just add your bug report to http://trac.bbpress.org and someone with the technical know how will look at it eventually :)

    #89669
    driz
    Member

    Would work as a quick fix. But would much rather use built-in code etc. Any ideas how long this bug will take to fix?

    #89668

    Kool and the gang. We’re one step closer.

    EDIT: Yes, you’re partly right. I get the same. Ok, thats a bug. Well done!

    When logged out, visiting a user’s profile page the default avatar is replaced with the profile owner’s avatar.

    That said my code above definately works to not display the gravatar if you’re logged out, insteadyou can display any image you want.

    if (empty($bb_current_user) || $bb_current_user == 0)

    {

    echo "create an image output here to any image on yoru server";

    } else {

    echo bb_get_avatar($bb_current_user->ID, 100);

    }

    kieranyo
    Member

    Thanks for the constructive crit :)

    Yeah it’s going really well.

    #89666

    Cameron, you “build awesome websites”… look at the source code. It’s a lovely well formatted multidimentional array. It’s not a mess, it’s the most concise and beautiful debugging tool you’ll ever have. Trust me, you’ll love it bro :)

    When you go to a profile page, what does the array say? (don’t post it)

    Does it say the information of the logged in user, or the person who’s profile page you’re on?

    No matter where I go, on the site, I get the informaiton of the logged in user. If you don’t, then you’ve found a bug.

    This code here should solve the logged in/out issue – though there is probably a better way to handle it :)

    if (empty($bb_current_user) || $bb_current_user == 0)

    {

    echo "<img src='grey_man'>";

    } else {

    echo bb_get_avatar($bb_current_user->ID, 100);

    }

    #89665

    Coolio, right mate, first thing, edit that to delete your email :)

    I’ll write more , just wanted to get you that asap

    #89664
    driz
    Member

    If I’m not logged in then that code shows 0 but when I visit the profile page of a user the avatar will change to that of the profile I’m viewing.

    If I’m logged in then I get the following mess:

    BP_User Object ( [data] => stdClass Object ( [ID] => 1 [user_login] => cameron [user_pass] => $P$B1pN/b8ZvQpPDtPILqpJCPqT4M4F0f/ [user_nicename] => cameron [user_email] => EMAILREMOVED [user_url] => http://www.paperviewmagazine.com/members/cameron/ [user_registered] => 2010-04-16 22:27:31 [user_activation_key] => [user_status] => 0 [display_name] => Cameron [spam] => 0 [deleted] => 0 [aim] => [yim] => [jabber] => [use_ssl] => 0 [nickname] => Cameron [chat_hide] => true [mini_track] => Sat, 12 Jun 2010 04:39:24 -0700 [first_name] => Cameron [description] => This is some information about me [admin_color] => fresh [rich_editing] => true [primary_blog] => 2 [last_activity] => 2010-06-14 14:53:08 [source_domain] => www.paperviewmagazine.com [pvwp_user_level] => 10 [bp_latest_update] => Array ( [id] => 1 [content] => Test status message ) [bb_user_settings] => m0=c&m1=c [pvwp_4_user_level] => 0 [pvwp_1_user_level] => 1 [pvbb_capabilities] => Array ( [keymaster] => 1 [throttle] => 1 ) [capabilities] => Array ( [keymaster] => 1 [throttle] => 1 ) [pvwp_7_user_level] => 0 [pvwp_capabilities] => Array ( [administrator] => 1 ) [comment_shortcuts] => false [pvwp_6_user_level] => 0 [pvwp_5_user_level] => 0 [pvwp_8_user_level] => 0 [pvwp_2_user_level] => 0 [pvwp_3_user_level] => 0 [pvwp_12_user_level] => 10 [pvwp_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=o&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=c&m12=c&m13=c&m4=c [pvwp_13_user_level] => 10 [pvwp_11_user_level] => 10 [pvwp_10_user_level] => 10 [pvwp_1_capabilities] => Array ( [contributor] => 1 ) [pvwp_8_capabilities] => Array ( [administrator] => 1 ) [pvbb_topics_replied] => 13 [topics_replied] => 13 [pvwp_6_capabilities] => Array ( [administrator] => 1 ) [pvwp_7_capabilities] => Array ( [administrator] => 1 ) [pvwp_3_capabilities] => Array ( [administrator] => 1 ) [pvwp_4_capabilities] => Array ( [administrator] => 1 ) [pvwp_2_capabilities] => Array ( [administrator] => 1 ) [pvwp_5_capabilities] => Array ( [administrator] => 1 ) [bp_liked_activities] => Array ( [1] => activity_liked [3] => activity_liked ) [pvwp_7_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=c&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=c&m12=o&m13=c&m4=c [pvwp_11_capabilities] => Array ( [administrator] => 1 ) [pvwp_13_capabilities] => Array ( [administrator] => 1 ) [pvwp_10_capabilities] => Array ( [administrator] => 1 ) [pvwp_12_capabilities] => Array ( [administrator] => 1 ) [pvwp_3_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=o&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=o [pvwp_4_user-settings] => m5=c&m6=c&m9=c&m0=o&m10=c&m8=c&m7=c&m1=c&m2=c [pvwp_2_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=c&m7=c&m1=c&m2=o&editor=tinymce&hidetb=1&m11=c&m3=c&m12=c&m13=c&m4=c [bb_user_settings_time] => 1276463427 [pvwp_10_user-settings] => m5=c&m6=c&m9=o&m0=c&m10=c&m8=c&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=o&m3=o&m12=c [screen_layout_dashboard] => 1 [metaboxhidden_dashboard] => Array ( [0] => dashboard_recent_comments [1] => dashboard_incoming_links [2] => dashboard_plugins [3] => dashboard_quick_press [4] => dashboard_recent_drafts [5] => dashboard_primary [6] => dashboard_secondary ) [metaboxhidden_nav-menus] => Array ( [0] => add-post [1] => add-post_tag ) [pvwp_user-settings-time] => 1276464114 [nav_menu_recently_edited] => 3 [meta-box-order_dashboard] => Array ( [normal] => dashboard_right_now,dashboard_recent_comments,dashboard_incoming_links,dashboard_plugins,dashboard_quick_press,dashboard_recent_drafts,dashboard_primary,dashboard_secondary [side] => [column3] => [column4] => ) [pvwp_2_user-settings-time] => 1275215993 [pvwp_7_user-settings-time] => 1275772159 [pvwp_4_user-settings-time] => 1271497216 [closedpostboxes_dashboard] => Array ( ) [pvwp_3_user-settings-time] => 1275065270 [pvwp_10_user-settings-time] => 1274906535 [managenav-menuscolumnshidden] => Array ( [0] => link-target [1] => css-classes [2] => xfn [3] => description ) [pvwp_dashboard_quick_press_last_post_id] => 51 [pvwp_7_dashboard_quick_press_last_post_id] => 6 [pvwp_3_dashboard_quick_press_last_post_id] => 63 [pvwp_10_dashboard_quick_press_last_post_id] => 3 ) [ID] => 1 [id] => 1 [caps] => Array ( [keymaster] => 1 [throttle] => 1 ) [cap_key] => pvbb_capabilities [roles] => Array ( [0] => keymaster ) [allcaps] => Array ( [use_keys] => 1 [administrate] => 1 [moderate] => 1 [participate] => 1 [keep_gate] => 1 [import_export] => 1 [recount] => 1 [manage_options] => 1 [manage_themes] => 1 [manage_plugins] => 1 [edit_users] => 1 [manage_tags] => 1 [edit_others_favorites] => 1 [manage_forums] => 1 [delete_forums] => 1 [delete_topics] => 1 [close_topics] => 1 [stick_topics] => 1 [move_topics] => 1 [view_by_ip] => 1 [edit_closed] => 1 [edit_deleted] => 1 [browse_deleted] => 1 [edit_others_tags] => 1 [edit_others_topics] => 1 [delete_posts] => 1 [throttle] => 1 [ignore_edit_lock] => 1 [edit_others_posts] => 1 [edit_favorites] => 1 [edit_tags] => 1 [edit_topics] => 1 [edit_posts] => 1 [edit_profile] => 1 [write_topics] => 1 [write_posts] => 1 [change_password] => 1 [read] => 1 [keymaster] => 1 ) [first_name] => Cameron [last_name] => [user_login] => cameron [user_pass] => $P$B1pN/b8ZvQpPDtPILqpJCPqT4M4F0f/ [user_nicename] => cameron [user_email] => EMAILREMOVED [user_url] => http://www.paperviewmagazine.com/members/cameron/ [user_registered] => 2010-04-16 22:27:31 [user_activation_key] => [user_status] => 0 [display_name] => Cameron [spam] => 0 [deleted] => 0 [aim] => [yim] => [jabber] => [use_ssl] => 0 [nickname] => Cameron [chat_hide] => true [mini_track] => Sat, 12 Jun 2010 04:39:24 -0700 [description] => This is some information about me [admin_color] => fresh [rich_editing] => true [primary_blog] => 2 [last_activity] => 2010-06-14 14:53:08 [source_domain] => www.paperviewmagazine.com [pvwp_user_level] => 10 [bp_latest_update] => Array ( [id] => 1 [content] => Test status message ) [bb_user_settings] => m0=c&m1=c [pvwp_4_user_level] => 0 [pvwp_1_user_level] => 1 [pvbb_capabilities] => Array ( [keymaster] => 1 [throttle] => 1 ) [capabilities] => Array ( [keymaster] => 1 [throttle] => 1 ) [pvwp_7_user_level] => 0 [pvwp_capabilities] => Array ( [administrator] => 1 ) [comment_shortcuts] => false [pvwp_6_user_level] => 0 [pvwp_5_user_level] => 0 [pvwp_8_user_level] => 0 [pvwp_2_user_level] => 0 [pvwp_3_user_level] => 0 [pvwp_12_user_level] => 10 [pvwp_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=o&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=c&m12=c&m13=c&m4=c [pvwp_13_user_level] => 10 [pvwp_11_user_level] => 10 [pvwp_10_user_level] => 10 [pvwp_1_capabilities] => Array ( [contributor] => 1 ) [pvwp_8_capabilities] => Array ( [administrator] => 1 ) [pvbb_topics_replied] => 13 [topics_replied] => 13 [pvwp_6_capabilities] => Array ( [administrator] => 1 ) [pvwp_7_capabilities] => Array ( [administrator] => 1 ) [pvwp_3_capabilities] => Array ( [administrator] => 1 ) [pvwp_4_capabilities] => Array ( [administrator] => 1 ) [pvwp_2_capabilities] => Array ( [administrator] => 1 ) [pvwp_5_capabilities] => Array ( [administrator] => 1 ) [bp_liked_activities] => Array ( [1] => activity_liked [3] => activity_liked ) [pvwp_7_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=c&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=c&m12=o&m13=c&m4=c [pvwp_11_capabilities] => Array ( [administrator] => 1 ) [pvwp_13_capabilities] => Array ( [administrator] => 1 ) [pvwp_10_capabilities] => Array ( [administrator] => 1 ) [pvwp_12_capabilities] => Array ( [administrator] => 1 ) [pvwp_3_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=o&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=c&m3=o [pvwp_4_user-settings] => m5=c&m6=c&m9=c&m0=o&m10=c&m8=c&m7=c&m1=c&m2=c [pvwp_2_user-settings] => m5=c&m6=c&m9=c&m0=c&m10=c&m8=c&m7=c&m1=c&m2=o&editor=tinymce&hidetb=1&m11=c&m3=c&m12=c&m13=c&m4=c [bb_user_settings_time] => 1276463427 [pvwp_10_user-settings] => m5=c&m6=c&m9=o&m0=c&m10=c&m8=c&m7=c&m1=c&m2=c&editor=tinymce&hidetb=1&m11=o&m3=o&m12=c [screen_layout_dashboard] => 1 [metaboxhidden_dashboard] => Array ( [0] => dashboard_recent_comments [1] => dashboard_incoming_links [2] => dashboard_plugins [3] => dashboard_quick_press [4] => dashboard_recent_drafts [5] => dashboard_primary [6] => dashboard_secondary ) [metaboxhidden_nav-menus] => Array ( [0] => add-post [1] => add-post_tag ) [pvwp_user-settings-time] => 1276464114 [nav_menu_recently_edited] => 3 [meta-box-order_dashboard] => Array ( [normal] => dashboard_right_now,dashboard_recent_comments,dashboard_incoming_links,dashboard_plugins,dashboard_quick_press,dashboard_recent_drafts,dashboard_primary,dashboard_secondary [side] => [column3] => [column4] => ) [pvwp_2_user-settings-time] => 1275215993 [pvwp_7_user-settings-time] => 1275772159 [pvwp_4_user-settings-time] => 1271497216 [closedpostboxes_dashboard] => Array ( ) [pvwp_3_user-settings-time] => 1275065270 [pvwp_10_user-settings-time] => 1274906535 [managenav-menuscolumnshidden] => Array ( [0] => link-target [1] => css-classes [2] => xfn [3] => description ) [pvwp_dashboard_quick_press_last_post_id] => 51 [pvwp_7_dashboard_quick_press_last_post_id] => 6 [pvwp_3_dashboard_quick_press_last_post_id] => 63 [pvwp_10_dashboard_quick_press_last_post_id] => 3 )

    #89663

    I am mate, the function bb_get_avatar() returns either your Gravatar or the default gravar that you specified in your admin section under Settings / Discussion.

    In order for that to happen you have to type in the code I’ve given you above. I’ve got it working right now, i’m looking at it.

    It’s not working for you for some reason I can’t replicate, so you need to debug the array and look to se what’s happening with print_r($bb_current_user) – and we’ll try from there.

    #89661

    offs – my bad, i’m so sorry.

    I mean print_r been swapping languages too much this weekend.

    On my version, the avatar I get shown on every page is my own, even other profiles.

    I actually haven’t written the code to get teh grey man, just to test/output my own avatar.

    #89660
    driz
    Member

    that code throws an error Call to undefined function print_f()

    The avatar shows correct every but when viewing the profile page, it’s as though bbPress treats that as the current user and changes the avatar.

    You say you get your own avatar when viewing a profile, what happens if you view the same profile but logged out? Do you get mystery man or the profiles avatar?

    #89659

    I can’t replicate that I’m afraid.

    I’m looking at the profile page of a different user and I’m getting my own Avatar.

    add this before your code and read the output:

    print_f($bb_current_user)

    It should give you a bit of insight.

    #89724
    chrishajer
    Participant

    I asked Matt 3 weeks or so ago if we should release 1.0.3 or 1.1 (and what to do with the couple patches in the 0.9 branch) and this was his response:

    I don’t think we should update the 0.9 branch anymore, and probably not 1.0 either. (Same as WP.) If 1.1 is ready let’s get it out the door. :)

    #89742

    In reply to: Theming the ajax

    Oh, thats a good workaround too Gautam; i didn’t know if they got parsed by the MO or not, as they’re in the front-end.

    EDIT: MO, not PO. D’oh :)

    #89598
    Gautam Gupta
    Participant

    1) When is 1.0.3 coming out. Seriously. What day? (when I check the “bbpress company blog” I seem to only see hacked up IRC chat logs from 5 months back… so much for “official sounding” posts, huh!)

    I had sent a mail to Matt a few hours back, lets wait for sometime.

    2) Who (names?) has editing rights to bbpress.org?

    Chris (I am not sure), matt, mdawaffe.

    3) Is bbpress definitely becoming a WP plugin?

    There are 90% chances for this.

    4) If bbpress becomes a WP plugin, will it also remain standalone?

    5) How will bbpress plugins be integrated into a proposed WP plugin?

    As bbPress is not in the plugin phase, there is no roadmap for this (for the time being). Also check https://bbpress.org/forums/topic/bbpress-as-a-wordpress-plugin-thoughts

    6) What exactly is backpress, and what is it’s status?

    Check http://backpress.org/ There were also some developments in it about 2 weeks back.

    7) Who (names?) is in charge of updates/commits/releases for bbpress at this moment?

    Matt, mdawaffe, filosofo (inactive), chrishajer. Don’t know about anyone else.

    8) How can plugin devs update their bbpress plugins and stay in touch with higher ups?

    What do you mean by “higher ups”?

    #89750

    If you’re looking for a bit more control over things, you could do this:

    $global $bb_current_user;

    $profile_link = get_user_profile_link( $bb_current_user->ID );

    $profile_avatar = bb_get_avatar($bb_current_user->ID, 100);

    Ok, it’s not letting me put links in, but that’ll allow you to output the code as you wish :)

    #89657

    Ok, “$user” is blank/empty for some reason, it’s not even a global that needs to be redefined. I’m sure I’ve fixed this elsewhere, let me hunt around some of my forums and get back to you :)

    EDIT: it’s $bb_current_user

    Apparently, we wanted to be as different from wordpress as possible ;-)

    global $bb_current_user;

    echo bb_get_avatar($bb_current_user->ID, 100);

    #89656
    driz
    Member

    Thanks, those worked great. Had to change the author link though as that function spits out the anchor tags itself.

    I used this if anyone is interested:

    <a href="<?php user_profile_link( $topic->topic_last_poster ); ?>"><?php topic_last_poster(); ?></a>

    Another quick question though, I’m try to show the gravatar for a logged in user in the header and the mystery man if not logged in. This is teh code I have so far, but it’s not working very well, it always shows the mystery man and shows the avatar of the profile your viewing and not the logged in user.

    <?php if ( $avatar = bb_get_avatar( $user->ID,$size='48' ) ) : ?>
    <?php echo $avatar; ?>
    <?php unset($avatar); endif; ?>

    Thanks

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