Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,076 through 10,100 (of 32,519 total)
  • Author
    Search Results
  • #154942
    Stephen Edgar
    Keymaster

    Just like any normal spam attack, automated scripting, because the codex was “open” to anyone with a wordpress.org account that was all that was needed to create (or edit) any pages on the codex 🙁

    I’ll make sure we add yourself to that said list of users with permissions though 🙂

    izzyian
    Participant

    How can I add a button next to favorite and subscribe buttons on a forum post? Iv searched everywhere and cant find a similar question. Is there a functions code I could add?

    #154934
    Robin W
    Moderator

    @derock299 – sorry I don’t offer Skype support for this plugin, sorry but I have too much else on 🙂

    Private groups would limit them, but you would need to set this manually after registration.

    so you would have sitewide forums and general chats with no restrictions.

    Then you would set the ‘year’ forums up to belong to a ‘year’ group so you would have the 91 forum set up a group name 91.

    A user registering would not have access to or see the existence any of the private group restricted forums, so on registration would just see the [edit] public forums.

    Then after registration you would simply edit that user to add them to say the 91 group, and they would see the 91 forums or forums (and obviously the open forums) and no other restricted ones.

    I would suspect that automating this would allow anyone to register and immediately get access to a ‘year’ forum, or register multiple times and get access to lots of years, defeating the restriction, so manual adding (allowing your to verify) should be fine.

    Howveer if you want this automated, you would need to email me via my website http://www.rewweb.co.uk but it might be expensive to code (I’d need to work that out) or try http://jobs.wordpress.net/

    #154932
    Robin W
    Moderator

    You can set all this in the forum

    So if you go into dashboard>forums>all forums and edit for each forum in turn

    On the right hand side you’ll see

    Parent
    Order

    For your top level forums (eg farm machinery), have no parent and then just type in the order you want, so first top forum will be order 1, second order 2 etc.

    For sub forums, they will have a parent, but again you just set the order, eg Machinery for sale would be order 1 and Machinery wanted order 2

    By the by if you want you subforums to be vertical and/or to take away the (0,0) then see

    Layout and functionality – Examples you can use

    #154931
    robertosalemi
    Participant

    Wordpress 4.0
    bbPress 2.5.4

    Hi,
    in admin toolber, I would disable the section about buddyPress, I detected it by css code:
    ul#wp-admin-bar-my-account-buddypress.

    Can I hide it?

    Thanks.

    #154924
    robertosalemi
    Participant

    Resolved, I was working with wrong function.

    My solution:

    function add_bbp_display_forum_description_2() {
    
    	$custom_msg = '';
    	
    	if ( !is_user_logged_in() )
    	{ 
    		$custom_msg = 'You must be logged in to see all topics.';
    	}
    	
         echo $custom_msg;
    }
    
    add_action( 'bbp_template_before_single_forum', 'add_bbp_display_forum_description_2' );

    Thanks!

    #154919
    robertosalemi
    Participant

    Wordpress 4.0
    bbPress 2.5.4

    Hi,
    in the function ‘bbp_get_single_forum_description’, I would concat a message for user not logged in.

    I wrote:

    add_action( 'bbp_get_single_forum_description', 'msg_for_user_loggedin' );
    add_action( 'bbp_get_single_topic_description', 'msg_for_user_loggedin' );
    
    function msg_for_user_loggedin( $args = '' ) {
    	if ( !bb_is_user_logged_in() )
    	{ 
    		$custom_msg = "You must be logged in to see all topics.";
    	}
    	else 
    	{
    		$custom_msg = "";
    	}
    	
         echo $custom_msg . bbp_get_single_forum_description( $args );
    }

    But it not works, why?

    Thanks.

    #154915
    robertosalemi
    Participant

    Hi,
    in my forum, I created public and private topics.

    I’m using the shortcode:
    [ bbp-forum-index ]
    for show my topics.

    Can I show only the title of private topic, anche when user click on it goes on the 404 error page with login form?

    Thanks.

    #154900
    shabus
    Participant

    Hi,

    I have a problem where pagination is not working in my theme.

    I am doing template redirect in function.php to template file of forum, topic or reply if URL is like http://domain/forums/…
    Right templates are loaded and right content is shown, but pagination is not working, first page is always shown/loaded.
    Pagination appends …/page/{page}/ to URL when page is selected, but always first page of data loads.
    I have tried to set page manually, among others, $bbpressInstance->forum_query->paged, but no luck.

    My question is, how and where to set page that should be loaded, and how to track where is the problem. Because problem is in my theme, pagination works in WP default themes.
    How to debug this?

    I am on deadline, but stuck on this basic feature and should appreciate some pointers how to debug this.

    BBPress forum is included in my template file through shortcode
    echo do_shortcode('[bbp-single-forum id='.$id.']');
    Topics are included like
    echo do_shortcode ( '[bbp-single-topic id=' . $id . ']' );
    And Replays like
    echo do_shortcode ( '[bbp-single-reply id=' . $id . ']' );

    #154895

    In reply to: Deeper capabilities

    Stephen Edgar
    Keymaster

    All vast majority of your sugestions are already included in bbPress 2.x

    See this codex doc for an overview of bbPress’ roles and capabilities 🙂

    #154883
    Nicolas Korobochkin
    Participant

    @schrully BTW some hosting providers block connects to external SMTP servers (for example – BlueHost) and your Error Type: SMTP show that your server can’t connect to SMTP server.

    #154880
    Robkk
    Moderator

    @izzyian

    you just do it like how i did it.

    by editing the template loop-single-reply.php that was in my bbpress folder in my child theme

    separate the role from the rest of the bbp_reply_author_link

    like this

    <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => false ) ); ?>

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user)  || $role == 'bbp_moderator'  ) {
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
             }
    ?>
    #154873

    In reply to: Photo in Latest posts

    Robkk
    Moderator

    in this code you pasted it looks like the exact code to display the avatars is already there.

    maybe you didnt install the template files right??

    wherever you see something like this below , this is what should be displaying the avatar

    ‘size’ => 14

    this is complete started by section showing the started by author avatar

    <?php do_action( ‘bbp_theme_before_topic_started_by’ ); ?>
    
    <?php
    if (class_exists(‘userpro_api’)) {
    /* Integrating UserPro */
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id() ),
    bbp_get_topic_author_link( array( ‘size’ => 14 ) ) );
    } else {
    $link = bbp_get_topic_author_link( array( ‘size’ => ’14’ ) );
    }
    ?>
    
    <span class=”bbp-topic-started-by”><?php printf( __( ‘Started by: %1$s’, ‘bbpress’ ), $link ); ?></span>
    
    <?php do_action( ‘bbp_theme_after_topic_started_by’ ); ?>

    this is the complete freshness section showing the author avatar

    <?php do_action( ‘bbp_theme_before_topic_freshness_author’ ); ?>
    <?php
    if (class_exists(‘userpro_api’)) {
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id( bbp_get_topic_last_active_id() ) ), bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 30 ) ) );
    } else {
    $link = bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 14 ) );
    }
    ?>
    
    <span class=”bbp-topic-freshness-author”><?php echo $link; ?></span>
    
    <?php do_action( ‘bbp_theme_after_topic_freshness_author’ ); ?>
    #154862
    digiblogger
    Participant

    Hello Everybody.

    I hope you understand my “german Englisch”.

    I tried many many membership and capability plugins to empower bbpress. But with no success.
    This is because bbpress has capabilities, but don´t used them the right way.

    I am not a developer, so I don´t know, if everything I suggest is possible or not. But I know, for some of these features, that it worked for former versions of bbpress with plugins that are outdated for years.

    What bbpress really needs are capabilities in this way (marking new capabilites with (*)):
    When talking about forums, I mean forums and categories.

    Forums/Categories

    can_see_forum
    can_see_thread

    Threads

    can_create_topic_in_forum (*)
    can_edit_owntopic_in_forum (*)
    can_edit_anytopic_in_forum (*)
    can_delete_owntopic_in_forum (*)
    can_delete_anytopic_in_forum (*)

    Replies

    can_create_reply_in_forum (*)
    can_edit_ownreply_in_forum (*)
    can_edit_anyreply_in_forum (*)
    can_delete_ownreply_in_forum (*)
    can_delete_anyreply_in_forum (*)

    Moderators/Admins

    Capabilites to create, edit, delete, move or split forums, threads and replies.

    With these capabilites, bbpres itself or every capability addon could add members or groups to forums and categories.

    This would make bbpress more like full featured forum software (vbulletin, burning board, phpbb and other) than it ever was.

    I asked a developer a long time ago, how long it would take to build an extension or add this to the bbpress core features.

    He said something like: BBPress is well coded. I think, adding these capabilities and rules to forums, adding some metaboxes for assigning groups, members or capabilites to forums post types.. I think a good developer could do this in no time.

    Well… he is specialized in another section of wordpress plugins and not interested in creating for bbpress. But I think, every wordpress user and forum lover would love these features.

    And I think, this is also a great way to prevent spam in forums. on non-english websites, most spam plugins block users that are definetly no spammers, because they search for things, that are not present in non english languages.

    Hoping for feedback and… hope this can be realized.

    Plugins I tried:
    – press permit
    – advanced access manager
    – advanced capabilites manager
    – s3members
    – members
    – and many many more (used keyword in wp repo: bbpress, member, access, restrict, capability, capablites, read, write, permission and more)

    Hope for positive feedback

    Digi

    #154860
    Paolo
    Participant

    I’ve found this on github and modified it a bit.

    //Close forum topics inactive for more than 30 days
    
    add_action('bbpress_daily_event', 'bbpress_close_old_topics');
    function bbpress_topic_scheduler() {
    wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
    }
    function bbpress_close_old_topics() {
    // Auto close old topics
    $topics_query = array(
    'author' => 0,
    'show_stickies' => false,
    'parent_forum' => 'any',
    'post_status' => 'publish',
    'posts_per_page' => -1
    );
    if ( bbp_has_topics( $topics_query ) )
    while( bbp_topics() ) {
    bbp_the_topic();
    $topic_id = bbp_get_topic_id();
    $last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
    if ($last_active < strtotime( '-30 days') )
    bbp_close_topic( $topic_id );
    }
    }
    

    I’m using it on the support forum of our Business directory plugin.

    Hope you can find it useful too.

    Thx

    #154852

    In reply to: Photo in Latest posts

    Icaroferreira
    Participant

    Thank you.

    So, Please, where exactly I should enter these codes above, within my code I have in the folder: loop-single-topic.php

    see:

    <?php

    /**
    * Topics Loop – Single
    *
    * @package bbPress
    * @subpackage Theme
    */

    ?>

    <ul id=”bbp-topic-<?php bbp_topic_id(); ?>” <?php bbp_topic_class(); ?>>

    <li class=”bbp-topic-title”>

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

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

    <span class=”bbp-row-actions”>

    <?php do_action( ‘bbp_theme_before_topic_favorites_action’ ); ?>

    <?php bbp_topic_favorite_link( array( ‘before’ => ”, ‘favorite’ => ‘+’, ‘favorited’ => ‘×’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_favorites_action’ ); ?>

    </span>

    <?php elseif ( bbp_is_subscriptions() ) : ?>

    <span class=”bbp-row-actions”>

    <?php do_action( ‘bbp_theme_before_topic_subscription_action’ ); ?>

    <?php bbp_topic_subscription_link( array( ‘before’ => ”, ‘subscribe’ => ‘+’, ‘unsubscribe’ => ‘×’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_subscription_action’ ); ?>

    </span>

    <?php endif; ?>

    <?php endif; ?>

    <?php do_action( ‘bbp_theme_before_topic_title’ ); ?>

    “><?php bbp_topic_title(); ?>

    <?php do_action( ‘bbp_theme_after_topic_title’ ); ?>

    <?php bbp_topic_pagination(); ?>

    <?php do_action( ‘bbp_theme_before_topic_meta’ ); ?>

    <p class=”bbp-topic-meta”>

    <?php do_action( ‘bbp_theme_before_topic_started_by’ ); ?>

    <?php
    if (class_exists(‘userpro_api’)) {
    /* Integrating UserPro */
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id() ),
    bbp_get_topic_author_link( array( ‘size’ => 14 ) ) );
    } else {
    $link = bbp_get_topic_author_link( array( ‘size’ => ’14’ ) );
    }
    ?>

    <span class=”bbp-topic-started-by”><?php printf( __( ‘Started by: %1$s’, ‘bbpress’ ), $link ); ?></span>

    <?php do_action( ‘bbp_theme_after_topic_started_by’ ); ?>

    <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>

    <?php do_action( ‘bbp_theme_before_topic_started_in’ ); ?>

    <span class=”bbp-topic-started-in”><?php printf( __( ‘in: %2$s‘, ‘bbpress’ ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>

    <?php do_action( ‘bbp_theme_after_topic_started_in’ ); ?>

    <?php endif; ?>

    </p>

    <?php do_action( ‘bbp_theme_after_topic_meta’ ); ?>

    <?php bbp_topic_row_actions(); ?>

    <li class=”bbp-topic-voice-count”><?php bbp_topic_voice_count(); ?>

    <li class=”bbp-topic-reply-count”><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?>

    <li class=”bbp-topic-freshness”>

    <?php //bbp_topic_freshness_link(); ?>

    <p class=”bbp-topic-meta”>

    <?php do_action( ‘bbp_theme_before_topic_freshness_author’ ); ?>
    <?php
    if (class_exists(‘userpro_api’)) {
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id( bbp_get_topic_last_active_id() ) ), bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 30 ) ) );
    } else {
    $link = bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 14 ) );
    }
    ?>

    <span class=”bbp-topic-freshness-author”><?php echo $link; ?></span>

    <?php do_action( ‘bbp_theme_after_topic_freshness_author’ ); ?>

    </p>

    <!– #bbp-topic-<?php bbp_topic_id(); ?> –>

    #154848
    sidelancer
    Participant

    The template did change to the new php file, but removing the code did not remove the ad unfortunately. I tried removing other code but nothing seems to affect it.

    edit: I’d love to just hide the ad with CSS, but the problem is that is against google policy.

    #154844
    Robin W
    Moderator

    I suspect it is the loop-single-forum template

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original

    then

    remove lines 20 and 24

    line 20

    <?php do_action( 'bbp_theme_before_forum_subscription_action' ); ?>
    

    line 24

    <?php do_action( 'bbp_theme_after_forum_subscription_action' ); ?>
    

    come back if that doesn’t work

    #154841
    izzyian
    Participant

    @robin-w

    Hi, no this does not work :

    function role_show ($args) {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' )

    This is a screen shot of that result :
    http://bitfiu.com/wp-content/uploads/2014/11/functions-picture.png

    #154838
    Stephen Edgar
    Keymaster

    Sounds great, have at it 🙂

    Check out and edit the Google doc here.

    General guidelines on creating new codex articles:

    Codex Standards & Guidelines

    Make a copy of this template for each page you create:
    https://codex.bbpress.org/wp-admin/post.php?post=1767&action=edit

    #154837
    sidelancer
    Participant

    Yep, here it is:

    Adsense Ad

    I’ve looked at it with Firebug, it’s the same header ad that I have showing up on all my other pages (except there it is ABOVE the page, not within it). I also tried putting php code around the ad to stop it on specific page numbers, but that didn’t seem to work either.

    #154835
    Robkk
    Moderator

    i think that these topics should be discussed in a guide for users in the codex.

    How to Moderate in bbPress
    How to Deal with SPAM
    SEO and bbPress
    Common Mistakes to Avoid

    How to Moderate is for users who are brand new to dealing with a forum, and are not sure how to handle it.

    Dealing with SPAM will definitely be useful because alot of users make topics about how to handle it.

    SEO and bbPress , there is some topics about this subject and help optimizing it would be quite useful.

    Common mistakes is useful too so that users know what not to do.

    what do you guys think??

    #154821
    Robkk
    Moderator

    @elenams

    i thought i replied to this one..

    pretty much the plugins stlye.css file will get you headed into styling bbPress the way you want it.

    you copy the style.css file from the bbPress plugin folder and put it into a folder called css in your child theme then edit the new style.css file from there.

    if its just small changes you can also put it into a custom css plugin of your choice.

    more information on styling bbPress can be found in the codex

    Codex

    Robkk
    Moderator

    this is not CSS its mostly PHP

    from what it looks like just copy the templates the userpro plugin author gave you and place it a folder called bbpress in your child theme. the url to it should be wp-content/themes/avada-child/bbpress.

    info on creating a child theme

    https://codex.wordpress.org/Child_Themes

Viewing 25 results - 10,076 through 10,100 (of 32,519 total)
Skip to toolbar