Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,376 through 11,400 (of 32,504 total)
  • Author
    Search Results
  • #148890
    Leonyipa
    Participant

    bump please,

    I tried but I cannot remove it, can you tell me which piece of code do I need to remove? Thanks

    #148888
    slayne76
    Participant

    Hi,
    I run a couple of different bbpress installations, of course they’re both up-to-date (2.5.4)

    I noticed that on both installations, when you trash a topic, and you try to “un-trashit” you receive a nonce error.

    I’m not sure if this issue depends on my personal configuration, but of course i disabled all other plugins and used a fresh wp install.

    Being a PHP developer I digged inside the core files of bbpress and I noticed that in includes/topics.php on line 818 the nonce is generated with

    wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID )

    so the “sent” nonce is basically untrash-topic_<ID>, while the nonce check on wordpress (on post.php line 265 is:

    check_admin_referer('untrash-post_' . $post_id);

    or basically untrash-post_<ID>.

    Can anyone tell me if other people found out a similar issue untrashing topics or is it just me? Thanks in advance for your support 🙂

    #148883
    Robin W
    Moderator

    if it’s not working try

    color: #404040 !important;

    if bbpress loads after your theme, then it’ll overwrite changes made in your css, ie revert them back

    #148882

    In reply to: Topic Index Shortcode

    Robin W
    Moderator

    yes, I’ve started a plugin that does some different shortcodes, and at the moment one that does just that is all that’s in there

    bbp additional shortcodes

    #148879
    localmarketingus
    Participant

    Is there a way for me to redirect the submit button on the bbp-topic-form to an email address (like mailto:xys@whatever.com) rather than have it post a thread? I want people to be able to use the functionality of bbpress to add html and insert code if needed but want it to function more like a contact form.

    Any suggestions are appreciated

    #148878
    LeafyGrove
    Participant

    While adjusting the topics/reply color for my site, I seem to run into a bit of a snag with trying to change the admin links coloring. I’m using Catch Evolution for a theme and as such there is a area in options to put custom css code. This is what I have thus far:
    ” #bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-reply-header, #bbpress-forums a.bbp-admin-links { color: #404040; }

    I do plan on having admin links a different color, I just tossed it in there to test to make sure it’s correct/changes.

    #148877
    joeyaberle
    Participant

    Is there a way to limit how many topics show up with this shortcode? Fifteen is a little too much for our site.

    Sorry if this is somewhere else, I couldn’t find it.

    #148875
    Robkk
    Moderator

    @robin-w (hope this doesnt confuse you anymore)

    i have done that already

    i added the filter to my functions.php to leave the reply links on both topic and replies

    now im trying to make a drop-down menu with the rest of the other links on both topic and replies , right by the admin links by adding an html menu with the rest of the other links(trash, split, spam, etc.)

    when creating a menu i use echo bbp-get-name-of-link between li that is between a ul which makes a menu in html , and this shows each other admin link in a dropdown menu

    however i want the topic admin links to be on topics and the reply admin links to be on replies each in their own dropdown menu

    and if i use these two functions in loop-single-reply (where i am building my menu)

    -this is an example- if i use topic_reply_link and reply_tp_link it would be the same

    `<?php echo bbp_get_topic_edit_link(); ?>

    <?php echo bbp_get_reply_edit_link(); ?>`

    there will be 1 edit link in the topic (topic_edit_link) , and two edit links in the reply (topic_edit_link and reply_edit_link)

    so i have to fix the two edit links on replies when creating a dropdown menu

    or find a way to make a dropdown menu using a function so that it will show two different dropdown menus for the topic and the reply

    #148872
    Robkk
    Moderator
    <?php if ( bbp_is_topic() ) 
    echo bbp_get_topic_reply_link(); ?>
    <?php if ( bbp_is_topic() ) 
    return bbp_get_topic_reply_link(); ?>

    these dont show an error but it wont show the link

    #148870
    Robkk
    Moderator

    oh yeah in loop-single-reply i have my admin links on the very bottom of the template and i have this code right above it

    #148869
    Robin W
    Moderator

    where are you putting this code – is it in a bbpress template?

    #148868
    Robkk
    Moderator

    @robin-w i couldnt get the if ( bbp_is_topic function working

    i wanted to test out if i could do this , took code from this

    <div class="dropdown" id="dropdown">
    				<input type="checkbox" id="drop1" />
            <label for="drop1" class="dropdown_button">Topic Tools</label>
            <ul class="dropdown_content">
                <li class="active"></li>
                  <li> <?php echo bbp_get_reply_to_link(); ?></li>
                  <li><?php if ( bbp_is_topic( $r['id'] ) ) {
    echo bbp_get_topic_reply_link(); ?></li>
                  <li><?php if ( bbp_is_topic( $r['id'] ) ) {
    return bbp_get_topic_reply_link(); ?></li>
            </ul>
            
        </div>

    then make a dropdown menu from that i guess , but im just swinging the dark not really getting a exactly great way of doing what i want to achieve.

    plus i might have to go to a jquery menu template like this

    because the css menus arent working on all replies.

    Jerry
    Participant

    All css changes are within my child theme. For my child-theme’s style.css, I added this at the very bottom:

    /*Changes made to accommodate plugin recent-bbpress-changes*/
    #content ul {
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    list-style: none;
    }

    For my bbpress.css in my child-theme, I added this around line 158 or so:

    li.bbp-topic-title {
    	float: left;
    	text-align: left;
    	width: 20%;

    One note on bbpress.css. The original bbpress.css had some combined lines that I separated. For example, I think that li.bbp-topic-title was combined with li.bbp-forum-info, as in the following manner:

    li.bbp-forum-info,
    li.bbp-topic-title {
    	float: left;
    	text-align: left;
    	width: 20%;

    But I could be wrong. Doesn’t matter. Separating them appears to be just fine.

    #148861
    Robkk
    Moderator

    you want to change the

    links that come up with a topic or reply so that only some show, and others are in a dropdown list.

    is that correct?

    yes

    This also gives you the ability to add a new link

    yeah i added the topic favorite link to see if it worked and it did with the ajax too
    and also a mark topic as read from the bbpress go to first unread plugin

    You’ll also see that this function checks if it is a topic on line 1825

    i used this as a filter for the topic admin links

    //change admin links displayed
    function change_topic_admin_links ($r) {
    $r['links'] = apply_filters( 'rw_topic_admin_links', array(
    				'edit'  => bbp_get_topic_edit_link ( $r ),
    				'reply'  => bbp_get_topic_reply_link ( $r )
    				
    			), $r['id'] );
    return $r['links'] ;
    }
    add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' ) ;

    i tried using this function to post a single admin link for a topic
    and also just by replacing return with echo
    but i cant seem to get that to work

    if ( bbp_is_topic( $r['id'] ) ) {
    			return bbp_get_name_of_link();
    		}
    
    		if ( !bbp_is_reply( $r['id'] ) ) {
    			return bbp_get_name_of_link() ;
    		}
    #148860
    Robin W
    Moderator
    if (is_bbpress()) :
     div class=”abc”
    else :
     div class=”xyz”
    endif;

    translates to

    if you are on a bbpress screen/page/display [as opposed to a wordpress blog post or page, a home page or anything that isn’t bbpress]

    the use div class abc

    if you are on any other type of page use class xyz.

    Many themes use if statements checking against ‘conditional tags’ to style areas for instance the conditional tag is_home() checks whether this is the home or index page.

    #148858
    ninjaunmatched
    Participant

    Okay I found the code which is on this site actually.

    click here

    But the code mentioned:

    if (is_bbpress()) :
    div class=”abc”
    else :
    div class=”xyz”
    endif;

    Still would not make sense to everyone. So I’m thinking the first part is the main part. After the colon you would change the div class to whatever you want change which would be some of the classes mentioned in this thread to another class that you create which simply just changes the font size.

    I’m thinking this way you would have to create your own classs for each thing you want to change in bbpress whether it was the reply text, the header text, or the content text. If I am off a bit or a lot just chime in. Hope it helps.

    Jerry
    Participant

    Got it solved! First, sorry for all the responses. I got lazy in posting the above instead of searching for the solution in the wordpress codex first. Turns out there is a function to return to the current blog, which I inserted within the “if” statement. Specifically, it is “restore_current_blog();”. Here is the working code:

    <?php
    /* 
    		Plugin Name: Recent bbpress Topics
    		Plugin URI: http://whosgotbooks.com/wp-content/plugins
    		Description: A plugin to display recent bbpress topics across the network
    		Version: 1.0.0
    		Author: Jerry Caldwell
    		Author URI: http://whosgotbooks.com
    		License: Open Source
    */ 
    /*
    Here is the shortcode required [recent-bbpress-topic]
    */
    function recent_bbpress_topics_shortcode() {                  
      recent_bbpress_topics(); }
      add_shortcode( 'recent-bbpress-topics', 'recent_bbpress_topics_shortcode' );
    
    //Add Recent Topics to BBPress
    function recent_bbpress_topics() {
    		switch_to_blog(9);
      if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 7 ) ) ) { 
          bbp_get_template_part( 'bbpress/loop', 'topics' );
          restore_current_blog();
          }
    // Hook into action
    add_action('bbp_template_after_forums_loop','recent_bbpress_topics');
    } ?>

    For anyone who wants to use this, a few more points. One, don’t forget the formatting for style.css. Two, I changed that formatting within a child theme. Three, I can’t guarantee you will have the same results with your formatting as I have made many other formatting changes the past few months for my site. Lastly, I did not “network activate” my plugin. I only activated it on the main site.
    As I get time I will add comments and try to increase the functionality of this plugin. Right now it is very basic. Maybe I’ll get good enough to publish it?

    #148856
    ninjaunmatched
    Participant

    I know it does cascade but if you are not familiar with writting the code to STYLE over attribiutes you can go looking for lines that alter font sizes. One way you could try is to get Notepad++. This text editer is just the greatest. Never edit code without it or something like it. You can use it to search for code. In this case I would try to search for “font-size:” within the CSS file being referred to in this thread. It will find every line where the font-size is being changed.

    Trying it now it finds 28 hits in the bbpress.css file I have in one of my sites. This I think will get you started. May not be the best way though. Just looking at the hits I can see some of the IDs or Classes also have a SPAN tag in them. Whichs tell me that the default span font settings would also have to be changed.

    I’m not sure where your HTML knowledge is but the SPAN tag when used is like a commenting or caption section (sort of) for text and it tends to be in a smaller font.

    for example:

    While jumping around the hits I see this:

    li.bbp-header div.bbp-topic-content span#subscription-toggle,
    li.bbp-header div.bbp-topic-content span#favorite-toggle,
    li.bbp-header div.bbp-reply-content span#subscription-toggle,
    li.bbp-header div.bbp-reply-content span#favorite-toggle {
    float: right;

    You may be able to get the look you want by just changing any

    font-size:

    entry you find but if things or some things still look too small for you then that span tag may be what you need to change to get it the way you want.

    Now I’m still just maybe a intermediate in my kowledge of things. I know what I was taught by learning myself and having taken Wed Design and Development I and II at a local college. But I am no developer. So I can read through css and understand what is going on. But because of the cascading way of CSS you can make changes that will not stick due to a higher level attribute being set so you have to play detective which wastes alot of time.

    I do agree though as the responses are too vague. Looking for the same answer I find this thread and so I am sharing what I have done so far to figure this one out. I did find something that mentions being able to use an IF statement on the themes main style sheet (CSS file) that will find all bbpress related entries and change whatever attribute you designate which in this case would be the font size. Now someone mentioned this in this thread without stating how which is close to pointless if the intention is to help you solve it. At least when you make the suggestion state it in a simple way so its understood by all. I ran into this code during my research on it but I am currently here. I will copy paste the code if I can find it again. By now I assume you found the answer but for anyone else that runs into this thread. (which by the way showed up on top of a google search in like its own special section).

    Jerry
    Participant

    Update on this. It turns out my code was insufficient. If have fixed it, sort of, which has led to another problem. First, here is the updated code:

    <?php
    /* 
    		Plugin Name: Recent bbpress Topics
    		Plugin URI: http://whosgotbooks.com/wp-content/plugins
    		Description: A plugin to display recent bbpress topics across the network
    		Version: 1.0.0
    		Author: Jerry Caldwell
    		Author URI: http://whosgotbooks.com
    		License: Open Source
    */ 
    function recent_bbpress_topics_shortcode() {                  
      recent_bbpress_topics(); }
      add_shortcode( 'recent-bbpress-topics', 'recent_bbpress_topics_shortcode' );
    
    //Add Recent Topics to BBPress
    function recent_bbpress_topics() {
    	switch_to_blog(9);
      if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 7 ) ) ) { 
          bbp_get_template_part( 'bbpress/loop', 'topics' );
          }
    // Hook into action
    add_action('bbp_template_after_forums_loop','recent_bbpress_topics');
    } ?>

    Using the line “switch_to_blog(9);” works great to get the topics from site 9 to the main site. But now my problem is; it brings some unwanted behavior. The main content looks great, but the sidebars change to the format of site 9. Perhaps this has become a wordpress issue and not a bbpress issue? Perhaps I need to use code in addition to “switch_to_blog(9);” that prevents the unwanted behavior? If I need to change this to a wordpress thread, please let me know and I will. Otherwise, if you can provide a solution, that would be great.

    Jerry
    Participant

    Thanks Robin! Thanks Peter! After some trouble-shooting, the answer is as follows:

    #content ul {
    padding: 0;
    margin-left: 0;
    list-style: none;
    }

    For some reason, if I use “ul” twice after “#content”, it doesn’t quite work.
    I was using firebug, and had identified line 118 in style.css, but just didn’t make the exact connection on how to change it. I used firebug again this morning, and learned how to use it better, so thanks for leading me to a great lesson!
    Robin; if you want to make this into a plugin where the user gets some options on the back-end, I will be happy to help with the grunt work and you can post it and get the credit. Just let me know, and give me some direction.
    Thanks again…

    PS For anyone who uses this code, I made the css changes in my style.css within my Child Theme, not the main style.css.

    #148852
    mattmatt88
    Participant

    I already have a multisite with subdomains:

    myurl.com
    page1.myurl.com
    page2.myurl.com
    page3.myurl.com

    Now I want, that the same forum content is used for every page.
    So the same forum should be available for every page:

    myurl.com/forum
    page1.myurl.com/forum

    For example, I’ve got a points system plugin that is multisite compatible (mycred).
    I just have to set it on the main page (myurl.com) and the points logs are the same on every page. That’s what I would need for the forum.

    Why I need it on every page and I’m not just linking to the main page forum:
    e.g. because I want to use shortcodes/widgets to show the user the most recent forum topics, doesn’t matter if he is on a subsite (e.g. page2.myurl.com/forum).

    Thanks a lot

    #148849

    In reply to: Remove Private Tag

    Robin W
    Moderator

    yes put this code in your functions file

    add_filter('protected_title_format', 'ntwb_remove_protected_title');
    function ntwb_remove_protected_title($title) {
    	return '%s';
    }
     
    add_filter('private_title_format', 'ntwb_remove_private_title');
    function ntwb_remove_private_title($title) {
    	return '%s';
    }

    for information on functions files see

    Functions files and child themes – explained !

    #148844
    peter-hamilton
    Participant

    Thanks for checking it out, is there a way you could upload an image of how it shows, and what screen resolution do you use cause my @media css is not complete.

    Yep I am redoing all CSS from scratch and added the essential plugins hardcoded to make them less bulky on code.

    Again I really appreciate all input to make this a reasonable theme for all to use.

    Peter Hamilton

    Jerry
    Participant

    I have been working for about 5 days to get topics from a forum on one site to show on my main page, which is a separate site. I’m running current versions of wordpress multisite, bbpress, and buddypress on my main page.

    I found some code via my searches and created a simple plugin. It works to display topics from a separate site on my main page. That was a victory for sure. The problem I am now having is the formatting! Arrghh! I cannot get it to format correctly.

    I know that others have been wanting to do this, so perhaps someone else can get me to the final step and we can publish a good plugin. Here is the code:

    <?php
    /* 
    		Plugin Name: Recent bbpress Topics
    		Plugin URI: http://whosgotbooks.com/wp-content/plugins
    		Description: A plugin to display recent bbpress topics across the network
    		Version: 1.0.0
    		Author: Jerry Caldwell
    		Author URI: http://whosgotbooks.com
    		License: Open Source 
    */ 
    
    function recent_bbpress_topics_shortcode() {                  
      recent_bbpress_topics(); }
      add_shortcode( 'recent-bbpress-topics', 'recent_bbpress_topics_shortcode' );
    
    // ! // Add Recent Topics to BBPress
    function recent_bbpress_topics() {
      if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 8 ) ) ) { 
          //bbp_get_template_part( 'bbpress/loop', 'topics' );
          bbp_get_template_part( 'loop', 'topics' );
          }
    // Hook into action
    add_action('bbp_template_after_forums_loop','recent_bbpress_topics');
    
    } ?>

    I have been trying to get this to format with bbpress.css. I managed to changed the css on one of my sites to get things how I want, but I can’t with this function. Here is a link of how I want things to look: http://whosgotbooks.com/book-reviews/
    And here is the link of the main page, where I can’t quite get it the way I want it: http://whosgotbooks.com/

    Here is the bbpress.css that worked on the review page, but doesn’t work for the main page:

    li.bbp-topic-title {
    	float: left;
    	text-align: left;
      overflow: hidden;
    	width: 75%;
    }
    #bbpress-forums li.bbp-body ul.topic {
    /*	border-top: 1px solid #7D573A; */ 
      border-top: transparent;
    	overflow: hidden; 
      display: inline-table;  
    	padding: 8px;
      width: 22%;
    }

    To get the books somewhat organized on the main page, I had to change width to 20% on the bbp-topic-title class above, and the bbp-body ul.topic changes do not help on the main page.
    This is the extent of my abilities. I would love to get rid of those annoying dots as well. Hopefully someone can help me get the rest of the way.
    Thanks…

    #148823
    Robin W
    Moderator

    If you’ve cracked the code for the submenu, then groups are a buddypress thing, so their forum might be better.

    But from total ignorance try….

    If you’ve phpmyadmin access, you could set up a user for a group, and see what changes in the usermeta, and then use this to create your filter

    eg
    if say you found that buddypress_group was what was used for groups, you could set the group using

    $current_user = wp_get_current_user();
    $group=get_user_meta( $current_user , 'buddypress_group', true);
    

    then dependant on group

    if ($group==22) then...
    if ($group==23) then....
    
Viewing 25 results - 11,376 through 11,400 (of 32,504 total)
Skip to toolbar