Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,801 through 12,825 (of 32,506 total)
  • Author
    Search Results
  • Shmoo
    Participant

    I don’t think it’s possible by default but you could fake it and make your own ‘fake-loops’ inside the templates files.

    It takes some work and you’re probably will have to call most of your forum_ids by it’s number which is very static.

    This for example maks a clean link to forum_id 98 + adds the forum title as a link-text.
    You could make your custom HTML Lists like that but remember if you delete or add a forum you have to change your template files also. It’s very static.

    
    <a class="button" href="<?php bbp_forum_permalink( 98 ); ?>"><?php bbp_forum_title( 98 ); ?></a>
    
    #141894
    Shmoo
    Participant

    – Yes the plugin is 100% sure active and working because you can see ( red border ) the topic is reported , I’ve even deactivated & activated it again to make sure when I saw that error.

    – It’s a clean copy-/paste from the plugin’s functions file. I’ve even added echo in front of it to check if there was a difference but both with & without echo have the same error.

    Why I ask if a plugin function can be private or protected is, when I take a look inside the plugin function-file I see all functions wrapped inside a class which is pretty standard for making plugins I’ve seen online.

    But I also see something like this:

    
    	protected $version = '1.0.0';
    	protected $plugin_slug = 'bbpress-report-content';
    	protected static $instance = null;
    	protected $plugin_screen_hook_suffix = null;
    	protected $plugin_path = null;
    ____
    	private function __construct() { ....
    
    ____
    	public static function get_instance() {
    
    		// If the single instance hasn't been set, set it now.
    		if ( null == self::$instance ) {
    			self::$instance = new self;
    		}
    
    		return self::$instance;
    	}
    
    

    Most functions have public function function_name() and the function I would like to use has only function function_name()

    That made me think maybe my function it’s protected, so I started testing and searching online and did this inside my page template.

    
    <?php if(function_exists('get_topic_report_link')) {
    echo get_topic_report_link( $args = '' );
    } else {
    echo 'Function does not exists..';
    }
     ?>
    

    It takes the ELSE option so there is something wrong right.

    ___

    This is what I did to kill for example the Merge link from the admin_links, preventing it would show up something else when called upon.

    
    function shmoo_kill_topic_merge_link( $r ) {
    	$r = null;
    	return $r;
    }
    add_filter( 'bbp_get_topic_merge_link', 'shmoo_kill_topic_merge_link' );
    

    I’m a Check Norris fan, when I change stuff it has to be NULL 😉

    I know, I probably add and write too much functions-/codes of my own to alter the bbPress core but at least I’m getting it done right now and starting to understand how it works a little. In a few years I will be better ( hopefully ) and add more logic to my projects.

    #141888
    Shmoo
    Participant

    If you know a little CSS and you’re not afraid the change the bbPress templates a little you can make this happen with through the forum_id(); which is unique for each forum.

    Take a look inside loops-forums.php ( the template that starts the forums loop ) you’ll find this. <?php bbp_forum_id(); ?>

    Copy that, next open your loop-single-forum.php and paste that code where you would like your image to show up.
    For example something like this could be possible.

    
    <img class="bbp-featured-img" src="http://example.org/images/forums/featured_forum_<?php bbp_forum_id(); ?>.png" alt="<?php bbp_forum_title(); ?>" /><a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
    

    All you have to do now is make sure you call your forum images featured_forum_[ID].png and upload them to the path you set in the image tag.

    If you Hover over the forum names at the WP back-end you’ll see where the URL-page is pointing to if you would’ve clicked it, this link has a number like 88 or something, each forum has an unique number so your could pick that number and call it in your images, featured_forum_88.png >> upload the image and it will show up next to the forum title.

    Change-/position it a little by CSS ( img.bbp-featured-img { } ) and you’re done.

    I’ve done this myself the same way only with icon-fonts in front of the forum titles.
    It’s a little bit of customization and it has a static feeling but it’s not that difficult and works perfect.

    Edit

    Almost forgot to say, don’t change the bbPRess template files inside your plugins directory but copy those files to your theme directory.
    https://codex.bbpress.org/theme-compatibility/

    #141887
    beaulahsmithzeiler
    Participant

    Hi guys. I am using the forum list widget to display the different forums. Can anyone help me with some code so that the number of topics under each forum is listed as well in the sidebar?

    #141884
    Kris35
    Participant

    Hi. Is there a way to add mandatory custom fields in the BBPress registering process? I did get someone to add a text field for the location but it wasn’t mandatory and for the UK, they were adding variations like England, Britain etc so in my user directory and search, people looking for people in the UK would only find people in the UK and not in England or the United Kingdom etc. So I had to go and edit their profiles to say United Kindom so they would come up in the search. Sooo…what I really need is not a text field but a drop down or other thingy where new members have to choose where they are from from the options they are given. So I need a list of all countries and then for now, a list for US states and UK counties. I have a coder to do this for me (Ive not got a clue)….is it possible to do this by configuring BBpress or is a custom code thingy needed? If I can do it, I will show it here maybe so others can see?

    #141875
    black_lady
    Participant

    Hi,
    I have the same issue.
    Tip: I try use the shortcode and then pagination is ok.
    But I really need the solution..anyone?

    Best regards!

    #141872
    Stephen Edgar
    Keymaster

    If you have a ‘Private’ forum the title will include PRIVATE: PRIVATE: as a title prefix.

    Eg. This is a private forum titled PRIV and becomes PRIVATE: PRIVATE: PRIV

    The plugin above will remove the PRIVATE: PRIVATE: title prefix.

    #141871
    Stephen Edgar
    Keymaster

    @sarau Download the plugin here https://gist.github.com/ntwb/8662354

    Or add the code to your own custom plugin or child themes functions.php

    #141868
    Tearstone
    Participant

    It has been about two weeks since I converted my vBulletin forum over to BBPress. The existing forum has been around since 2008 and since the conversion, we have been receiving emails over entire history of the site that topics have been replied to. These are notifications that have been sent non-stop since the conversion.

    I installed Buddypress and BBPress at the same time, so I’m not sure exactly what is causing all of these emails to continue to be sent out. How do I stop these notification emails from going out? I’ve already attempted to add the following code to my site specific plug-in, but it does not seem to have helped much. I guess it helped with mentions but not the replies.

    remove_action( ‘bp_activity_posted_update’, ‘bp_activity_at_message_notification’, 10, 3 );
    remove_action( ‘bp_groups_posted_update’, ‘groups_at_message_notification’, 10, 4 );

    What are the BBPress hooks to stop reply notifications? I just want them to stop for awhile without disabling email site wide.

    #141865

    Sure did; thanks. I ways able to create an account easily enough, but it looks like logins are completely broken on your site; they do not even work through WordPress’s traditional wp-login.php directly (which is what bbPress sends login data to.)

    Something else is wrong, outside of bbPress, though it’s difficult to troubleshoot on this end. It might be the case-sensitive URL (with “Install” in there) or it could be any other server config, plugin, theme, or random cookie issue.

    Sorry I can’t be much more help, but hopefully this helps you sniff it out.

    #141862

    A few things to check:

    • Is the plugin active?
    • Are you calling the function correctly (named correctly, etc…)?
    • Cherry picking functions and putting them in your functions.php file can be tedious, since you’re stuck supporting all your own new code rather than letting the plugin do the work. Are you sure you’re comfortable with this?
    • If the function says it’s undefined, it means whatever file you’re putting that code in, isn’t loading. Why not?

    You’ll likely have better results if you filter the results of bbp_after_get_topic_admin_links_parse_args like so:

    /**
     * Replace the individual link calls with your own functions
     */
    function foo( $args = array() ) {
    
        $args['links'] = array(
            'edit'  => bbp_get_topic_edit_link ( $args ),
            'close' => bbp_get_topic_close_link( $args ),
            'stick' => bbp_get_topic_stick_link( $args ),
            'merge' => bbp_get_topic_merge_link( $args ),
            'trash' => bbp_get_topic_trash_link( $args ),
            'spam'  => bbp_get_topic_spam_link ( $args ),
            'reply' => bbp_get_topic_reply_link( $args )
        );
    
        return $args;
    }
    add_filter( 'bbp_after_get_topic_admin_links_parse_args', 'foo' );

    Keep in mind that each link function accepts its own parameters (including the ability to change the text to anything you want) so you can either pass new parameters, or filter each link and adjust them. This way you can just filter bbPress’s core functionality rather than rewrite everything on your own

    #141857

    By default, closed topics get a greyed out text color. You can override this with some CSS tweaks that target it specifically. Something like:

    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
        color: red;
    }
    #141854

    Maybe this is already obvious, but if you’re already logged in, those pages aren’t going to work for you; bbPress will either show a message, or redirect away from them, depending on what you’re setup is.

    The login page here is a (much more complicated) version of what is already in bbPress core, using a WordPress Page and the shortcode. (It’s only complex because of shared logins and integration with WordPress.org, Trac, BuddyPress.org, etc…) Meaning, it can’t be broken for you, because if you’re only using bbPress’s method and shortcodes, it’s exactly what’s also working here.

    We’ve considered a few different ways of auto-creating the login/register/lost-password pages (and maybe there are some improvements we can make in this regard) however we haven’t settled on a solution we feel works for the 80% of users that want the out-of-the-box experience, that also doesn’t conflict with existing WordPress registration plugins.

    If you could describe what you think the ultimate experience would be, we’re all ears. 🙂

    #141836

    I spent a few hours this weekend cleaning up the themes that power BuddyPress.org, bbPress.org, and the shared styling between the codexes, Trac’s, etc… We’ll be open sourcing all of both of those sites very soon.

    You’ll (hopefully) be surprised how few modifications are made to the default styling, and how little markup and CSS there is. 🙂

    #141834
    AuthorAdam
    Participant

    Hello!

    I’ve searched the forums for a topic that has the same issues as I’m having, to no avail. I have created a website using wordpress.org (http://meechanchronicles.com/Install), and installed bbPress version 2.53. I’ve been able to create the forum, and using wordpress, I’ve created a couple of forums and one topic.

    I followed the bbPress codex for adding Login/Register pages, as well as a Lost Password page. Whenever I try and access the forum from the outside (ie not logged into WordPress), I seem to be stick in a circular link that never actually does anything.

    In addition, neither the Register/Lost Password pages work, returning a 404 error. I’ve double checked the shortcode links as well as made sure that the permalink addresses are spelled correctly and match the shortcodes.

    I am totally new to creating forums, but I feel that I’m missing something simple. Any help is greatly appreciated.

    Thanks!
    Adam

    #141829
    Shmoo
    Participant

    Just curious if there is an easy way to check if a user has been subscribed to a topic or not..

    I’ve looked inside the Core templates and found the bbp_user_subscribe_link() function so I ported it over to my own functions file and changed it a little bit, now it works on the topics index page but for some reason it breaks at my topic-replies index page while they use the same default topics loop.

    This is my code I’ve changed around a little and what it does is, it prints an is-subscribed text to the page if a user is subscribed to an topic or not. IF not is doesn’t do anything – this is-subscribed text I placed inside a HTML class so I can catch him by some CSS.

    http://pastebin.com/iFybkjfr

    Visual, the 1px colored borders on the right indicate if a topic is-subscribed (blue), is-closed (black) or is-sticky (yellow).

    It’s a very small feature but I believe very effective, maybe it’s possible to hook those is-values into the bbp_topic_class() by default because BuddyPress has this feature out of the box. If you’re a member of a group it also prints is-member inside the groups-list-class.

    Anybody ideas about how we could make this more smooth and simple?

    #141827
    Matthew
    Participant

    What is the link to put there.

    'href' => site_url(' <strong>LINK HERE</strong> '),

    #141814

    In reply to: bbPress 2.5.3

    brightbell
    Participant

    I have recently lost access to most of bbPress.
    There is no backend access at all, even the link to settings in the plugin list is not present
    and nothing at all down the LHS however the forum listing does appear on the front end if no user is logged in.
    Also some shortcode widget items appear on the front page in the footer.
    When anyone logs even the keymaster the forum is less visible.
    I had to recreate the keymaster which dissapeared and became a moderator.
    The keymaster was no longer listed as an option to reselect so I had to
    change the role thus in this line with phpmyadmin

    a:3:{s:13:”administrator”;b:1;s:20:”add_ultimate_auction”;b:1;s:13:”bbp_keymaster”;b:1;}

    I am not sure whether this occurred exactly as 2.5.3 was installed but it became evident soon after.

    WordPress 3.8.1 running Hueman theme.

    #141808
    brightbell
    Participant

    When I installed BBpress I was able to add a topic and a form and the Forums entry was visible to the administrator account.
    Now if I log in as administrator or any account the forums are not visible or available.
    You can see a basic list but as soon as you click on anything page not found 404 comes up
    The shortcodes do produce an output from the forum if put in a new page or in the footer but
    the url
    http://racingpigeon.com/forums/ is blocked whereas the same shortcode in
    a new page added at http://racingpigeon.com/forumsx/ produces output

    If I log out then I see the output at

    http://racingpigeon.com/forums/
    I have tried all different levels of forum access but none lets me see it.

    bbPress Version 2.5.3
    Wordpress Ver WordPress 3.8.1 Maintenance Release January 23, 2014

    Thanks Ian

    Drrr
    Participant

    Instead of creating a new topic I’d like my question to be answered in here.

    I downloaded and installed the bbPress-Plugin for WordPress and set it up for my website. Here’s the link to my forum.

    I changed the permalinks /forums/forum/ to /forum/kategorie/ (engl. category)

    Does anyone by this time know a guide (for non-coders) or plugin to customize the permalink structure in bbPress?

    I’d like to change the structure from: (Origin)

    forums -> forum(folder)/topic(folder) -> forum/topic

    To: (Personalized / SEO Optimized(imho))

    forums -> forum -> topic

    I did some research beforehanded:

    • no support by developers cause it’s made the wordpress way
    • no negative effect for SEO of the original url structure

    I.e.: website.com/forum/tech/technical-question…
    instead of website.com/forum/topic/technical-question…

    It has no negative effect but it would grant two more positive ones.
    (1) More freedom for the user in terms of customizability and (2) the new customizability grants free space for keywords in the URL which are not only nice to read for search engines

    What about the htaccess rewrite ideas, I didn’t get any of these working and many say it’s not recommendable.

    #141798
    Robin W
    Moderator

    This plugin might let you change the words

    EDIT: Robin, I removed the code you posted as it was not really what was needed, check the plugin below. Cheers, Stephen

    #141791
    Stephen Edgar
    Keymaster

    @jakub-orlowski The database name you have used is wrong.

    In this image my database name is ntwb_mingle (at the very top)

    #141776
    Hiro22
    Participant

    wp-content\plugins\bbpress\includes\topics\template.php

    There was the same code also as the following php file.
    wp-content\plugins\bbpress\includes\replies\template.php
    wp-content\plugins\bbpress\includes\search\template.php

    #141775
    Hiro22
    Participant

    I am using WordPress-bbpress at the my site.
    When many messages were contributed to a topic and it became 10 pages or more, the link to 10th page had broken.

    The following code is the cause.
    It will replace from “&paged=10” to “0”.

    bbpress.2.5.3
    C:\xampp\htdocs\bb\wp-content\plugins\bbpress\includes\topics\template.php
    895 line

    // Remove first page from pagination
    if ( $wp_rewrite->using_permalinks() ) {
    	$pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $pagination_links );
    } else {
    	$pagination_links = str_replace( '&paged=1', '', $pagination_links );
    }

    One solution for correcting this is the following. (Insert “if($pagination[‘total’] == 1)”)

    // Remove first page from pagination
    if ( $wp_rewrite->using_permalinks() ) {
    	$pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $pagination_links );
    } else if($pagination['total'] == 1) {
    	$pagination_links = str_replace( '&paged=1', '', $pagination_links );
    }
    #141773
    Stephen Edgar
    Keymaster

    The documentation was wrong. Moderators cannot create/modify forums.
    I’ve updated the documentation to match what each role can do.

    Actually they can, the documentation was correct 😉

    				// Forum caps
    				'publish_forums'        => true,
    				'edit_forums'           => true,
    				'read_private_forums'   => true,
    				'read_hidden_forums'    => true,

    I have added those changes back to the codex.

    The caveat to this is that they can only create and edit forums in the ‘front end’ and not via the admin dashboard. (Details of this are noted in Trac as part of the wider scope Moderator control panels)

    To allow moderators to create forums you need to use the [bbp-forum-form] shortcode on a page.

Viewing 25 results - 12,801 through 12,825 (of 32,506 total)
Skip to toolbar