Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,201 through 9,225 (of 32,519 total)
  • Author
    Search Results
  • #159887
    Robkk
    Moderator

    Redirecting back to the default wordpress login pages is a common complaint , but there are better plugins that handle frontend authentication then the default bbPress ones , id say maybe use another plugin for frontend authentication.

    other than that its not a total issue, those default WordPress login pages arent just for admins they are suppose to be used for all your users.

    the default from name is wordpress , you can customize it with filters though.

    add_filter( 'wp_mail_from', 'your_email' );
    function your_email( $original_email_address )
    {
    	return 'your@email-address.com';
    }
    add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
    function custom_wp_mail_from_name( $original_email_from )
    {
    	return 'Your sites name';
    }
    #159880

    In reply to: View Topic By

    Robkk
    Moderator

    you can use the bbPress views widget.

    which would link to optional ways to view the topics.

    Recommended im not sure though?? maybe as an alternative you can use most replied too??

    to add more custom views

    you can plop this code into your child themes functions.php file or add it into a functionality plugin.

    /**
     * Register these bbPress views:
     *  - Popular Topics
     *  - Unpopular Topics
     *  - Random Topic
     *  - Recently Closed
     *  - Tagged Test
     *  - All Topics
     *  - Open (Not Closed)
     *  - Random Single Topic
     *
     * @uses bbp_register_view() To register the view
     */
    function ntwb_register_custom_views() {
    	bbp_register_view( 'popular-topics', __( 'Popular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num' ), false );
    	bbp_register_view( 'unpopular-topics', __( 'Unpopular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num', 'order' => 'asc' ), false );
    	bbp_register_view( 'random-topic', __( 'Random Topic' ), array( 'orderby' => 'rand' ), false );
    	bbp_register_view( 'closed', __( 'Recently Closed' ), array( 'post_status' => 'closed' ), false );
    	bbp_register_view( 'taggedtest', __( 'Tagged Test' ), array( 'topic-tag' => 'test' ) );
    	bbp_register_view( 'all-topics', __( 'All Topics' ), array( 'order' => 'DESC' ), false );
    	bbp_register_view( 'open', __( 'Open (Not Closed)' ), array( 'post_status' => 'publish' ), false );
    	bbp_register_view( 'random-single-topic', __( 'Random Single-Topic' ), array( 'orderby' => 'rand', 'posts_per_page' => '1', 'max_num_pages' => '1' ), false );
    
    }
    add_action( 'bbp_register_views', 'ntwb_register_custom_views' );
    #159879
    Robkk
    Moderator

    there is a topic form shortcode which is listed here, it does as you describe.

    [bbp-topic-form]

    https://codex.bbpress.org/shortcodes/

    for the button , search through the forums im sure ive said this before

    its somewhere in this topic

    How to make similar bbpress forum to QuicSprout one?

    Robkk
    Moderator

    if its in a forum you should use <?php bbp_forum_reply_count() ?> for topics the other code works.

    #159875

    In reply to: First topic text color

    Robkk
    Moderator

    @navinn

    alight , i knew it was that CSS code for sure but i didnt know for sure if it was for something cool in your theme.

    the original code i posted shouldve worked all i did was add an CSS ID so that it would only show for bbPress , because that is where the issue was.

    #159870
    BillOsuch
    Participant

    I attempted deactivating the plugin, and it took my entire site offline! Trying to load any page just gives a blank screen – no error message, no code. I reactivated the plugin, but the forum menus in admin are no longer there, so I can’t run the “reset forums” that people have mentioned.

    This is a production site, with 8000+ hits daily, so I’m not able to start deactivating plugins and changing themes like other posts have suggested.

    Help?

    #159866

    In reply to: couple of questions

    Robin W
    Moderator
    #159861
    Robin W
    Moderator

    sorry, but if the code doesn’t work, the either you are doing something wrong, or something else is interfering.

    If you have a link to your site and a page showing the issue, I’ll take one further look.

    #159860

    In reply to: First topic text color

    Navinn
    Participant

    Hi, I’ve found the wrong css code:

    #top ul:first-child > li > a {
    color: #eeeeee;
    }

    Thanks for your help, you can consider it as solved

    #159858
    Touda
    Participant

    Solved!

    Deactivated Role Editor plugin.

    Installed and activated Members plugin: https://wordpress.org/plugins/members/

    (Permissions changed with Role Editor remained.)

    Added, for Author role, with Members plugin, the following permission:

    read_hidden_forums

    That seemed to do the trick. Hope this helps other people with the same problem while bbPress developers don’t fix the bug.

    #159856
    Touda
    Participant

    I’ve tried workaround suggested by @mjpg but it’s had no effect at all!

    I’ve edit role for one of the users, with general Author and bbPress Participant roles. Then activated:

    read_private_forums
    read_private_replies
    read_private_topics

    And it had no effect: topics inside private forums remained invisible for that user!

    Than I tried and activated also, in the main roles section, the following:

    read_private_pages
    read_private_posts

    And, still no effect!

    🙁

    #159855
    Touda
    Participant

    I’m having a similar problem. And I must tell Andre that, yes, it seems a bug and is not intended to be that way. As you can read at https://codex.bbpress.org/bbpress-user-roles-and-capabilities/#participant they are supposed to read private forums. My private users (with participant role) can see the private forums and navigate through them and their sub-forums, but all topics (on private forums and also on private sub-forums inside private forums) there is a message that no topic has been found. If I just give them upper permissions (Moderator), then they can see all the topics on these forums and alos reply, etc.

    So I think it’s truely a bug. Strange to me that it’s been around for some months without being fixed 🙁

    BTW, I’m using bbPress as a plugin within a WP installation.

    #159839
    sharlene_c
    Participant

    Like Dropbox https://www.dropboxforum.com/hc/communities/public/questions
    we would like to include a button at top right of forum page to post a question or idea.

    Topic options would be provided as a dropdown list for the user to select from.

    The user would provide title of question or idea and more details if required.
    Title and topic would be required fields, more details would be optional.

    Like this: https://www.dropboxforum.com/hc/communities/public/questions/new

    Is this possible with shortcodes or can some tell me how to accomplish this. Our wordpress version 4.1.1 and bbPress version is 2.5.6

    Thanking you in advance for any help

    #159834
    Pierre Ledoux
    Participant

    Hello,

    this is how it looks today:

    1
    2

    the words ware not in one row. I would like to improve the appearance. Thatswhy i want to have all words in one row and the button left or maybe centered.

    But i don’t know how to realize it.

    Regards

    #159832
    teamoo
    Participant

    I took the “link” code out and it posted.

    #159826
    bren77
    Participant

    I’ve looked over the documentation but can’t find a shortcode or link that will take me to the page that displays links for a user’s profile, topics, favorites, etc. For example:
    http://screencast.com/t/mvPcfwwcp

    I can get there after I post a topic and then click on my username. I would like to add a link to this page at the top of entry page.

    Thanks!
    Chad

    #159825

    In reply to: First topic text color

    Navinn
    Participant

    Hi, it doesn’t change.
    I also tried this:

    #bbpress-forums #top ul:first-child > li > a {
      color: #b84444!important;
    }

    i don’t know it that helps, but my custom CSS contains this:

    li#menu-item-107548 .avia-menu-text span{
    font-size: 22px;
    }
    
    #header_meta {
    background: #4a96cd;
    }
    #top ul:first-child > li > a {
    color: #eeeeee;
    }
    
    #top ul:first-child > li > a:hover {
    color: #4a96cd; 
    }
    
    /* Main Menu - HIGHLIGHT BLOCK */
    #top .avia-menu-fx {
    display:block;
    position:absolute;
    border-style:solid;
    border-width:5px;
    }
    
    .avia_desktop .av-hover-overlay-active .av-masonry-image-container {
    opacity: 1;
    }
    
    .qa-faq-title { font-size: 110%; }
    .faq-catname { font-size: 150%; }
    
    .header_color .main_menu ul:first-child > li > a {font-size:110%; 
    }
    
    @media only screen and (max-width: 600px) {
    .av-inner-masonry-content.site-background {
    opacity: 0 !important;
    }
    }
    
    .single #main .content .entry-footer{
    float: left !important;
    }
    
    /* Couleur de la sideBar */
    .main_color .sidebar { background-color: #eeeeee; }
    
    /* Couleur des liens vers pages de même niveau dans la sidebar*/
    ul.nested_nav a:hover {
    color: #4a96cd!important;
    }
    ul.nested_nav a {
    color: #404040!important;
    }
    
    /*Classe pour centrer les images dans le menu*/
    p.menu-image {
    position: relative;
    top: -9px;
    }
    li#menu-item-107543 a .avia-menu-fx {
    bottom: 11px!important;
    }
    li#menu-item-107544 a .avia-menu-fx {
    bottom: 11px!important;
    }
    
    /*Désactiver la bordure en haut a droite du menu*/
    .avia-menu.av_menu_icon_beside { border-right: none; }
    
    #top #header .avia_mega_div > .sub-menu.avia_mega_hr {
    padding-top: 5px;
    }
    #top #header .avia_mega_div > .sub-menu {
    padding: 20px 20px 20px;
    }
    #159820
    shanhard
    Participant

    Users are reporting an error when logging in using the bbPres login widget:
    Warning: require_once(/home/sitename/public_html/wp-content/plugins/bbpress/includes/admin/converters/example.php) [function.require-once]: failed to open stream: No such file or directory in /home/sitename/public_html/wp-content/plugins/bbpress/includes/users/functions.php on line 1705

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/sitename/public_html/wp-content/plugins/bbpress/includes/admin/converters/example.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/sitename/public_html/wp-content/plugins/bbpress/includes/users/functions.php on line 1705

    I noticed that the filename is different in the referenced location, it has a capital letter in Example.php When I change the filename it resolves the issue.

    Why does it need to reference the Example.php converter anyway?

    #159812
    Robkk
    Moderator

    @drsarf

    sorry i forgot about your topic

    in page is kind of hard to do since there is usually multiple forums.

    the only thing i can think of is maybe outputting the shortcode in a template

    like so <?php echo do_shortcode("[shortcode]"); ?>

    but then since there is multiple forums you will need multiple shortcodes for each slider.

    which would require you to use a bunch of if statements for each forum.

    i suggest go to http://jobs.wordpress.net/ and see if a developer can do this for you.

    #159809

    In reply to: First topic text color

    Robkk
    Moderator

    i thought it was because you closed the topic but no your theme is adding some weird CSS to the first topic.

    see if this CSS fixes your issue,

    #bbpress-forums #top ul:first-child > li > a {
      color: #b84444;
    }
    #159808
    Robkk
    Moderator

    i found this gist here , and it might be useful.

    https://gist.github.com/trishasalas/9818135

    plop this into your child theme functions.php or a functionality plugin

    add_action( 'bbp_template_before_replies_loop', 'bbpress_rss' );
    function bbpress_rss() {
    $url = "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    echo ' <a href="' . $url . 'feed">Subscribe via RSS</a>';
    }

    EDIT: @netweb thats sweet!!

    #159797

    In reply to: SMF Import to bbPress

    curvemeister
    Participant

    I want to offer this php script in exchange for the help Stephen’s script provided. It ran successfully on my installation, going from SMF 2.0.4 to bbPress 2.5.6 / GD bbPress Attachments 2.2. Most of my time is taken up with consulting, and I regret that I will not be providing much in the way of support for this script.

    This is a stand-alone php script that you must modify to target your SMF install. I suggest using notepad++ to edit for readability, and something like FileZilla to transfer your file to your host. Install and run the script in the root folder of your WordPress folder. I used Putty configured for an SSHconnection. Do not try to run it via http – the script will time out.

    Thanks to Stephen Edgar for providing the original php on which this is based.

    Mike Russell – final result at: http://www.curvemeister.com/forums
    ==============================================================================

    
    <?php
    //Standalone script to import smf attachments for the GD bbPress Attachments plugin
    //Execute after you have imported smf into bbPress
    require( 'wp-load.php' );
    require( 'wp-admin/includes/image.php' );
    
    $verbose = false;
    //$limit = " LIMIT 0,1";
    $limit = " LIMIT 0,99999";
    
    // source database connection
    $host="localhost";
    $uname="xxx";
    $pass="xxx";
    $database = "xxx";
    $site_url = 'http://xxx/forum';
    $forum_path = 'forum/attachments/';
    
    echo "start smf_attachments-to-bbpress\n"; flush();
    
    //get the attachment rows from SMF
    $smf_db = new wpdb($uname, $pass, $database, $host);
    $smf_rows = $smf_db->get_results("
    								SELECT * FROM <code>smf_attachments</code> 
    								WHERE file_hash != '' 
    									AND filename NOT LIKE '%thumb' 
    								ORDER BY <code>id_attach</code>"
    								.$limit);
    								
    echo "processing ".$smf_rows->num_rows." rows total\n";
    
    // process each row
    $count = 0;
    foreach ($smf_rows as $smf_attachment_row) {
    	if($verbose) { echo 'next row, id_attach = '.$smf_attachment_row->id_attach."\n"; flush(); }
    
    	//look for both a new and old style filename.  If neither exists, skip this attachment
    	$smf_filename = $forum_path.$smf_attachment_row->id_attach.'_'.$smf_attachment_row->file_hash;
    	if(!file_exists($smf_filename))
    		$smf_filename = $forum_path.$smf_attachment_row->id_attach.'_'.$smf_attachment_row->filename.$smf_attachment_row->file_hash;
    	
    	if(!file_exists($smf_filename))
    	{
    		echo "no file, skipping attachment for ".$smf_attachment_row->id_attach.", missing SMF file: ".$smf_filename."\n"; flush();
    		continue;
    	}
    	
    	$uploads = wp_upload_dir('SMF');
    	$new_upload_dir = $uploads['path'];
    	$new_full_filename = $new_upload_dir.'/'.$smf_attachment_row->filename;
    	if($verbose) { echo('old->new = '.$smf_filename.' -> '.$new_full_filename."\n"); flush(); }
    	
    	//copy the enclosed file if necessary
    	if(!file_exists($new_full_filename) && !copy($smf_filename, $new_full_filename) ) {
    		echo "cannot copy: ".$smf_filename."->".$new_full_filename."\n";
    	} else {
    		//look for bbPress's previously imported topic or reply for the current attachment
    		$parent_args = array(
    			'post_type' => array('topic', 'reply'),
    			'meta_key' => '_bbp_post_id',
    			'meta_value' => $smf_attachment_row->id_msg
    		);
    		//echo "$parent_args = ".print_r($parent_args)."\n";
    		
    		$parent_query = new WP_Query($parent_args);
    		$parent_query->get_posts();
    		if($verbose) { echo $parent_query->post_count." posts found for smf_post id ".$smf_attachment_row->id_msg."\n"; flush(); }
    
    		//normally only one post references a given enclosure, but handle possible multiples anyway ...
    		while($parent_query->have_posts()) {
    			$parent_query->the_post();
    			$post_id = get_the_ID();
    			$attachment_data = array(
    				'guid' => $uploads['url'] . '/' . basename( $new_full_filename ),
    				'post_mime_type'	=> 'image/'.$smf_attachment_row->fileext,
    				'post_title'		=> $smf_attachment_row->filename,
    				'post_status'		=> null,
    				'post_content'		=> '',
    			);
    			//if($verbose) { echo "attachment_data = ".print_r($attachment_data)."\n"; flush(); }
    			
    			$attach_id = wp_insert_attachment($attachment_data, $new_full_filename, $post_id);
    
    			//echo "attach_id = ".$attach_id."\n"; flush();
    			if($attach_id) {
    				//update_post_meta($attach_id, '_bbp_attachment', 1);
    				if($attach_metadata = wp_generate_attachment_metadata($attach_id, $new_full_filename)) {
    					//echo 'attach_metadata = '.print_r($attach_metadata)."\n"; flush();
    					wp_update_attachment_metadata( $attach_id,  $attach_metadata );
    					set_post_thumbnail( $post_id, $attach_id );				
    				} else {
    					echo 'wp_generate_attachment_metadata failed, fname = '.$new_full_filename."\n"; flush();
    				}
    			}
    			wp_reset_postdata();
    		}
    	}
    	$count++;
    	if($count%100 == 0)
    	{
    		echo $count." attachments processed\r";
    		flush();
    	}
    }
    echo "Done, processed ".$count." records\n\n";
    
    //clean up message body text
    //convert <tt> -> <br />
    mysql_query("UPDATE wp_posts SET post_content = REPLACE (post_content, \'<tt>\', \'<br />\') WHERE post_content LIKE \'%<tt>%\'");
    
    mysql_close($connection);
    exit;
    ?>
    
    #159785

    In reply to: bbPress downgrade?

    Robin W
    Moderator

    No, you’ll need to repeat whatever you did when you originally installed it.

    see

    https://codex.bbpress.org/bbpress-in-your-language/

    #159769
    nolimit966
    Participant

    Ive taken a look at the template.php file to see what id need to implement into my current functions.php breadcrumbs class but im slightly confused.

    From my code above it looks like:
    $output = '<li><a href="'.get_permalink($ancestor).'" title="'.get_the_title($ancestor).'">'.get_the_title($ancestor).'</a></li> <li class="separator">/</li>'.$output; is only outputting a maximum of 3 ancestors. Is that correct?

    Php really is not my strong point.

    #159756
    mvaneijgen
    Participant

    I still have this problem on the latest bbpress and wordpress. Im trying to embed the shortcode on the feedback-no-search.php so that it displays when there is no search result and the user can ask the question on the forum. For admins it works fine but for non-admins get the message “You cannot create new topics.”

    The fix that @satrya and @robin-w posted also doesn’t work on this version of bbpress, but again thats ia comment from a year ago.

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