Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,751 through 10,775 (of 32,511 total)
  • Author
    Search Results
  • #151351
    Robkk
    Moderator

    to move the edit profile link right use this.

    replace the original edit profile code with this.

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {  
        if (!is_user_logged_in())
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            $profilelink = '<li id="bbp-editpro"><a href="http://www.astronomertalk.com/forums/users/' . $user . '/edit">Edit Profile</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
         
    }

    custom css

    #bbp-editpro {
    	float: right;
    }

    that should move it right.

    #151350
    Robkk
    Moderator

    okay heres how to get full width

    this should be your bbpress.php in your child themes root directory wp-content/awesome/bbpress.php

    you can also remove the css that i gave you from this topic

    Hide author/admin

    since i removed the post author info in the template.

    <?php get_header(); ?>
    
    <?php do_action( 'bp_before_content' ); ?>
    <!-- CONTENT START -->
    <div class="content">
    <div class="content-inner">
    
    <?php do_action( 'bp_before_blog_home' ); ?>
    
    <!-- POST ENTRY END -->
    <div id="post-entry">
    <section class="post-entry-inner">
    
    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    
    <!-- POST START -->
    <article <?php post_class('post-single page-single'); ?> id="post-<?php the_ID(); ?>">
    
    <h1 class="post-title entry-title"><?php the_title(); ?></h1>
    
    <?php do_action( 'bp_before_page_content' ); ?>
    <div class="post-content">
    <div class="entry-content"><?php the_content( __('...more &raquo;',TEMPLATE_DOMAIN) ); ?></div>
    <?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
    </div>
    <?php do_action( 'bp_after_page_content' ); ?>
    
    </article>
    <!-- POST END -->
    
    <?php endwhile; ?>
    
    <?php else : ?>
    
    <?php get_template_part( 'lib/templates/result' ); ?>
    
    <?php endif; ?>
    
    </section>
    </div>
    <!-- POST ENTRY END -->
    
    <?php do_action( 'bp_after_blog_home' ); ?>
    
    </div><!-- CONTENT INNER END -->
    </div><!-- CONTENT END -->
    
    <?php do_action( 'bp_after_content' ); ?>
    
    <?php get_footer(); ?>

    and heres some css

    .bbpress .content {
    	width: 100%;
    }

    this should get you full width

    #151349
    Anonymous User
    Inactive

    bbpress/includes/topics/template.php

    #151343
    mouna84
    Participant

    Hi there,

    I’m using: wordpress version 3.9.2–de_DE
    bbpress version 2.5.4

    The site I need help with is: http://darjinan.com/forum/

    I deleted the sidebar by copying page.php and renaming it to bbpress.php. But I can’t figure out how to center my forum. Here’s the code:

    
    <?php 
    /**
     * Theme Page Section for our theme.
     *
     * @package ThemeGrill
     * @subpackage Accelerate
     * @since Accelerate 1.0
     */
    ?>
    
    <?php get_header(); ?>
    
    	<?php do_action( 'accelerate_before_body_content' ); ?>
    
    	<div id="primary">
    		<div id="content" class="clearfix">
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php
    
    					do_action( 'accelerate_before_comments_template' );
    					// If comments are open or we have at least one comment, load up the comment template
    					if ( comments_open() || '0' != get_comments_number() )
    						comments_template();					
    	      		do_action ( 'accelerate_after_comments_template' );
    				?>
    			<?php endwhile; ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    	
    	<?php /*accelerate_sidebar_select();*/ ?>
    
    	<?php do_action( 'accelerate_after_body_content' ); ?>
    
    <?php get_footer(); ?>
    
    

    Can someone please help me? I’m a complete newbie to html and css.
    Thank you.

    #151333
    Robkk
    Moderator

    will need that code, would appreciate it

    ill try it to find out.

    Darn, tell me any steps if you remember

    i didnt use much php

    #151330
    Robkk
    Moderator

    it didnt work for awhile on localhost , then i editing the href link to make it work.

    use this

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {  
        if (!is_user_logged_in())
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            $profilelink = '<li><a href="http://www.astronomertalk.com/forums/users/' . $user . '/edit">Edit Profile</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
         
    }
    #151329
    cybarmitzvah
    Participant

    it works now??

    yes

    ill test out that profile link ,

    if you think its social login , deactivate and see if robins profile link code works.

    still not working

    im sure its just positioning it with css , but hey it doesnt have to be floated right, not a big deal if it is or not.

    will need that code, would appreciate it πŸ™‚

    i just achieved this today. But it required a lot of work with my theme.

    Darn, tell me any steps if you remember

    TY
    JB

    #151328
    Robkk
    Moderator

    works not, I just did not have the <?php in my site.

    it works now??

    So I just added the code from Robin W’s link,

    however it does not work,

    ill test out that profile link ,

    if you think its social login , deactivate and see if robins profile link code works.

    Plus, I would prefer it to stay all the way to the right.

    im sure its just positioning it with css , but hey it doesnt have to be floated right, not a big deal if it is or not.

    Plus, preferably, look more like this sites, with the username and photo of the person logged in, in the top right.

    i just achieved this today. But it required a lot of work with my theme.

    #151327
    cybarmitzvah
    Participant

    So I just added the code from Robin W’s link,

    however it does not work,

    Layout and functionality – Examples you can use

    I get the edit profile button for logged in users, however, it does not link to their profile. Could it be that I am using social login.?

    Plus, I would prefer it to stay all the way to the right. Plus, preferably, look more like this sites, with the username and photo of the person logged in, in the top right.

    JB

    #151326
    cybarmitzvah
    Participant

    Nice!

    works not, I just did not have the <?php in my site.

    Robkk
    Moderator

    My goal is this: Attach BadgeOS rewards to users using specific words within forum posts;

    I feel like that is going to be a paid project

    http://jobs.wordpress.net/

    #1 outsourcing service for WordPress

    #151323
    sidelancer
    Participant

    Thanks a lot! Worked for me. I couldn’t find the code in bbpress to change the forum headings but your code worked right away.

    gxechidna
    Participant

    My goal is this: Attach BadgeOS rewards to users using specific words within forum posts; however I can’t find where I might be able to inject the code to search through the post text.

    Please be kind, any PHP knowledge I hold is self taught and filled with huge gaps. I know I’ll need to use “strpos” with the post text and an IF statement, but I’m just lost as to where in the plugin/theme code I need to use it.

    Thank you!

    #151318

    In reply to: Image click/resize

    Robkk
    Moderator

    was it just a link or using the img button ??

    example with img button

    #151317
    Robkk
    Moderator

    in my child theme i have one functions.php

    this is the entire code.

    <?php
    
    /* Add custom functions below */
    add_filter('show_admin_bar', '__return_false');
    #151316
    cybarmitzvah
    Participant

    It wont work on mine πŸ™

    Be clear, where did you add his code? Did you make a new functions file?

    TY
    JB

    #151311
    Robkk
    Moderator

    i created a child theme with mesocolumn

    i added robins code and it worked fine.

    even when i switched to a different role

    #151300
    cybarmitzvah
    Participant

    Uhh?? Where did I loose you? … and where is stpehen Edgar?

    I do not have a functions file in my child theme. I tried creating a blank file and calling it functions.php and the code just showed up on the top of my page. Then I tried just adding that code you gave me to the mesocolumn functions file and once again the code just screwed up and showed up at the top of my page under the admin bar.

    So, once again, what should I do from here?

    Ohh and there is no white space.

    Thank You,
    JB

    #151289

    In reply to: Topic Title length

    Robin W
    Moderator

    should be something like

    add_filter ('bbp_get_title_max_length','change_title') ;
    
    Function change_title ($default) {
    $default=60 ;
    Return $default ;
    }
    

    try this in your functions file – if not come back, but suppers ready and I haven’t time to test!

    #151285
    cybarmitzvah
    Participant

    ok, I will delete it, but then, where do I put the code?

    #151283
    Kris35
    Participant

    Hi Luisc9,

    I dont have an anwer for you as I have taken BBPress down for the moment. All I can say is, I have a coder who charges me $15 an hour to fix this kind of stuff. Got him from Elance and he is good and trustworthy. For people who aren’t all that good at fixing this type of stuff, its worth it – well for me it is anyway. Hope someone replies to you soon.

    #151282
    themefurnace
    Participant

    Hi,

    I have finally converted a large forum over to bbPress from Vbulletin,
    The bbPress forum page and threads etc are quite slow – Im just using bbPress + BuddyPress with Twenty Twelve theme at the moment while I code my forum theme.

    The bbPress section of the site is slow – there is a few seconds delay when clicking a thread or onto the forum page itself so guessing this is due to the size – 850k replies, 61k topics and 21k users.

    I wondered if there were any tweaks or recommendations for speeding up the site, Im on my own dedicated server and Vbulletin is blazing fast on it.

    I saw this thread – http://bbpress.org/forums/topic/slow-to-post-forum-topics-and-replies-on-large-forum/ where it mentioned a speed increase in 2.6 for larger forums, any news on that ? Or anything I can try now to test it out ?

    I read that hidden forums might make a difference so I unhid the forum but no speed increase.

    #151279
    Robin W
    Moderator

    the error code is saying that you have whitespace in

    wp-content/themes/awesome/functions.php:1

    If this is a blank file, then delete it.

    If not, then it has a problem on line 1

    #151275
    GamingOrdinance
    Participant

    yep, all the same information and still coming up with:

    WordPress database error: [Table 'db502829828.node' doesn't exist]
    SELECT convert(node.node_id USING "utf8") AS node_id,convert(node.parent_node_id USING "utf8") AS parent_node_id,convert(forum.discussion_count USING "utf8") AS discussion_count,convert(forum.message_count USING "utf8") AS message_count,convert(node.title USING "utf8") AS title,convert(node.node_name USING "utf8") AS node_name,convert(node.description USING "utf8") AS description,convert(node.display_order USING "utf8") AS display_order,convert(node.node_type_id USING "utf8") AS node_type_id,convert(forum.allow_posting USING "utf8") AS allow_posting FROM node AS node LEFT JOIN forum AS forum USING (node_id) WHERE node.node_type_id = "Category" OR node.node_type_id = "Forum" LIMIT 0, 100
    #151272
    TE5LA
    Participant

    I tried changing permalinks but the forums won’t display at all. All that shows is the forum short code.

Viewing 25 results - 10,751 through 10,775 (of 32,511 total)
Skip to toolbar