Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,201 through 9,225 (of 32,505 total)
  • Author
    Search Results
  • #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.

    #159755
    mvaneijgen
    Participant

    I do and admins and moderators will see the form and can work with it, but users/subscribers will see the message “You cannot create new topics.” as described here https://bbpress.org/forums/topic/new-topic-form-shortcode-issue/ a topic from almost 3 years ago.

    I place the shortcode in the search result page if there are no instances found of what they are trying to look for, so they can ask that question on the forums.

    #159754
    Robkk
    Moderator

    id say look at the bbPress breadcrumbs code and copy that and add it to your custom breadcrumbs.

    its in bbpress>includes>common>

    then search breadcrumbs in an editor like notepad++

    #159753
    Robkk
    Moderator

    you probably can replace it with a post count tag that outputs the number of replies in a topic for example.

    i think this is it.

    <?php bbp_topic_post_count ?>

    then output some text after that.

    #159752
    Robkk
    Moderator

    bbPress doesnt output shortcodes use something like this

    https://wordpress.org/plugins/bbpress-do-short-codes/

    Robkk
    Moderator

    you really shouldn’t edit core code…i hope you havent messed something up and now are getting a domino effect of issues.

    you should also contact wp user avatar plugin support just in case too.

    i gotta say email me , so i can double check your setup

    Contact

    im mostly going to ask how you set up your forum and see if i can duplicate the issue.

    #159743
    Robkk
    Moderator

    you can hide them with CSS

    .forum-archive .status-private {
    display:none;
    }
    #159738
    Robkk
    Moderator

    what are you trying to do with the shortcode?

    it should work if you just place [bbp-topic-form] in a page or a sidebar widget like blask studio tinymce widget.

    #159737
    Robkk
    Moderator

    voice count shows how many users are in a particular topic.

    for topics

    you can edit the loop-single-topic.php file by copying it into your child theme and changing the voice count number code to whatever php tag you have from a plugin that has a specific template tag to show a posts like count.

    change <?php bbp_topic_voice_count(); ?> with what you have.

    to edit the label voice in the bbPress header you edit loop-topics.php and change <?php _e( 'Voices', 'bbpress' ); ?> and change it <?php _e( 'Likes', 'bbpress' ); ?>

    for forums

    its close to the same instead look for loop-forums.php and loop-single-forum.php

    and the php code would be similar but instead of topic_ look for forum_

    #159735
    Robkk
    Moderator

    use FTP and copy page.php and rename it to bbpress.php , then remove all the unwanted code like the read more buttn .

    This usually fixes most theme problems.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    need anymore help with this reply back , and i will give you a more detailed explaination.

    #159733

    In reply to: blurred avatar

    Robkk
    Moderator

    it is most likely that you tried to make avatars bigger with CSS when they were originally sized to be smaller in the PHP code hence why you would see them blurry because you are basically stretching a small image.

    link to the blurred avatars to double check though on your site.

    #159725
    teamoo
    Participant

    Hey Robin – I appreciate your response but my theme designer gave me some code to make it work.

    http://www.ohio-offroad.com

    For reference, this is the custom CSS we entered:

    /* bbPress WP Tweak plugin left justified text fix 3-13-2015 */
    #sidebar.sidebar-left{ text-align: initial !important; }

    #159722
    Pierre Ledoux
    Participant

    Hello,

    i want to use a widget (bbpress login) and a shortcode ([bbp-lost-pass]).

    But the appearance seems to be broken. The buttons are left. The descriptions are splitted. You can check the issues here:

    forex.die-analysten.com/login/
    forex.die-analysten.com/login/lost-pass/

    how can i fix that?

    Kind Regards
    Pierre

    #159718
    rbrynest
    Participant

    An update on this.

    I got it to work by editing the .htaccess file.

    Add this code block at the start of the file:

    <FilesMatch “^(wp-login|wp-log|index)\.php$”>
    Header set Set-Cookie wordpress_test_cookie=WP+Cookie+check
    </FilesMatch>

    Regards
    Rune

    #159711
    VojtaSvoboda
    Participant

    When I debuged WP_Query in bbpress/includes/topics/template.php on line 203, it prints:

    SELECT SQL_CALC_FOUND_ROWS  wp_2_posts.ID FROM wp_2_posts  INNER JOIN wp_2_postmeta ON ( wp_2_posts.ID = wp_2_postmeta.post_id ) WHERE 1=1  AND wp_2_posts.post_parent = 5080  AND wp_2_posts.post_type = 'post' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'closed' OR wp_2_posts.post_status = 'private' OR wp_2_posts.post_status = 'hidden') AND ( 
      wp_2_postmeta.meta_key = '_bbp_last_active_time'
    ) GROUP BY wp_2_posts.ID ORDER BY wp_2_postmeta.meta_value DESC LIMIT 0, 15

    with post_type=post, but it should be post_type=topic. Damn.

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