Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,526 through 7,550 (of 32,519 total)
  • Author
    Search Results
  • #168159
    Robkk
    Moderator

    You can use a bunch of IDs and classes for that simple search button, I went with this. It seems to work if you add !important for the :hover css.

    #bbp-search-form #bbp_search_submit {
        text-indent: 0;
        background: none;
        background-color: #1e73be;
        color: #fff;
        width: auto;
        height: auto;
        border-radius: 0;
        margin-top: 0;
    }
    
    #bbp-search-form #bbp_search_submit:hover {
        background-color: #000 !important;
    }
    #168155
    Pascal Casier
    Moderator

    Hi,

    Did you try something like this ?

    #bbp_search_submit.button {
       background-color: #1e73be;
       ...
    }

    Just guessing, cannot try it myself here.

    Pascal.

    #168153
    gene-stevo
    Participant

    WP: 4.3.1 bbPress: 2.5.8 Theme: Jolene
    Hi Folks,
    I’m trying to tweak the colours of a site I’m building as a “learn WP” excercise and I cant find out how to change the colour of the Search button on my forums page.
    I have Custom CSS installed and I’ve entered this to control the Up and Over states of the SUBMIT button:

    #bbpress-forums .submit {
        background-color: #1e73be;
        color: #FFFFFF;
        float: center;
        vertical-align: middle;
        border-radius: 4px;
        height: 35px;
        width: 120px;
        font-size: 14px !important;
    }
    #bbpress-forums .submit:hover{
        background-color: #82D646;
        color: #FFFFFF;
        float: center;
        vertical-align: middle;
        border-radius: 4px;
        height: 35px;
        width: 120px;
        font-size: 14px !important;
    }

    I’ve also got this to control the colour of the SEARCH button but adding the :hover at the end of a copy of the original CSS, at the end of the id name doesn’t work.

    #bbpress-forums #bbp-search-form input[type=submit], 
    #bbpress-forums #bbp-search-form input[type=submit] {
        text-indent: 0;
        background: none;
        background-color: #1e73be;
        color: #fff;
        width: auto;
        height: auto;
        border-radius: 0;
        margin-top: 0;
    }

    Any Ideas greatly received. The Forums page is here if MEMBERS PAGES password requested it is… ccc

    #168148
    Pascal Casier
    Moderator

    Hi desert-rover,

    Are you looking for a database query to run directly towards the database ? Or are you looking for a piece of PHP code using bbPress and wordpress functions ?

    Pascal.

    #168143
    desert-rover
    Participant

    I understand the concept of WP_Query but am not anywhere near enough of a coder to write one. I need help writing a query that will call up all the replies in a certain month and year, and include the topic and forum the reply is attached to. Can anyone help me with that?

    #168134
    Pascal Casier
    Moderator

    Hi Rourke,
    Not sure I understand your question, but if you want to list all forums, this is a loop I have in one of my plugins:

    	if ( bbp_has_forums() ) {
    		while ( bbp_forums() ) {
    			bbp_the_forum();
    			$forum_id = bbp_get_forum_id();
    			$forums_title = bbp_get_forum_title($forum_id);
    			array_push($all_forums_ids, $forum_id);
    			<...>
    			// Check for subforums (first level only)
    			if ($sublist = bbp_forum_get_subforums($forum_id)) {
    				$all_subforums = array();
    				foreach ( $sublist as $sub_forum ) {
    					<...>
    				}
    			}					
    			$i++;
    		} // while
    	} // if

    Hope it gets you in the right direction,
    Pascal.

    parmaker
    Participant

    I just transferred the whole site, which is housed under a non-bbpress-like CMS package, into bbpress by the built-in tool.

    Every thing looks fine.

    But I have yet to put them in production because of one reason:

    Let’s think about the following:

    1. a visitor landed my home.
    2. he/she went to a forum.
    3. the forum shows topic index and a paginator on top or bottom of topic index box, based
    4. on the max of lines configured.
    5. the visitor travelled back and forth in site the forum by clicking the paginator. for ex, if the forum has 100 topics and max line is configured as 15, then paginator links would be 1,2,3,4,5,6,7.
    6. supposed that the visitor clicked 3-pgnator before clicked 5th topic.
    7. that is, the visitor is reading the 35th topic and replies if any.
    8. at this time the vistor changes mind to go to 2nd page.
      so the visitor go back to the previous topic index before clicking 2-pgnator link.

    Now the visitor grumbles. the topic view page(the one described at 6.) shoud have got the topic index and paginator below the topic view. So we dont need to do extra clicks.

    This scenario is totally from the customers’ view point. Unfortunately, there are some tools in the world prviding such features, and they asked the site builder to implement that feature.

    Because old system has it and the bbpress out of box does not, i do not think the request is wrong.

    I have tried to find a solution, but not. for ex, i put
    echo do_shortcode(‘[bbp-single-forum id=$f_id]‘);
    at the bottom of conent-single-topic.php

    Then looked great, but problem is:

    In case that said above 6., the 3th topic index should be shown but shows 1st page, which is not getting sync’ed with the current topic’s position.

    so i have to look into source code.

    As far as I learned from it, bbp-single-forum short code is the very candidate, I guessed. But no clue to me.

    display_forum function is out of control by myself, I guess.

    Hopefully, some help or idea is in need. Or, let me know what I missed or overthought.

    Thanks.

    #168127
    parmaker
    Participant

    Maybe similar with me.

    bbpress.org support forum’s landing page shows elegantly topic titles and paginator at the bottom. That’s good. Now we are clicking the paginator a couple of time, i.e we are in page #4, where clicked a topic.

    Then we can see a lead topic and replies if any. So if we want to next pages, we should get out of the topic and back to the previous, then we click again paginator to go further.

    From the view point of bbpress, it is so natural. But little bit redundant transactions were. If the topic view can duplicate the single forum topic index into bottom part, it might be to cut down one transaction from visitor. (customers complain redundant click, they dont care how, but developer cares)

    up to this point, only one statement – echo do_shortcode(‘[bbp-single-forum id=$forumid]‘) is enough to put at the bottom of conent-single-topic.php

    But problem is that it always shows from the very first page. If i am reading a topic of 5th page, the above shortcode should get synced, but still shows from very first.

    display_forum of BBP short code class does not show any clue to this issue.

    my straight guess is bbp developers consider kind of a heavy burden to mysql because entire topic-typed posts should be read for every single topic view.

    In real world out of bbpress, their forum package provide such features.

    One reason that i wrote this, to ask around you what I missed or now mislead, and better idea.

    If you think this repl is not related to this topic, i am sorry.

    sk90
    Participant

    How can I change the freshness parameter of Recent Topics in the Forum Index, which appears by pasting the shortcode [bbp-forum-index]?

    Right now it says No Topics for all the forums I have (please see link: http://mavipamumb.ns36.interactivedns.com/forum/ ). I want it to show the date of the last topic or post in that forum.

    Please let me know if it can be done.

    Thank you.

    #168098

    In reply to: Registration problem

    Robkk
    Moderator

    This could be your host adding an extra security layer to your website. You may need to contact their support team.

    Following this guide could help too.

    https://codex.wordpress.org/Login_Trouble

    #168094
    iJamesPine
    Participant

    So as of approximately 10:30pm Sunday night the last reply was posted to my website jamiepine.com/forums. Users of my site were unable from that point on to post replies to any topic in any forum on my site.

    It allows them to write their reply, then upon clicking submit, the page reloads and the reply isn’t there. I’ve spent over 13 hours trying to find something that could be causing a conflict or error that would prevent replies being created. Here’s what I’ve tried so far:

    – I’ve disabled ALL plugins aside from bbPress
    – I’ve disabled the my theme (switched to TwentyTwelve, TwentyThirteen and TwentyFourteen)
    – I’ve done both of the above at the same time & on their own
    – I’ve disabled Cloudflare (my CDN / cache service) [it’s still disabled]
    – I’ve updated all plugins and themes
    – I’ve typed every possible phrase relating to this problem into Google in effort to find answers
    – I’ve inspected the database to the best of my knowledge**

    **I’ve noticed bbPress is creating many revisions of old replies from last year even when the site was in maintenance mode and no users were able to access. I was also receiving an email telling me I’d received a new reply to my topics (from 2014) when I wasn’t even touching the site. It’s essentially gone senile.

    I’d list all my plugins, but my problem is I’ve changed nothing before 10:30PM that Sunday other than adjusting plugin settings in WP Super Cache, which is now disabled. In fact I know the pages aren’t cached because I can update anything else on these pages and create new topics; I just can’t reply.

    My theme clearly isn’t the problem as it’s still broken at a core level; but it is my own child theme of Canvas.

    The only thing I can think of is that I installed a plugin called bbPress AJAX replies a few hours prior to the problem, but that plugin did nothing of use anyway so I removed it straight away. I also inspected the code and didn’t find anything that would cause a lasting effect on the site, no database communications of any nature.

    …But it looks to be a database issue?

    This has caused me no end of headache and I’d greatly appreciate some help, I’ll provide you with any details you need / admin login to the site. I have hundreds of users waiting to use the site.

    Thanks in advance,
    Jamie

    #168089
    Loc Pham
    Participant

    I registered a new rest endpoint and wrote functions to retrieve all the replies with the code below. Although the code works, I’m not really happy with it because I’m not able utilize built in filtering (i.e. paged, order, posts_per_page… etc). This code is not optimize because it has no pagination and will retrieve all replies at once (can be bad if there are thousands of records).

    
    function ldp_get_topic_replies( $data ) {
    	$topicID = $data['id'];
    	
    	// Get an array of all replies belonging to a specific topic
    	$repliesID = bbp_get_all_child_ids($topicID, bbp_get_reply_post_type());
    	
    	$response = array();
    	
    	foreach ($repliesID as $replyID) {
    		$response[] = ldp_get_topic_reply($replyID);
    	}
    	
    	return $response;
    }
    
    function ldp_get_topic_reply( $replyID ) {
    	$reply = array(
    		'author_name'	=> bbp_get_reply_author_display_name($replyID),
    		'author_email'	=> bbp_get_reply_author_email($replyID),
    		'author_url'	=> bbp_get_reply_author_url($replyID),
    		'author_avatar'	=> get_avatar_url(bbp_get_reply_author_id($replyID)),
    		'link'			=> bbp_get_reply_url($replyID),
    		'reply_to'		=> bbp_get_reply_to( $replyID ) == 0 ? NULL : bbp_get_reply_to( $replyID ),
    		'topic_title'	=> bbp_get_reply_topic_title($replyID),				
    		'meta'			=> bbp_get_reply($replyID),
    	);
    	
    	return $reply;
    }
    
    #168088
    Loc Pham
    Participant

    Hi Pascal, thanks the these links. However those addressed the problem seen in WP REST Api version 1 and version 2 is the refactor code for WP REST API which will eventually go into WordPress Core. Version 2 is what I’m using and it doesn’t work as explain in those blog.

    #168084
    Rourke
    Participant

    I’ve changed the loop-single-forum.php template file so that the frontpage contains all the forums on a single page. It look like this.

    I’m also trying to implement a plugin called bbPress Unread Posts v2. It’s placing an icon before every forum title to notify the user when new posts/topics have been made in a forum.

    As you can see in the template I’m firing bbp_list_forums() to list the forums. However this function does not fire the action bbp_theme_before_forum_title which means a plugin won’t affect these lists of forums.

    I can imagine I need a manual way to list all forums so I can fire a do_action. But how would I be able to do that?

    Pascal Casier
    Moderator

    216000000 ? How many replies you had ???

    It seems that SQL will be your only option them. After running the SQL, repair/reset the forums to be sure.

    USE WITH CAUTION, MAKE SURE TO HAVE A BACKUP OF THE DB.

    DELETE a,b,c FROM wp_posts a
    LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)
    LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)
    WHERE a.post_type IN ('forum', 'topic', 'reply')
    #168072
    Robkk
    Moderator

    Create a custom view instead.

    Add this php code snippet into your functions.php file in your child theme or in a functionality plugin.

    function rkk_register_custom_views() {
    	bbp_register_view( 'viewid', __( 'View Name' ), array( 'topic-tag' => 'tag1, tag2' ) );
    }
    add_action( 'bbp_register_views', 'rkk_register_custom_views' );

    Then you can put this shortcode in a page.

    [bbp-single-view id=”viewid”]

    #168069
    Robkk
    Moderator

    If it is there then that is when you are going to use bbPress hooks and filters. Since I see how you are doing it, only thing I can suggest possibly filtering the topic index shortcode, using a custom template for the layout, and just listing the last few replies right under. I am sure what you are doing is possible though. Try to learn the best you can from bbPress’s code and create the functionality you want.

    #168068
    Robkk
    Moderator

    I think as far as wordpress can go is, but you have to create a custom folder in the uploads directory.

    <img src="/wp-content/uploads/images/image.png" />

    And possibly this if you have the images in your theme.

    <img src="/wp-content/theme/images/image.png" />

    You have to have all these images on your site for it to work.

    It might be possible to change the image source, but it might depend on how you are sending this data to bbPress.

    #168057
    Robkk
    Moderator

    Tell me exactly what you are trying to do. It kind of sounds like you just want to borrow code from bbPress and use it somewhere else.

    Are you trying to create a function that is related to the bbPress plugin and other WordPress pages??

    #168055
    Robkk
    Moderator

    Oh yeah no problem.

    Here is a couple things I found when visiting your site.

    The first item in your forum index is a little off because of the bbPress breadcrumbs.

    Adding this CSS will help.

    div.bbp-breadcrumb {
        width: 100%;
    }

    There is an issue with the Freshness column text not really displaying right.

    #bbpress-forums p.bbp-topic-meta {
        text-align: inherit;
    }
    #168042
    Pascal Casier
    Moderator

    Hi,
    If you look for features image, I did not try it myself yet, but somebody seem to has found something:
    https://wordpress.org/support/topic/new-post-featured-image-section-not-showing-after-bbpress-code?replies=2

    Hope it helps.
    Pascal.

    #168037
    intristin
    Participant

    I created a new page, I added the shortcode, I choose the template with no sidebar on the page I created, and bbpress just ignores it completely. I also tried a suggestion in another post about adding code to the style.css but that didn’t work as I was never very good with css. The wordpress theme I am using is called point and can be found here: https://wordpress.org/themes/point/

    If anyone could perhaps nudge me in the correct direction I would appreciate it, thanks.

    #168036

    In reply to: Translate bbpress

    Pascal Casier
    Moderator
    #168035
    Robkk
    Moderator

    You need custom code. This is the custom code you will need to display it in your forums. Place it in your functions.php file, bbpress-functions.php file, or in a functionality plugin.

    function rkk_mentionname_in_bbp() {
        $user = get_userdata( bbp_get_reply_author_id() );
            if ( !empty( $user->user_nicename ) ) {
                $user_nicename = $user->user_nicename;
                echo "@".$user_nicename;
            } 
    }
    
    add_action( 'bbp_theme_after_reply_author_details', 'rkk_mentionname_in_bbp' );
    add_action( 'bbp_theme_after_topic_author_details', 'rkk_mentionname_in_bbp' );
Viewing 25 results - 7,526 through 7,550 (of 32,519 total)
Skip to toolbar