Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,876 through 9,900 (of 32,519 total)
  • Author
    Search Results
  • Robin W
    Moderator

    put this in your functions file

    function rw_custom_freshness_link( $forum_id = 0 ) {
    		$forum_id  = bbp_get_forum_id( $forum_id );
    		$active_id = bbp_get_forum_last_active_id( $forum_id );
    		$link_url  = $title = '';
    
    		if ( empty( $active_id ) )
    			$active_id = bbp_get_forum_last_reply_id( $forum_id );
    
    		if ( empty( $active_id ) )
    			$active_id = bbp_get_forum_last_topic_id( $forum_id );
    
    		if ( bbp_is_topic( $active_id ) ) {
    			$link_url = bbp_get_forum_last_topic_permalink( $forum_id );
    			$title    = bbp_get_forum_last_topic_title( $forum_id );
    		} elseif ( bbp_is_reply( $active_id ) ) {
    			$link_url = bbp_get_forum_last_reply_url( $forum_id );
    			$title    = bbp_get_forum_last_reply_title( $forum_id );
    		}
    
    		$time_since = bbp_get_forum_last_active_time( $forum_id );
    
    		if ( !empty( $time_since ) && !empty( $link_url ) )
    			$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_attr( $title ) . '</a>';
    		else
    			$anchor = esc_html__( 'No Topics', 'bbpress' );
    
    		return apply_filters( 'rw_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
    	}
    	
    	add_filter('bbp_get_forum_freshness_link', 'rw_custom_freshness_link' );

    Functions files and child themes – explained !

    #156116
    Piani
    Participant

    I have tested bbpress forums in diffrent themes. In Techism and Colorway the “Latest post” and “Latest threads” display the users avatar in the widgets.

    But now I am testing twenty twelve and there is no avatar showing in these widgets.

    Please advice where to activate avatars in the widgets or where the CSS code for this is found.

    #156115
    Divine_Apex
    Participant

    Hi! So I’ve created a New Topic page using the shortcode but I can’t seem to figure out the code or where to place the code to add a New Topic button within the forums. I have stumbled across a plugin, but it costs a bit of money and I’d rather not pay for something that should come with the forum in the first place. Any chance someone could give me semi-detailed instructions of where to put a code, and what code to use? I’ve done some searching but can’t really figure it out.

    Thanks

    http://the-divine.net

    #156114
    Divine_Apex
    Participant

    It seems a few of my users when trying to log in or register an account are directed to a white screen that says “Blocked”. It seems to go away eventually, but this has been an on-going issue. I notice it happens when they try using the short-code pages I’ve made, but not so much on the meta links. I don’t seem to get this issue but I am getting many complaints. Also, it seems like this may be related to plugins as I removed certain ones after a complaint and it seemed to fix this issue for a bit, but now it’s back.

    Any idea what’s going on?

    My site: http://the-divine.net

    #156112
    Robkk
    Moderator

    @geekserve

    did it work??

    ill add it to the docs in a minute if it did

    listing this kind of code and putting examples like this is a whole lot easier than talking about spam/security/seo in a doc article.

    #156110

    In reply to: Avatar padding issue

    Robkk
    Moderator

    try this CSS

    #bbpress-forums div.bbp-forum-author img.avatar, 
    #bbpress-forums div.bbp-topic-author img.avatar, 
    #bbpress-forums div.bbp-reply-author img.avatar {
    border: none;
    max-width: 130px;
    padding: 0 0 10px 0;
    margin: 12px auto 0 auto;
    float: none;
    }
    #156108
    Jake Hall
    Participant

    Why has this not been documented anywhere?

    That is probably my biggest problem with bbPress right now, documentation is non-existant. You’ve got to crawl through the plugin code to find what you’re after.

    #156107
    Robkk
    Moderator

    i had this kind of layout one day messing around with bbPress templates in my child theme.

    i think its close to this but i havent tested it to make sure.

    its without the permalinks though , i had permalinks before but right now i just breezing through the templates and trying to find them.

    for the forum loop

    <a href"<?php bbp_forum_last_topic_permalink(); ?>"><?php bbp_forum_last_topic_title(); ?></a>

    for the topic loop

    <a href"<?php bbp_topic_last_reply_permalink(); ?>"><?php bbp_topic_last_reply_title(); ?></a>

    EDIT: added permalinks

    #156101
    Jake Hall
    Participant

    Can I just say, whilst bbPress is a great SSO solution for those wanting to hook up their WordPress with a forum, it is very difficult to get it going how you like it. There is virtually no decent documentation going over anything except the basics.

    I am trying to achieve something relatively simple, however have had to resort to editing the actual plugin itself in an attempt to get it working how I’d like it to be.

    What I am trying to do, is edit the freshness part of bbPress. What do I mean by that? Well, I am trying to edit the following:

    null

    So what I wanted it to do, was display the actual Topic Title. It makes sense, because as default – what has updated? What thread was last updated without having to drill into the forum?

    I also found it bizarre that the title was added within the title tag of the freshness, really? Can we just have some sort of option to allow us to change how things are layed out, or at least create some documentation on how to actually change this without editing the bbPress plugin files (which is what I have had to resort to…)

    My question is, how can I change what is displayed there? Surely there’s a better way around it that doesn’t involve hacking my way through the plugin files.

    Which bbPress file actually changes this? Like I say, absolutely no documentation on what each file does – it is just guesswork………………

    If I am missing something I apologise, but after looking for countless hours I just decided to edit the plugin source to achieve half of what I wanted – still doesn’t help as I would like to change the location of the author picture and time edited and I am not editing the plugin for those.

    Am I being stupid?

    If anyone would like the most recent topic name within the forum to display on the index, you can edit the Plugin source code directly like so:

    if ( !empty( $time_since ) && !empty( $link_url ) )
    			$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $time_since ) . '</a>';
    		else
    			$anchor = esc_html__( 'No Topics', 'bbpress' );
    
    		return apply_filters( 'bbp_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );

    Find that chunk of code within bbpress/includes/forums/template.php and change to the following:

    if ( !empty( $time_since ) && !empty( $link_url ) )
    			$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '</a>';
    		else
    			$anchor = esc_html__( 'No Topics', 'bbpress' );
    
    		return apply_filters( 'bbp_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );

    All we have done here is changed the $time_since to $title. Now you need to re-add the $time_since variable in there somewhere, which is a pain because you may not want it right after the thread title (like myself…)

    #156089

    Topic: Avatar padding issue

    in forum Themes
    Divine_Apex
    Participant

    Hello! I am new to bbpress. I have just made a new site for my clan and I decided to try out WordPress for the first time. Anyway, I’m going to try and keep this short for you guys. So, I have uploaded a theme and right off the bat there was an issue with the padding between the user’s avatar and username display.

    Example:

    View post on imgur.com

    I have plenty of experience with CSS and I’ve been looking through my FTP files to figure out where this issue is occurring but I can’t seem to find it. I would love to get some direction, or possibly a code to add somewhere in my CSS to fix this. Thanks!

    #156085

    In reply to: No spacing in posts.

    Yolle
    Participant

    Hi!

    Thank you for the quick reply. It still does not work. I hope I am applying the correction right – I put the code into bbpress.css and then disabled my CDN and caching so it wouldn’t interfere.

    The link to one of the posts is: http://www.lolabuland.com/forums/topic/madde-lucy-bc-6-month-sweden-participant/#post-24022 (post 24022). The forum is for subscribed users only however. Can you please let me know your email so I can send you the login info? Thanks.

    #156083

    In reply to: No spacing in posts.

    Robkk
    Moderator

    @yolle

    try adding !important to the end.

    like this

    #bbpress-forums .bbp-topic-content p,
    #bbpress-forums .bbp-reply-content p {
    margin-bottom:10px!important;

    if it still doesnt work post a link to a topic or reply post that should have line breaks.

    #156081
    IbrahimC
    Participant

    Hi all!

    I’ve just completed setting up my forums using the shortcode method (implementing shortcode of forum index on a page). I did this because whenever I tried to access the forum index, I would get a blank page.
    Now that I’m finished the development of the forum, I want to use the original index.

    At the moment, thegamingrpt.com/forums works fine thanks to the shortcode. However, thegamingrpt.com/tgrforums only loads a blank page. I used the ‘tgrforums’ root so that I could implement the shortcode on a page called ‘Forums’.

    Basically, I want the original back because my breadcrumb is showing the original forum root and because my theme has a dedicated sidebar to bbPress.

    Hope all this makes sense.
    Thanks.

    #156080

    In reply to: No spacing in posts.

    Yolle
    Participant

    I have the exact same problem.
    Has anybody found a working solution?
    I tried this code :

    #bbpress-forums .bbp-topic-content p,
    #bbpress-forums .bbp-reply-content p {
    margin-bottom:10px;

    but it doesn’t work.
    Thanks

    #156078
    Robkk
    Moderator

    yes you can.

    its used on bbpress.org , its not in button format but yeah

    first you create a new page called New Topic

    put the shortcode [bbp-topic-form] into that page.

    now to create a button , im just going to show you how to create a link with a background so it basically is a button.

    put the text widget in your sidebar

    and put this html in it.

    <a class="bbp-new-topic-button" href="http://yoursite.com/new-topic" "title="Create A New Topic">Create A New Topic</a>

    and put this CSS wherever you can put custom CSS

    a custom css plugin
    jetpack custom css module
    in the bbpress.css file that you could copy to your child theme.
    in your child themes CSS stylesheet

    a.bbp-new-topic-button {
      color: #fff;
      font-size: 24px;
      background: #222;
      padding: 10px 20px;
      border: solid #222 2px;
      text-decoration: none;
    }
    
    a.bbp-new-topic-button:hover {
      color: #222;
      background: #fff;
    }
    #156077
    Robkk
    Moderator

    @attuoz

    i think you can put that sample code in your functions.php in a child theme or functionality plugin.

    #156073
    Robin W
    Moderator

    try my plugin

    bbp additional shortcodes

    I think it will fit what you request

    #156070
    bog1
    Participant

    Hi,

    i am searching for a plugin which restrict user registrations.

    I only want users to be able to register when they provide a valid “code” in the registration form.

    Is this possible?

    regards
    Yavuz

    #156069
    dejudicibus
    Participant

    At the bottom left of a post:

    Stai vedendo rticolo (di 1 totali)

    instead of

    Stai vedendo 1 articolo (di 1 totali)

    #156067
    attuoz
    Participant

    Hi. I tried other 2 methods. They add only a few topics, which is not enough. Can do the same in 10 minutes.

    bbpFauxData should work. I just don’t know where to use the php code.

    ini_set( 'max_execution_time', 30000 );
    ini_set( 'memory_limit', '1024M' );
    
    $bfd = new bbpFauxData();
    
    const USERS   = 50;
    const FORUMS  = 5;
    const TOPICS  = 100;
    const REPLIES = 1000;
    
    for ( $i = 0; $i < USERS; $i++ ) {
        $bfd->generate_user();
    }
    
    for ( $i = 0; $i < FORUMS; $i++ ) {
        $bfd->generate_forum();
    }
    
    for ( $i = 0; $i < TOPICS; $i++ ) {
        $bfd->generate_topic();
    }
    
    for ( $i = 0; $i < REPLIES; $i++ ) {
        $bfd->generate_reply();
    }
    #156065
    yarashicr
    Participant

    I am very new to BBPress deployment. One of my client wants me to fetch Topics or discussions of a particular forum or all forums with in a category and display it on the homepage. The only way I can add it on the home page of my site in the current wordpress theme I use is through a custom widget (“text widget”). Can any one help me with the php code to do the same. Also help me on what I need to do inorder to fetch all topics under a particular category, irrespective of the forums to which they belong.

    Is there a plugin to do the same or an external widget which I need to install in the form of a plugin.?

    If I am not wrong, I assume that the following is the structure of a BBpress forum.
    Category >> Forum (Sub Category) >> Topics (Discussion)
    Eg: Software >> Apple >> A simple topic or discussion on iPhone.

    #156063

    In reply to: Help for roles

    Robkk
    Moderator

    use the gd bbpress attachments plugin to allow users to upload images.

    the users use html when they are using the visual editor too if you activated that it just outputs the html tags in an iframe in real time.

    there being two tabs is not really a big deal, but create me a subscriber account and i can see if i can hide it with some CSS.

    i need a subscriber account because i cant see the topic/reply form unless i login to your site.

    ok role see if this article helps

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    #156062

    In reply to: Edit reply page

    Robkk
    Moderator
    #156056
    Robkk
    Moderator

    try this code from this link

    https://gist.github.com/ntwb/7864894

    and rename the ones you want

    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    
    function ntwb_bbpress_custom_role_names() {
    	return array(
    
    		// Keymaster
    		bbp_get_keymaster_role() => array(
    			'name'         => 'My Custom Keymaster Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    
    		// Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'My Custom Moderator Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    
    		// Participant
    		bbp_get_participant_role() => array(
    			'name'         => 'My Custom Participant Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    
    		// Spectator
    		bbp_get_spectator_role() => array(
    			'name'         => 'My Custom Spectator Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    		),
    
    		// Blocked
    		bbp_get_blocked_role() => array(
    			'name'         => 'My Custom Blocked Role Name',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    		)
    	);
    }
    #156052
    Robkk
    Moderator

    We have installed the latest bbPress + latest WP on our site. Also we have Disqus if this matter.

    yeah Disqus not really

    We read that bbPress is integrated with ‘Discussion’ settings from WP installation.

    well it does but only the comment blacklist and comment moderation , not anything else yet.

    more info on this link.

    (codex.bbpress.org/moderation-and-blacklisting/)

    No answer here? Perhaps a plugin?

    sorry its the holidays in the U.S. , we are spending time with families.

    there is a plugin though!

    https://wordpress.org/plugins/bbpressmoderation/

Viewing 25 results - 9,876 through 9,900 (of 32,519 total)
Skip to toolbar