Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,826 through 13,850 (of 32,503 total)
  • Author
    Search Results
  • theumbrellaagency
    Participant

    Hi there,

    I created a couple of custom fields and integrated it with my Group Topics, new topic form. I’d like to be able to just load this new form for specific groups. I ended up creating a little plugin to load the following code found on a tutorial that worked for me.

    It took a long time to figure this out and I was hoping to get a bit of direction to expedite figuring this out (the topic of this thread).

    Thanks!

    add_action ( ‘bbp_theme_before_topic_form_content’, ‘bbp_extra_fields’);
    function bbp_extra_fields() {
    $value = get_post_meta( bbp_get_topic_id(), ‘bbp_extra_field1’, true);
    echo ‘<label for=”bbp_extra_field1″>Seeking Funding? (Yes or no)</label><br>’;
    echo “<input type=’text’ name=’bbp_extra_field1′ value='”.$value.”‘><br>”;

    $value = get_post_meta( bbp_get_topic_id(), ‘bbp_extra_field2’, true);
    echo ‘<label for=”bbp_extra_field2″>Resources Needed (talent, knowledge, mentors, etc.)</label><br>’;
    echo “<input type=’text’ name=’bbp_extra_field2′ value='”.$value.”‘>”;
    }

    add_action ( ‘bbp_new_topic’, ‘bbp_save_extra_fields’, 10, 1 );
    add_action ( ‘bbp_edit_topic’, ‘bbp_save_extra_fields’, 10, 1 );

    function bbp_save_extra_fields($topic_id=0) {
    if (isset($_POST) && $_POST[‘bbp_extra_field1’]!=”)
    update_post_meta( $topic_id, ‘bbp_extra_field1’, $_POST[‘bbp_extra_field1’] );
    if (isset($_POST) && $_POST[‘bbp_extra_field2’]!=”)
    update_post_meta( $topic_id, ‘bbp_extra_field2’, $_POST[‘bbp_extra_field2’] );
    }

    add_action(‘bbp_template_before_replies_loop’, ‘bbp_show_extra_fields’);
    function bbp_show_extra_fields() {
    $topic_id = bbp_get_topic_id();
    $value1 = get_post_meta( $topic_id, ‘bbp_extra_field1’, true);
    $value2 = get_post_meta( $topic_id, ‘bbp_extra_field2’, true);
    echo “Seeking Funding? “.$value1.”<br>”;
    echo “Resources Needed: “.$value2.”<br>”;
    }

    #136734
    tina_sk
    Participant

    Hi, i have problem with the patch – ticket 2319

    in this code:

    <?php while ( $widget_query->have_posts() ) :
    
    				$widget_query->the_post();
    				$topic_id    = bbp_get_topic_id( $widget_query->post->ID );
    				$author_link = '';
    
    				// Maybe get the topic author
    				if ( 'on' === $settings['show_user'] ) :
    				if ( $settings['show_user'] ) : 
    					$author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) );
    				<?php endif; ?>
    				
    				<li>
    					<a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
    
    					<?php if ( ! empty( $author_link ) ) : ?>
    
    						<?php printf( _x( 'by %1$s', 'widgets', 'bbpress' ), '<span class="topic-author">' . $author_link . '</span>' ); ?>
    
    					<?php endif; ?>
    
    					<?php if ( 'on' === $settings['show_date'] ) : ?>
    					<?php if ( $settings['show_date'] ) : ?> 
    
    						<div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
    
    					<?php endif; ?>
    
    				</li>
    
    			<?php endwhile; ?> 

    Parse error: syntax error, unexpected T_ENDWHILE in /home/.sites/261/site2485/web/forum/wp-content/plugins/bbpress/includes/common/widgets.php on line 829

    Can you help me; what´s wrong?

    #136726
    Stephen Edgar
    Keymaster

    ETA: Wow, that was fast— my page got slammed with spam comments within minutes of posting the links here. I have removed them for now. If a support person needs them to diagnose the issue, I can give them out then.

    I have heard this a couple of times, I might set up a test myself, not sure what we can do though as presumably the spammers are just scrapping bbpress.org

    #136722

    In reply to: Error after moving!

    Sounds like your files didn’t all copy over correctly. Try replacing your plugins/bbpress directory with a new copy.

    #136705
    kimbo_king
    Participant

    Hi

    I’ve searched the web but nothing shouts out at me. The only thing I can see is to edit the PHP but I’d rather avoid that if possible

    Currently my layout is as follows:

    <strong>South Yorkshire</strong>
    Sheffield & District Fair Play League (2, 6), Sheffield & Hallamshire County Senior (2, 10), The Wragg League (1, 1),  Doncaster & District (1, 1)
    
    <strong>East Yorkshire</strong>
    Humber Premier League (0, 0), East Riding Amateur (0, 0), East Riding County (0, 0)

    But I’d like it as below.

    <strong>South Yorkshire</strong>
    o	Sheffield & District Fair Play League (2, 6), 
    o	Sheffield & Hallamshire County Senior (2, 10),
    o	The Wragg League (1, 1), 
    o	Doncaster & District (1, 1)
    
    <strong>East Yorkshire</strong>
    o	Humber Premier League (0, 0), 
    o	East Riding Amateur (0, 0), 
    o	East Riding County (0, 0)

    Essentially I want my forums in a nice list rather than in a clump. I’d like the same palyour as most forums (PHPBB etc). Is this possible?

    Plugin/ easy setting I’m missing?

    http://www.togganet.co.uk/blog/forums/

    PureLoneWolf
    Participant

    Hiya

    Thanks for the response. I have commented out the code and there is no change at all to the forum display.

    Thanks

    #136695

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    The final version should be ready for bbPress 2.5 in ~8 weeks (10/29/13 14:00:00)

    I have not started on the passwords as these are hard and I have to do them for most of the new importers so I will get started on these next week I hope.

    We are importing Email, URL, AIM & Yahoo into the default WordPress user profile and importing SMF’s ICQ, MSN, Signature, Avatar (link only), Location & Personal Text values and storing them in WordPress wp_usermeta table so this can be later imported/manipulated into any custom WordPress profile plugin like BuddyPress, this is not automated in any way though.

    Stephen Edgar
    Keymaster

    I cant look at the code right at this minute as I’m mobile but what happens if you remove that from your functions.php, I know a few changes have been made but cannot reference them at the minute.

    #136691
    Stephen Edgar
    Keymaster

    @dallisonlee I have replied to you here: https://bbpress.org/forums/topic/bbpress-editorial-calendar/


    @jgasparine
    ‘Auto role’ appears to be working for me, can you check that it is enabled via /wp-admin/options-general.php?page=bbpress


    @nykess
    Thanks, I linked to the widget issue in my previous post above. The user Gravatar are still using 80×80 Gravatars and has not changed, the line break between the username and forum role has also not changed. How have you customized your theme? It sounds like the either the bbPress or a theme update has overridden your customizations. Can you start a new topic and give some more detailed information on each of these. You can also download all previous versions from https://wordpress.org/plugins/bbpress/developers/

    #136689
    Anand
    Participant

    This might be quite simple when you have custom template or have child themes. You will just need to place a jump link or button.

    e.g. Click Me

    #136676
    Martyn_
    Participant

    Agree it could do with an overhaul. A single widget that can be flexibly configured to show and link exactly what you want would be a real bonus. Similarly for the shortcodes. Even better if it could cover WP posts and replies using an identical structure/layout.

    an ideal widget would have

    – number of things
    – sort by: topic creation, freshness, popularity/views, popularity/replies in last X days
    – show/link OP author
    + include date [x]
    + include avatar [x]
    – show link most recent
    + include date [x]
    + include avatar [x]
    – present as table or list
    – extract OP
    – extract latest
    – [shrtcodeable]

    I don’t see the need for a list that has replies (with dups per topic) as thats better handled as an activity stream.

    #136673
    Nick Galgay
    Participant

    Hello I am running the latest version of wordpress and bbpress, I am new to both of the aforementioned products. I have added a header link to my site that looks like

    <?php if (is_page(‘Forums’)) { echo ” class=\”current_page_item\””; } ?>

    That code works everywhere on my site except for bbpress. Can someone please tell me how to set my header link, and keep it, in the active state when on the forums? I’ve looked on this site and searched google to no avail.

    Thanks alot.

    #136666
    dot
    Participant

    Coming back to answer my own post, in case it helps someone else down the line: the shortcode (for the individual forum ONLY) was distorted in Visual mode. Switching to Text mode and correcting the shortcode seems to have fixed the issue.

    #136660
    MediaSVI
    Participant

    Where do you put the code?

    #136658
    dot
    Participant

    Wordpress 3.6, using theme Twenty Eleven
    BbPress 2.4 (Just updated this morning, though I had the problem with the previous version as well)
    Only other active plugin: Error Log Dashboard Widget 1.0.2 (showing no PHP errors)
    Several other plugins are installed, but deactivated while trying to debug this issue.

    I have the following text on a single page:

    
    Here is the shortcode for the single forum: [ bbp-single-forum id=39 ]
    
    [bbp-single-forum id=39]
    
    Here is the shortcode for all forums: [ bbp-forum-index ]
    
    [bbp-forum-index]

    The single forum does not display. The forum index does display. I have confirmed that the index is the correct number via the admin forum view. Here is a link to a screenshot. Here is the link from the forum page, showing the forum id: http://[domainremoved].org/wordpress/wp-admin/post.php?post=39&action=edit (Obviously, clicking it won’t work, because it requires a log-in, but this is to confirm that I’m finding the forum index correctly.)

    Here is the forum: http://[domainremoved].org/forums/forum/pta-board/
    Here is the page it is linked from, showing where the shortcodes do not work: http://[domainremoved].org/pta-board-2/
    (Note: I have added spaces between the shortcodes so you can see the text that I used, then repeated the shortcodes without the spaces to display the forums.)

    I feel like this should be some really simple user error, but given that I have double-checked the shortcode syntax and the forum id, deactivated all other plugins, and chosen the Twenty Eleven theme, I can’t figure out what it could be.

    ETA: Wow, that was fast— my page got slammed with spam comments within minutes of posting the links here. I have removed them for now. If a support person needs them to diagnose the issue, I can give them out then.

    #136656
    Xevo
    Participant
    @media (max-width:767px){
      .bbp-reply-author { float: none; }
      .bbp-reply-content { margin-left: 0; padding: 12px; }
    }

    Something like that.

    #136655
    MediaSVI
    Participant

    Is there a way to edit the code to make this happen?

    #136652
    Guru
    Participant

    Anyone out here knows what to put in the navigation bar to re direct the user to his bbpress profile?

    #136645
    kriskl
    Participant

    yhmm something strange happened to that code.. 🙁

    #136644
    kriskl
    Participant

    After weeks trying to find something that would work, I found the code on wordpress forums to remove completely gravatars (and redirects it was causing.. )

    here is it:

    
    function bp_remove_gravatar ($image, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	if( $image && strpos( $image, "gravatar.com" ) ){ 
    		return '<img src="' . $default . '" alt="avatar" />';
    	} else {
    		return $image;
    	}
    }
    add_filter('bp_core_fetch_avatar', 'bp_remove_gravatar', 1, 9 );
    
    function remove_gravatar ($avatar, $id_or_email, $size, $default, $alt) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	return "<img alt='{$alt}' src='{$default}' height='{$size}' width='{$size}' />";
    }
    
    add_filter('get_avatar', 'remove_gravatar', 1, 5);
    
    function bp_remove_signup_gravatar ($image) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	if( $image && strpos( $image, "gravatar.com" ) ){ 
    		return '<img src="' . $default . '" alt="avatar" width="60" height="60" />';
    	} else {
    		return $image;
    	}
    
    }
    add_filter('bp_get_signup_avatar', 'bp_remove_signup_gravatar', 1, 1 );
    
    

    As I am now planning to disable buddypress completely. I am looking for an easy way to let users upload their avatars in bbpress, anyone tried it already?

    #136640
    janhoos
    Participant

    Agreed! Missing this functionality 2. I have it set to your setting as well, but a perfect widget would be a combination of the 2! Not a coder myself as well unfortunately.

    #136639
    Stephen Edgar
    Keymaster

    I cannot reproduce the issue of missing bbPress wp-admin panels with any of these plugins: GD bbPress Attachments, GD bbPress Tools, GD bbPress Widgets, that’s not to say it isn’t happening. I will keep an eye on Milan Petrovic’s Twitter feed to see if he comes across any issues himself.

    Permissions and caps with bbPress is a hard (for me anyway) to grasp at a code level, I do know that essentially bbPress is ahead of WordPress in some ways in this aspect and the fact that bbPress is built on top of WordPress this is going to constantly evolve. The ‘other’ forum packages that are available do have finer granular permissions but none of them integrate with WordPress the way bbPress does (I am up to my 27th forum converter now BTW).

    These bits will come, hopefully sooner rather than later and the dev’s that contribute code for bbPress are acutely aware of this type of feature request and I am quite sure it is kept in their mind as code is written for anything for example as mentioned above ‘Per-forum moderation’ & ‘Forum subscriptions’ slated for bbPress 2.5, these two features alone make for a great start in getting more of the types of features you are referring to.

    “bbPress is forum software with a twist, from the creators WordPress”

    #136634
    Stephen Edgar
    Keymaster

    The file is located in /wp-content/plugins/bbpress/templates/default

    If you edit this file manually when you update bbPress your changes will be lost.

    The link above in my post shows the steps needed to copy this template to your own theme so you can use your own custom templates without bbPress overriding it during updates.

    #136623

    Topic: bbPress

    in forum Troubleshooting
    n4ce
    Participant

    The newest version of bbPress has caused a couple of my sites plugins/short-codes to display incorrectly. The plugin in question is Cookie Law Info, it appears to remove it format i.e. no button image and text not centred etc. Also the short-codes for my elegant themes, theme do not appear to be displaying correctly either.

    #136621
    Stephen Edgar
    Keymaster

    It is in the feedback-no-forums.php template \templates\default\bbpress

    If you want to modify this template for your theme here check out the docs on theme compat.

    https://codex.bbpress.org/theme-compatibility/

Viewing 25 results - 13,826 through 13,850 (of 32,503 total)
Skip to toolbar