Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,426 through 10,450 (of 32,504 total)
  • Author
    Search Results
  • #153157

    In reply to: Tough migration

    Stephen Edgar
    Keymaster

    I just tested the topic tag import and everything appears fine for me.

    * I created a WordPress post tag topic
    * I created a WordPress post category topic
    * I created a WordPress post and added the tag topic and category topic to the post
    * Imported from bbPress 1.2 with topics including the topic tag topic

    All results appear fine for me, I have posts/topics correctly associated with each taxonomy:
    * http://example.com/tag/topic/
    * http://example.com/category/topic/
    * http://example.com/forums/topic-tag/topic/

    #153156

    In reply to: disable Sidebar

    docpariolo
    Participant

    hello,

    im having issues with this.

    ive taken page-template-full.php from wp-content/themes/Rox

    <?php
    
    /**
    
     * Template Name: Full Width, no sidebar(s)
    
    */
    
    get_header(); ?>
    
        <div id="main-fullwidth">
    
            
    
            <?php 
    
                if (have_posts()) : while (have_posts()) : the_post();
    
                    /**
    
                     * Find the post formatting for the pages in the post-page.php file
    
                     */
    
                    get_template_part('post', 'page');
    
                    
    
                    if(comments_open( get_the_ID() ))  {
    
                        comments_template('', true); 
    
                    }
    
                endwhile;
    
                
    
                else :
    
                    get_template_part('post', 'noresults');
    
                endif; 
    
            ?>
    
            
    
        </div><!-- #main-fullwidth -->
    
        
    
    <?php get_footer(); ?>

    and copy pasted as bbpress.php in the same location, and it does nothing.

    i managed to have the index full width by making my own page with the forum shortcode and page set using full width layout. but once i click anywhere on the forum (go to a section, thread) the sidebar re appears.

    its driving me crazy.

    #153151

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    @bestru Thanks, there is a minor bug in the SMF, it has been fixed for the next release.

    If you take a look at this https://bbpress.trac.wordpress.org/changeset/5332 and change that mistaken <tt> for <br> in the SMF.php file things should work just fine.

    Let me know how that goes for you 🙂

    #153148

    In reply to: Custom Query Loop

    Robin W
    Moderator

    check out this reference (bbp_has_topics passes the info to wp_query)

    https://codex.wordpress.org/Class_Reference/WP_Query

    about two thirds of the way down (and it’s a long way down!) you’ll find date parameters and examples

    #153140

    In reply to: New to bbPress

    Robin W
    Moderator

    look at the step by step guides in the documentation

    Codex

    #153134
    Cariva
    Participant

    Hi everyone, I’ve seen several questions kind of like this one but not exactly, so forgive me if it’s been answered and I’ve missed it!

    Wordpress 4.0, bbPress 2.5.4.

    What I need is a forum that only a specific group of people (several hundred, increasing annually) can view and use. Because of the numbers involved it’s not practical to manually add them to an allowed list for the forum.

    Solution idea 1:
    A Forum page which shows you just a Login form, plus a Sign Up form. The Sign Up form has an additional field for a specific code, which we will distribute to our members via a Mailchimp list.

    Solution idea 2:
    The Sign Up form automatically cross-references with the Mailchimp list, so that only people who are already on the list are able to sign up for the forum.

    Your help enormously appreciated!

    Cariva

    #153133
    arno8
    Participant

    go to user>all users search for all your sites keymasters.

    then click edit by each users avatar

    after that you are in the edit profile page for that particular user and in the url it says
    user_id=(number)

    get all the user id numbers and then you can stack them using commas in a css code like this

    .type-reply.user-id-1,.type-reply.user-id-2,.type-reply.user-id-3 { background: yellow; }

    #153129
    xprt007
    Participant

    Hi

    I am having quite a strange problem with a test site leading to a re-direction to what appears to be the front page [In firefox, up the browser in page title section, you see “Posts – Site Name”], considering the content, if I try to go to the recommended & set abc/forums main page. Furthermore, if I try to VIEW any created, “published” forum, I get a page not found error.

    This site is in a folder /abc. The site in the root folder has no problem with accessing site-in-rootfolder.com/forums. So i assume it is not a server-settings issue.

    Other plugins, including 2 or so requiring “post name” permalink settings have no problem with the link settings, except one, “RecipePress reloaded”, whose author also recommends “post name” permalinks. With this, one should be able to access the main recipe page at mysite.com/abc/recipes. Instead, like in the bbforum case, although the url appears correctly, the content is clearly that of the blog front page!
    Resetting the permalinks, like he recommends, changes nothing.
    After explaining the problem to him, he said it was a bug in the plugin & the code he gave me to try out, partly corrected the problem, because mysite.com/abc/recipes this time correctly showed the main recipes page. The only problem is, it seems to affect other links leading to page not found errors until I either remove the code or disable the recipe plugin.
    That code was just for testing, so I guess he is going to improve on it.

    Since the bbforum plugin (& this recipepress reloaded), unlike ALL other plugins which are all OK & their respective content can be found in its rightful place, I guess there is an issue also with bbforum.

    I have tried to unistall & re-install bbforum/buddy press, deactivated the rest of the plugins, etc to no avail.
    This is the .htaccess I have, or get whenever I reset the permalinks:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /abc/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /abc/index.php [L]
    </IfModule>
    
    # END WordPress

    For buddypress, the links to members, groups, etc are all OK.

    I hope with the description of the problem, the source of & solution to the issue can be identified & suggested.

    I am using the latest version of WordPress & all modules.
    Same problem when using twentythirteen theme.

    Link

    PS: in case a helper finds the conditions on site different from those described, it might be code from the author of recipress reloaded plugin, which has a similar issue is being tested or implemented.

    Thank you in advance.

    Robin W
    Moderator

    I want the forum menu link to be visible but nothing else, no forum titles/topics etc simply a login panel and a message explaining that the forum is for members only.

    ok, put the following in your functions file

    //Stop non-logged in user seeing the forums and show forum login page instead

    function lab_logged_in_bbptopics($have_posts){
    	if (!is_user_logged_in()){
    		header("Location: /forum-login/");
    		exit ;
    		}
    return $have_posts;
    }
    add_filter('bbp_has_topics', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_forums', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_replies', 'lab_logged_in_bbptopics');
    

    The create a page called ‘forum login’ and ensure the permalink is set to ‘forum-login’. You can actually use any name or permalinl, but the permalink has to match the one in line 3 above.

    into that page you can put something like

    You must be both registered AND a member of the club to use the forums.
    
    If you are not a member, why not <a href="/join-us/"> Join the club </a>
    
    Otherwise please login in
    
    [bbp-login]
    
    

    Then create a ‘join-us’ page that they can go to.

    If I disable the toolbar in this way, will I need a plugin to allow users to make basic changes to their profile in an environment that is consistent with the front end of the website?

    There are several ways to get an edit profile – this one adds it to your custom menu if they are logged in

    Layout and functionality – Examples you can use

    #153122

    Hey guys,

    Sry if the title is confusing. What i mean is that when i click on a specific forum it shows all of the topics in the entire forum, instead of just showing the topics of the clicked on forum.

    here’s my site. ull see what i mean wen u click on a specific forum – http://loser2winner.com/forums/

    is there any setting or code to fix this problem?

    please help!

    #153120
    chero123
    Participant

    write code in wp-content/themes/your_theme/functions.php

    #153119
    everykid
    Participant

    Started by disabling all pludgins…no change

    Dumb luck…I went into Settings: Format and unchecked “Add Toolbars and buttons to text area to help with HTML formatting”
    Now I can see a border around the box intended for entering descriptor of the box. …a step toward solving this.

    I don’t care if users have toolbar or formatting for this box but I expect I will for other boxes so still would like a fix.

    I believe the change has to be in file bbpress/templates/default/bbpress/form-topic.php.

    I am totally uncomfortable at messing around much at this level but think I need to edit this file and add some code to add a box title like “Topic Description (manditory)”

    below I include the part of that original file from bbpress where it would need to be but not sure what it should look like or where to put it. I expect this is a simple thing for someone who knows what they are doing but for me…not so much! The actual code and where to copy and paste it would save me hours of trial and error. (if some code could also be added to allow the rechecking of the ‘Post Formtting’ box without loosing the border that would be a real bonus.)

    From file form-topic.php

    div>

    <?php bbp_get_template_part( ‘form’, ‘anonymous’ ); ?>

    <?php do_action( ‘bbp_theme_before_topic_form_title’ ); ?>

    <p>
    <label for=”bbp_topic_title”><?php printf( __( ‘Topic Title (Maximum Length: %d):’, ‘bbpress’ ), bbp_get_title_max_length() ); ?></label><br />
    <input type=”text” id=”bbp_topic_title” value=”<?php bbp_form_topic_title(); ?>” tabindex=”<?php bbp_tab_index(); ?>” size=”40″ name=”bbp_topic_title” maxlength=”<?php bbp_title_max_length(); ?>” />
    </p>

    <?php do_action( ‘bbp_theme_after_topic_form_title’ ); ?>

    <?php do_action( ‘bbp_theme_before_topic_form_content’ ); ?>

    <?php bbp_the_content( array( ‘context’ => ‘topic’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_form_content’ ); ?>

    <?php if ( ! ( bbp_use_wp_editor() || current_user_can( ‘unfiltered_html’ ) ) ) : ?>

    <p class=”form-allowed-tags”>
    <label><?php _e( ‘You may use these <abbr title=”HyperText Markup Language”>HTML</abbr> tags and attributes:’,’bbpress’ ); ?></label><br />
    <?php bbp_allowed_tags(); ?>
    </p>

    <?php endif; ?>

    <?php if ( bbp_allow_topic_tags() && current_user_can( ‘assign_topic_tags’ ) ) : ?>

    <?php do_action( ‘bbp_theme_before_topic_form_tags’ ); ?>

    <p>
    <label for=”bbp_topic_tags”><?php _e( ‘Topic Tags:’, ‘bbpress’ ); ?></label><br />
    <input type=”text” value=”<?php bbp_form_topic_tags(); ?>” tabindex=”<?php bbp_tab_index(); ?>” size=”40″ name=”bbp_topic_tags” id=”bbp_topic_tags” <?php disabled( bbp_is_topic_spam() ); ?> />
    </p>

    <?php do_action( ‘bbp_theme_after_topic_form_tags’ ); ?>

    <?php endif; ?>

    #153116
    ntrabue
    Participant

    Hello, our company is on a google apps domain. While I prefer gmail, most of my co-workers prefer outlook.

    I hadn’t noticed this while putting the site together, however, it appears that email notifications don’t seem to appear as links by default in outlook 2010 or 2013 the URLs just appear as plain text. I figured it was something I could probably fix so I started looking around. I stumbled on this in includes/common/functions.php

    	// Strip tags from text and setup mail data
    	$topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
    	$reply_content = strip_tags( bbp_get_reply_content( $reply_id ) );
    	$reply_url     = bbp_get_reply_url( $reply_id );
    	$blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    	$do_not_reply  = '<noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';
    
    	// For plugins to filter messages per reply/topic/user
    	$message = sprintf( __( '%1$s wrote:
    
    %2$s
    
    Post Link: %3$s
    
    -----------
    
    You are receiving this email because you subscribed to a forum topic.
    
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
    
    		$reply_author_name,
    		$reply_content,
    		$reply_url
    	);

    if I’m reading this correctly, it does indeed simply output the string of the URL. What would be the best way to go about making sure this is recognized in outlook as a link?

    Thank you in advance for your help.

    #153114

    In reply to: Custom Query Loop

    brettlewis
    Participant

    Here is a start to the code. I got some help on a differnt forum:

    <?php if ( bbp_has_topics(array( 'posts_per_page' => 3, 'max_num_pages' => 1, 'order' => 'DESC','meta_key' => '_bbp_voice_count', 'orderby' => 'meta_value_num' )) ) : ?>

    How would I add time as “since x number of days” to this query. I only want it showing the most popular voice count that are fresh within the last week or so. Any clues?

    #153110
    arno8
    Participant

    Bump, got this working

    Now looking for a way to add icons in front of my Sub forums , tried this code:

    add_post_type_support('forum_sub_forums', array('thumbnail'));
    
    function ks_forum_icons() {
    	if ( 'forum_sub_forums' == get_post_type() ) {
    		global $post;
    	    if ( has_post_thumbnail($post->ID) )
    	    	echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));
    	 }
    }
    add_action('bbp_theme_before_forum_sub_forums_title','ks_forum_icons');

    but that didnt do anything.

    #153098
    mag07
    Participant

    Thank you for taking the time to reply. Was away for a couple of days.

    Anyhow, the same topic in the smf install is here: http://frostmourne.co.uk/index.php?topic=16.0 – you should be able to view page source.

    It’s just using bbcodes for formatting, not sure how SMF handles this from the backend.

    [b]Frostmourne[/b] is (...)
    
    Apply [url=http://frostmourne.co.uk/index.php?action=form;n=2]HERE[/url].
    
    If you have any questions or concerns, please feel free to contact any of our staff members.
    [hr]
    
    GM
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=16]Mafist[/url][/li]
    [/list]Officers
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=33]Shadowk[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=43]Krybaybee (kirstykins)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=19]Auraguardian (Taichihamsta)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url][/li]
    [/list]
    [hr]
    Forum Admins
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=71]Starwatcher (Worganic)[/url][/li]
    [/list]

    Thanks again, appreciate your help 🙂

    #153097

    In reply to: Forum not showing up

    gtmotor
    Participant

    I don’t modify any code.
    I just put the link into a new page.

    #153089
    arno8
    Participant

    I’m trying to add information to my subforum so it displays under the title.
    But its not showing anything when I save it. Any ideas?

    See it here

    https://www.primeknights.com/forums/

    Tried to add <span><?php the_content(); ?><span>

    Above <?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>

    in single-loop-forum but, it still doesnt show the content and it positions quite wrong if i enter text manually in the developer console from chrome.

    Thnx in advance

    #153086

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    @tehred Go to SMF’s website to find details on how to install SMF, you probably want to install the same version that the database backup is from (if you know it).

    You should have a MySQL database backup, typically these are named filename.sql, filename.sql.zip or filename.gz, this is an actual export of the database data rather than the actual files used as part of the website.

    You should be able to import (once you find it) that file into MySQL as a new database, then you point bbPress’ import to that database name in the import settings along with username and password and table prefix (most likely smf_).

    Once you start running the import it copies the data from your old SMF database into the WordPress database you are using with bbPress, your original SMF database is not altered in anyway, it is still best practice to make sure you have backups of your SMF and WordPress database all the same.

    #153085

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    @bestru Your database table name is bestru_smf and that looks correct, your table prefix does not look correct, in the screenshot you are using _smf, I think you will find it should be smf_, see this screenshot showing the table names inside my import_smf database https://cloudup.com/cTo5XoXDEBn

    #153083
    brettlewis
    Participant

    I’m creating a custom topic query for a section of my website that hooks into the default loop template. In the template I use
    <?php if ( bbp_has_topics(array( 'posts_per_page' => 7, 'max_num_pages' => 1, 'bbp_voice_count' => 'DESC', order => 'DESC' )) ) : ?>

    What I’m trying to achieve is a query the shows 7 topics that have the most participants over the last few days. I went with order as the time query but clearly making sure it only shows topics that have BOTH a large amount of users AND are currently active is what I’m trying to achieve.

    Any hints or different args to use to achieve this?

    sidenote: I doesn’t seem bbp_voice_count works?

    #153081
    Virtualtopia
    Participant

    @ everykid

    I had that problem initially, but got around it by making that field a WYSIWYG editor (same as making blog post) and then it became obvious not to mention familiar for users who expect a toolbar and some formatting options. I had a look through my plugin list and cannot see a plugin that helped me achieve this. So I must have put in some code somewhere. If you are interested, I could locate that code and advise.

    chero123
    Participant

    hello, i have one doubt

    I want to show on the forum index

    topics by freshness and index forums

    on the same page, first: topics by freshness and after forums…

    I do not have much experience with bbpress and little knowledge … I have 3 days to install and I am configuring

    #153062

    In reply to: Forum not showing up

    Robin W
    Moderator

    can you post the exact code you’re putting into your page

    #153060
    blackjak231
    Participant

    Thanks for the tip but i actually ended up adding the following at the top of the pages i needed it on :

    $args = array(
    	'post_parent' => 0,
    );

    Not very DRY as it is repeated (i could have done a function though…) but it does the job perfectly.
    HOWEVER, since every loop resets the $args array, i think it only works for me because my dropdown menu with the forums is before any other loop on the page.

    Here is the code i added in the pages i needed to show the dropdown (bootstrap):

    
    <?php if ( bbp_has_forums($args) ) : ?>
    	<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    		<li><a id="textdropdown" class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></li>
    	<?php endwhile; ?>
    <?php else : ?>
    	<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
    <?php endif; ?>
    

    I hope this helps you @selenii and anybody else who was trying to do this. I would however recommend Robkk’s way as it uses clean code from bbPress. Haven’t tried it though.

    Good luck and thank you!

Viewing 25 results - 10,426 through 10,450 (of 32,504 total)
Skip to toolbar