Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,926 through 6,950 (of 32,585 total)
  • Author
    Search Results
  • #172021

    In reply to: Responsive Issue

    Anticosti
    Participant

    I solved this issue (plus some others) on my side, by adding this CSS:
    Hope this may help someone else….

     
    input#bbp_search { 
      margin: 0.25em 0.25em 0.25em 0.25em;
    }
    li.bbp-header {
      margin-top: 0px !important;
      margin-bottom: 2px !important;
      border: solid 0px red !important;
    }
    /* START -- Main Effect on Forum width on small devices */
    ul.forum-titles li {
    text-transform: uppercase !important;
      font-size: 12px !important;
    }
    li.bbp-forum-info, li.bbp-topic-title {
        width: 40%;
    }
    li.bbp-forum-topic-count, li.bbp-topic-voice-count, li.bbp-forum-reply-count, li.bbp-topic-reply-count {
        width: 15%;
    }
    li.bbp-forum-freshness, li.bbp-topic-freshness {
        width: 30%;
    }
    /* END -- Main Effect on Forum width on small devices */
    
    #bbpress-forums ul[id*='forums-list-'] {
      padding: 0px !important;
      border: solid 0px red !important;
      margin-bottom: 2px;
    }
    #bbpress-forums ul[id*='forums-list-'] li.bbp-body ul[id*='bbp-forum-'] {
      	padding: 10px !important;
        border: solid 0px red !important;
      	margin-bottom: 2px;
    }
    #bbpress-forums ul[id*='bbp-forum-'] {
    border-radius: 0px;
        -webkit-border-radius: 0px;
        -moz-border-radius: 0px;
        -ms-border-radius: 0px;
        -khtml-border-radius: 0px;
        -o-border-radius: 0px;
      	padding: 0px !important;
        border: solid 0px red !important;
      	margin-bottom: 2px;
    }
    #bbpress-forums ul[id*='bbp-topic-'].post-inner {
      border-radius: 0px 0px 0px 0px !important;
        -webkit-border-radius: 0px 0px 0px 0px !important;
        -moz-border-radius: 0px 0px 0px 0px !important;
        -ms-border-radius: 0px 0px 0px 0px !important;
        -khtml-border-radius: 0px 0px 0px 0px !important;
        -o-border-radius: 0px 0px 0px 0px !important;
    
    }
    #bbpress-forums ul[id*='bbp-topic-'] {
    padding: 10px !important;
      margin-bottom: 2px;
      border: solid 0px red !important;
    }
    
    #bbpress-forums p.bbp-topic-meta img.avatar,
    p.bbp-topic-meta span.bbp-topic-freshness-author a img.avatar {
      display: none;
    }
    	 

    Kind Regards,

    #172018
    stewmills
    Participant

    Ok, here’s my dilemma. I have a corporate website and we are working on adding a forum. After working with bbPress for a couple of weeks I like what I see and have a good working shell, but as I get deeper I have some concerns with integrating a forum into my WordPress site versus completely stand-alone.

    My question is, on a single host is there a way to have bbPress installed and totally separate from the main website. For example, current forum requests get added to my users within WordPress. While they get credentials to only have forum access and not WordPress access, it still concerns me that this is leaving open back doors for smart hackers to sneak in to my WordPress administration. I had to install some bbPress code in my functions file to stop non-administrator profiles from seeing the WordPress main menu at the top of the forum. This just seems too loose, as if hiding it with code really stops someone that knows what they are looking for from finding it.

    With that, in having to add code such as this I subsequently shut down my entire site due to adding code the functions.php file that it didn’t like. Not a good situation for me. So, my second and really primary question is how I can have a forum administered in WordPress but totally separate from my main website. What I feel this gives me is 1) totally separate sites where my forum user profiles are not intermingled with my WordPress corporate site administrators and 2) a separate place where I can make site changes that I know only impact the forum and not the main site at all, so if I hose the forum temporarily it’s not as big of a crisis as if I shut down our entire web presence.

    Can this be done on the same host where I have a subdomain and a separate WordPresss login for the forum as if the main website didn’t exist, or am I better off just having these creates separately under truly separate hosts and just pointing a URL on the corporate site’s menu to the stand-along forum that’s on the separate host and managed as a totally independent website?

    I appreciate your suggestions.

    #172017
    awal16
    Participant

    I have a problem with custom capalities. I have this code in my functions.php in the child-theme:

    // Nieuwe forumrolnaam toevoegen
    function add_new_roles($bbp_roles){
    	$bbp_roles['bbp_global_moderator'] = array(
    		'name' => 'Globale moderator',
    		'capabilities' => custom_capabilities( 'bbp_global_moderator' )
    	);
    	return $bbp_roles;
    }
    
    // Nieuwe forumregels toevoegen
    add_filter('bbp_get_dynamic_roles', 'add_new_roles', 1);
    
    function add_role_caps_filter($caps, $role) {
    	// Only filter for roles we are interested in!
    	if ($role == 'bbp_global_moderator')
    		$caps = custom_capabilities($role);
    	
    	return $caps;
    }
    
    add_filter('bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2);
    
    function custom_capabilities($role) {
    	switch($role) {
    		// Capabilities for 'global_moderator' role
    		case 'bbp_global_moderator';
    			return array(
    				// Primary caps
    				'spectate'				=> true,
    				'participate'			=> true,
    				'view_trash'			=> true,
    				
    				// Forum caps
    				'publish_forums'		=> false,
    				'edit_forums'			=> false,
    				'edit_others_forums'	=> false,
    				'delete_forums'			=> false,
    				'delete_others_forums'	=> false,
    				'read_private_forums'	=> true,
    				'read_hidden_forums'	=> false,
    				
    				// Topic caps
    				'publish_topics'		=> true,
    				'edit_topics'			=> true,
    				'edit_others_topics'	=> false,
    				'delete_topics'			=> true,
    				'delete_others_topics'	=> false,
    				'read_private_topics'	=> true,
    				
    				// Reply caps
    				'publish_replies'		=> true,
    				'edit_replies'			=> true,
    				'edit_others_replies'	=> false,
    				'delete_replies'		=> true,
    				'delete_others_replies'	=> false,
    				'read_private_replies'	=> true,
    				
    				// Topic tag caps
    				'manage_topic_tags'		=> false,
    				'edit_topic_tags'		=> false,
    				'delete_topic_tags'		=> false,
    				'assign_topic_tags'		=> false,
    			);
    			break;
    		default :
    			return $role;
    	}
    }

    When I set a user to the specific role, he/she can’t read the closed forum or topic. I get the 404 error: oops, can’t find that page. When I set the user to a standard role, like moderator, it’s fine. So, I copied the same rules capabilities (true/false part) of the moderator, to my functions.php in the child, but that doesn’t seem to help. What is going wrong?

    #172007
    Robin W
    Moderator

    on first issue – We need a link to your site to be able to see what is happening

    On second – this will let you display a badge dependant on no. posts – load it and if you like what it does I can give you a piece of code to make it work for user levels

    #171997
    selenii
    Participant

    I want to delete this function.

    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#21-show-5-recent-topics-after-forum-index

    How can I make this?

    And how can I put into the Forumlist widget all forums with subforums?

    #171996
    Robin W
    Moderator
    #171995
    Pascal Casier
    Moderator

    The SQL I have is to wipe out ALL data from bbPress, so that’s not what you want.

    Workaround proposal:
    If you go on your dashboard > Replies > All Replies (so /wp-admin/edit.php?post_type=reply), and then select the forum in the dropdown box that says ‘in all forums’ and click filter.
    In the screen options, put the ‘number of items’ to e.g. 100.
    Delete some screens in this way…

    Does that work ?

    Then the same with the topics, empty the trash and try to delete the forum.

    Pascal.

    #171994
    Pascal Casier
    Moderator

    What exactly do you want to edit ?
    That shortcode will show you the index table. If you want to change something in it, have a look at https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ if you find what you want to change.

    Pascal.

    #171981
    Pascal Casier
    Moderator

    After you installed bbPress, 3 new items should appear in your dashboard: Forums, Topics and Replies. That last one shows all the replies.
    The standard link is /wp-admin/edit.php?post_type=reply

    Pascal.

    #171980
    Pascal Casier
    Moderator

    For the forum list in your sidebar, check the widget: https://codex.bbpress.org/features/widgets/

    To edit the ‘index forum page’, create a standard WordPress page and change the slug to ‘forums’. This new page will then be used in stead of the standard list. You can then of course use the [bbp-forum-index] shortcode to display the list of forums.

    Pascal.

    #171979

    In reply to: smiles in the bbpress

    selenii
    Participant

    Yes it works, but how can I insert it on my text tool as a bbcode for the choice. I will that my users have one option to choice some smile from the list.

    #171977

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    As bbPress is using WordPress below, it supports the basic ones.
    When I type :-) or :-P, it automatically converts them to πŸ™‚ or πŸ˜›

    So if you have set that option, it comes automatically.

    Pascal.

    #171971

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    As said, the basic ones are already in WordPress (Dashboard: Settings > Writing > Formatting).

    If you want more, but no full plugin, check the code of the above plugins to see how they did it.

    Pascal.

    #171962

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    Hi,

    If you want custom smilies or stickers, then check for plugins like ‘wp-Monalisa’ or ‘Font Emoticons’, however bbPress can use WordPress’s supplied smilies, see https://codex.wordpress.org/Using_Smilies and https://codex.wordpress.org/Emoji
    πŸ˜› πŸ’€ πŸ‘» πŸ‘½ 😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 πŸ™Œ πŸ‘ πŸ‘‹ πŸ‘ πŸ‘Š

    Pascal.

    #171961
    selenii
    Participant

    How can I use smiles in the bbpress. I will insert it in my reply form.

    For example with:

    <script type="text/javascript">
    function addsmile($smile){
    document.getElementById('comment').value=document.getElementById('comment').value+' '+$smile+' ';
    }
    </script>
    <?php
    global $wpsmiliestrans;
    $dm_showsmiles = '';
    $dm_smiled = array();
    foreach ($wpsmiliestrans as $tag => $dm_smile) {
     if (!in_array($dm_smile,$dm_smiled)) {
     $dm_smiled[] = $dm_smile;
     $tag = str_replace(' ', '', $tag);
     $dm_showsmiles .= '<img src="'.get_bloginfo('wpurl').'/wp-includes/images/smilies/'.$dm_smile.'" alt="'.$tag.'" onclick="addsmile(\''.$tag.'\');"/> ';
     }
    }
    echo '<div style="width:100%; margin-left:0px; margin-right:0px;">'.$dm_showsmiles.'</div>';
    ?>

    But it did not works. Have anybode idea why?

    #171958
    stewmills
    Participant

    I temporarily solved my problem by installing this widget, as I just got FTP access today and have not attempted to follow other options via creating a bbPress.php page, etc.

    Here’s the plugin: https://wordpress.org/plugins/bbpress-login-register-links-on-forum-topic-pages/

    You can edit it and configure 4 different places that it shows up, but it’s not in the plugin options, you have to “edit” the plugin and you’ll see the code that designates what shows up where, such as this:
    add_action(‘bbp_template_before_pagination_loop’,’bbpressLoginRegisterLinksOnForumPage’);

    #171926
    Robin W
    Moderator

    but yes as Pascal says, you do need to list the forums that you want to include

    and I have just updated the plugin for a technical error which should not affect you, but you may want to load the latest version from my site

    http://www.rewweb.co.uk/bbpress-additional-shortcodes/

    #171925
    Robin W
    Moderator

    ok, I think I know the problem.

    If you copied/pasted the shortcode from my website, it incorrectly formats the shortcode on your website.

    I’ve now corrected, so if you go back onto my website and copy/paste then it will now work.

    or just type the shortcode in !

    scorpnetwork
    Participant

    Hi!

    Late, but here is my promised Feedback.

    The Forum is just too big to get this going. I am paying a Coder not to get a custom Script for this.

    Cant wait to finally switch to BBpress…

    Thanks for the help tho!

    #171920
    Pascal Casier
    Moderator

    But… you wanted to limit to some forums, no ?

    So let’s say you only want to show 5 topics from forums 10, 11 and 12, then you would put:
    [bbp-display-topic-index show='5' forum='10,11,12']

    Pascal.

    #171914
    awal16
    Participant

    I added the custom capabilities to my functions.php in the child-theme. When I go to Users, in the back-end of WordPress, there are warning texts like, Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_new_roles’ not found or invalid function name in C:\xampp\htdocs\mnddb_nieuw\wp-includes\plugin.php on line 235.

    What did I do wrong?

    My code in the function.php looks like:

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
            
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
    
    // END ENQUEUE PARENT ACTION
    
    // Nieuwe forumrolnaam toevoegen
    function add_custum_role($bbp_roles){
    	$bbp_roles['bbp_global_moderator'] = array(
    		'name' => 'Globale moderator',
    		'capabilities' => custom_capabilities( 'bbp_global_moderator' )
    	);
    	return $bbp_roles;
    }
    
    // Nieuwe forumregels toevoegen
    add_filter('bbp_get_dynamic_roles', 'add_new_roles', 1);
    
    function add_role_caps_filter($caps, $role) {
    	// Only filter for roles we are interested in!
    	if ($role == 'bbp_global_moderator')
    		$caps = custom_capabilities($role);
    	
    	return $caps;
    }
    
    add_filter('bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2);
    
    function custom_capabilities($role) {
    	switch($role) {
    		// Capabilities for 'global_moderator' role
    		case 'bbp_global_moderator';
    			return array(
    				// Primary caps
    				'spectate'				=> true,
    				'participate'			=> true,
    				'moderator'				=> false,
    				'throttle'				=> false,
    				'view_trash'			=> true,
    				
    				// Forum caps
    				'publish_forums'		=> false,
    				'edit_forums'			=> false,
    				'edit_others_forums'	=> false,
    				'delete_forums'			=> false,
    				'delete_others_forums'	=> false,
    				'read_private_forums'	=> true,
    				'read_hidden_forums'	=> false,
    				
    				// Topic caps
    				'publish_topics'		=> true,
    				'edit_topics'			=> true,
    				'edit_others_topics'	=> false,
    				'delete_topics'			=> true,
    				'delete_others_topics'	=> false,
    				'read_private_topics'	=> true,
    				
    				// Reply caps
    				'publish_replies'		=> true,
    				'edit_replies'			=> true,
    				'edit_others_replies'	=> false,
    				'delete_replies'		=> true,
    				'delete_others_replies'	=> false,
    				'read_private_replies'	=> true,
    				
    				// Topic tag caps
    				'manage_topic_tags'		=> false,
    				'edit_topic_tags'		=> false,
    				'delete_topic_tags'		=> false,
    				'assign_topic_tags'		=> false,
    			);
    			break;
    		default :
    			return $role;
    	}
    }
    
    #171910
    cookavich
    Participant

    I created a test page with this as the content:

    [bbp-display-topic-index show=’5β€²]
    
    [display-newest-users show = ’10’]

    This was the result:

    screenshot

    #171903
    Pascal Casier
    Moderator

    The link is: https://codex.bbpress.org/custom-capabilities/

    Better to post a new topic for a new question with a specific title, so others can find it in the search …

    Pascal.

    #171889
    Robin W
    Moderator

    ok so for the roles, you should see and use

    Custom Capabilities

    loop_single_forum in your child theme is the right way to go

    If you need further help in doing this (or anything else!) – please feel free to ask, like all things it is a learning curve πŸ™‚

    #171888
    Robin W
    Moderator

    your blogs.css line 1427

    has

    
    .single .commentmetadata, .single .reply {
      left: -15px;
      margin: 10px 0;
      opacity: 0.3;
      position: relative;
    }
    

    suggest you try adding

    #bbpress-forums .reply {
      opacity: 1;
    }
    

    to your css.

    come back if you need further help in doing this !

Viewing 25 results - 6,926 through 6,950 (of 32,585 total)
Skip to toolbar