Search Results for 'bbpress'
-
AuthorSearch Results
-
November 26, 2012 at 3:33 am #120771
In reply to: How to use BBpress functions in WordPress?
John James Jacoby
Keymaster- Use a regular old WP_Query()
- Use a widget
- Use bbp_has_forums()
- Use the shortcode mentioned above
There are lots of examples, in the forums, on the codex, and in the bbPress code itself. Also, unclear what you mean by “latest forum.” Do you mean topics, or replies, or something else?
November 26, 2012 at 3:26 am #120770In reply to: How is the forum archive page generated?
John James Jacoby
KeymasterModifying core files is never the way. There are plenty of filters in place to override any bit of functionality regarding bbPress’s theme compat,
There are, as you’ve already found, numerous vectors depending on exactly what you want to accomplish. Each filter has an intended purpose, and solves a specific problem. The underlying code is identical to WordPress’s own template loader, until a template isn’t found (which is a majority of installations.) In that case, bbPress replaces the_content with template parts using page.php, or whatever is a match in the stack you found already.
Also, don’t forget about the typical WordPress templates: archive-forum.php, and archive-topic.php, etc…
To answer your question about why get_the_ID() doesn’t work on archive pages, why would it? It’s an archive, not a post/page. There is not ID to get.
From your posts here, you’ve basically solved much of what’s already in the codex regarding how some of these things work; also, I’m fuzzy on what problem you’re trying to solve. What is the end goal you’re working towards? I can give you some advice on what I think will work best.
November 26, 2012 at 1:04 am #120766In reply to: How is the forum archive page generated?
Michael
ParticipantOkay, I’ve made some further progress with method #3 above (hooking into bbp_get_bbpress_template ). Here’s the general approach I’m taking:
add_filter( 'bbp_get_bbpress_template', 'my_add_page_template', $templates );
function my_add_page_template( array $templates ) {
$page_template = get_post_meta( $post_id, '_wp_page_template', true );
if ( $page_template != 'default' )
array_unshift( $templates, $page_template );
return $templates;
}
The only issue I have right now is that $post_id is difficult to extract if the archive pages (Archive Base and Topics Base) are being displayed. Right now I am hard wiring it to the post_id of the Archive Base page (getting it from the editor), and it works okay but not what I want.
Since these pages (archives) are custom post types, I haven’t found an easy way to find their post_id’s, and querying globals like $post->ID and calling functions like get_the_ID() and url_to_postid() don’t work for custom post IDs ($post->ID and get_the_ID() return 0).
QUESTION: For a bbPress page that is currently being built for display, is the post_id of the page being stored somewhere in a bbPress global?
Michael
November 25, 2012 at 11:30 pm #120765In reply to: How to use BBpress functions in WordPress?
Stephen Edgar
KeymasterUse the [bbp-forum-index] shortcode https://codex.bbpress.org/shortcodes/
November 25, 2012 at 9:37 pm #120762In reply to: How to use BBpress functions in WordPress?
frenzis73
ParticipantUP 🙂
November 25, 2012 at 9:32 pm #120761In reply to: bbPress 2.2.2 released
Annie S Spratt
ParticipantEvening! Just installed the update and now I am getting big fat 404’s on all my forums pages which are currently set to ‘Private’, the one forum that is set to ‘Open’ works fine however.
Any ideas folks?
November 25, 2012 at 8:33 pm #120756In reply to: Oy – all I get is a blank page
Stephen Edgar
KeymasterI know PageLines released an updated compat plugin for bbPress 2.2, what version that actually is I am not sure as it doesn’t appear publicly (from what I can see).
http://www.pagelines.com/store/plugins/pagelines-bbpress/
http://www.pagelines.com/forum/topic/23459-bbpress-22-crash/page__hl__bbpress#entry137455Make sure you are running WordPress 3.4.2 and bbPress 2.2.2 and the latest updates from PageLines , if you are still not seeing any content I would ask PageLines support to look into it further.
November 25, 2012 at 7:43 pm #120754In reply to: bbPress 2.2.2 released
kraigg
Participant@johnjamesjacoby Thanks for all the time and effort you’ve put in to quickly release fixes and updates. It’s much appreciated.
November 25, 2012 at 7:28 pm #120753Topic: Oy – all I get is a blank page
in forum Installationspiritbear
Participantheh.
I’m using bbPress 2.2 and the bbPress for PageLines plugin 1.0.6. Created a test Category, then a test forum underneath that category. Blank content everywhere – I can see my masthead and sidebar, but zippo on the content.
My cluelessness is evidently unbounded in this dimensional plane. Tell me I’ve missed something very basic? Do I need to select another template (I have Template=Forum selected for all forum related pages), or do I need to actually create a page for each? Should I pitch the fine folks at PageLines?
Love and gratitude for your assistance.
November 25, 2012 at 7:01 pm #120751In reply to: Migrate under my xoops forum to bbPress
Stephen Edgar
KeymasterHere are the steps I would follow:
– Backup everything and often (WordPress, Xooops, MySQL etc)
– Install WordPress locally to test the import
– Research the Xoops MySQL database structure
– Make a copy of importer example.php as xoops.php in the same folder
– Edit xoops.php to match the xoops database table & field nameseg. This from Example.php:
// Forum id. Stored in postmeta.
$this->field_map[] = array(
'from_tablename' => 'forum',
'from_fieldname' => 'forumid',
'to_type' => 'forum',
'to_fieldname' => '_bbp_forum_id'
);Would become:
// Forum id. Stored in postmeta.
$this->field_map[] = array(
'from_tablename' => 'xoops_forum_table_name',
'from_fieldname' => 'xoops_forumid',
'to_type' => 'forum',
'to_fieldname' => '_bbp_forum_id'
);The above is not accurate as I have no idea what table and field names xoops uses for its database, that is the bits you need to research. Do the above for as much as you can matching all the tables and fields testing your import.
Once you have an import working and are happy with you can then look to importing it to your live site and I cannot emphasize this enough, backuyp, backup and more backups in case things go wrong.
November 25, 2012 at 6:01 pm #120750Topic: bbPress developer recommendation
in forum Troubleshootingoconn146
ParticipantAll,
Hi, I’m interested in implementing bbPress on this site that I own: http://www.nationalbankruptcyforum.com.
Wondering if the community could recommend a good bbPress developer who is also comofortable working with responsive Genesis child themes?
I can be reached via email at: john@jsodigitalconsulting.com.
Thanks,
John
November 25, 2012 at 5:14 pm #120749In reply to: Index page not working properly in Graphene Theme
remike
ParticipantI have partially found a solution. I copied out all of bbpress functions.php to my graphene-child functions.php. After that I copied out the single-user.php template to my graphene folder.
It kind of sorted it out, but the entire background just disappeared and I had no user title displayed above the avatar.
I had to add the white background and the user name manually. Unfortunately bbp_current_user_name provides MY OWN user name, not the name of the profile displayed. So if I want to go to somebody else’s profile I will still see my own id…
Does anyone have any solution?
November 25, 2012 at 4:05 pm #120747In reply to: 2.2 and Theme Compatibility
Todd – WireFlare
ParticipantIt doesn’t look like things are too messed up. Although it’s not always the best method in this case I would recommend using the !important tag in your css for bbpress. This will only override the theme when the bbpress-forum tag precedes it therefore not effecting the rest of the site.
Specifically you should follow the instructions to move the css into your theme directory and then modify line 62 of the bbpress.css found in your theme/css folder. You’ll need to add !important before the ; and after your list-style and margin entries. In order to get rid of the stars you’ll have to add a line of css defining the “a” style within the bbpress-forum. You’ll need to set the background to none and the padding to 0.
Hope that helps.
November 25, 2012 at 3:11 pm #120745Topic: after upgrading, I get 404 error
in forum Troubleshootingwadams92101
Participantafter upgrading to bbPress 2.2.2, I get 404 error when going to the forums base (mydomain.com/forums) or forum base / slug (mydomain.com/forums/forum) but I can still go directly to a forum topic. How do I get rid of the 404 error and restore my forums base directory of topics?
November 25, 2012 at 2:25 pm #120744In reply to: error capabilities.php on line 453
josefabiosan
Participanterror on log cpanel
25-Nov-2012 15:04:26 UTC] PHP Warning: array_keys() expects parameter 1 to be array, boolean given in /public_html/wp-content/plugins/bbpress/includes/core/capabilities.php on line 453
[25-Nov-2012 15:04:26 UTC] PHP Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/bbpress/includes/core/capabilities.php on line 453November 25, 2012 at 2:15 pm #120743Topic: How to use BBpress functions in WordPress?
in forum Installationfrenzis73
ParticipantI would like to show the latest forum in the footer of my WordPress site. I would like to use bbp_list_forums(); function. But it seems is not possibile.
Could you help?
Regards, Francesco.
November 25, 2012 at 2:14 pm #120742In reply to: Merge two or more forums in one
frenzis73
ParticipantHi James, thanks for you reply. I would like to merge two or more forums in the same BBpress installation (one single WordPress), not from two differents BBPress.
Is that possibile?
Regards, Francesco.
November 25, 2012 at 2:00 pm #120741Topic: error capabilities.php on line 453
in forum Installationjosefabiosan
Participantafter I updated to 2.2 bbpress whenever I create site-WP multisite appears in this message.
Warning: array_keys() expects parameter 1 to be array, boolean given in /home/subvogco/public_html/wp-content/plugins/bbpress/includes/core/capabilities.php on line 453November 25, 2012 at 12:41 pm #120740Hansaplastique
ParticipantFor some reason my code didn’t stick; I mean remove:
bb_new_topic_link();November 25, 2012 at 12:34 pm #120739Hansaplastique
Participant+1 for me.
I installed “bbPress Topics for Posts” (plugin link).
I wanted to create one forum that collects comments on articles (this plugin does that very well – only downside is that comments made in the forum do not count as comments but are visible).Anyhow; I want users to be able to reply, but NOT create new topics.
Right now it’s either no new topics and no new replies, OR new topics and new replies.Of course I could modify the forum.php and remove the
for the specific forum. Is there an easier (more future proof) way?November 25, 2012 at 11:10 am #120738In reply to: How is the forum archive page generated?
Michael
ParticipantOkay, after some sleuthing I’ve figured out why page.php is *always* called to display the Archive Base and Topic Base.
The set of available templates appears to be hard-wired in (rather than selecting from all available Templates in the selected Theme) in bbp_get_theme_compat_templates() in …/bbpress/includes/core/template-loader.php.
bbPress appears to want to select from a known list of “bbPress friendly” Templates to display pages, so it uses this hard-wired list when it goes hunting for the Template to use for displaying a given bbPress page.
The $templates array includes the following Template file names (as of v2.2.2):
$templates = array(
'plugin-bbpress.php',
'bbpress.php',
'forums.php',
'forum.php',
'generic.php',
'page.php',
'single.php',
'index.php'
);
What’s important here is that the ORDERING of the Templates in the array matters, as the function bbp_locate_template() goes through this array sequentially and returns the first Template it finds, which gets used to display the bbPress page.bbp_locate_template() searches the Child Theme first, then the Parent Theme, and finally the theme-compat folder, so in theory one can install a Template in the Child or Parent Theme with one of the above Template file names, and so long as bbp_locate_template() finds it first, we’re all cool — that Template will get used for Forum pages.
There are 3 ways I can see to ensure my special Template is used when the Archive Base is displayed, in order of simplicity:
1. Edit the hard-wired $templates array in bbp_get_theme_compat_templates() in template-loader.php and add my template name to the top of the list. Of course, this is BAD PRACTICE since it will get overwritten in the next bbPress update, but a quick way to test out a Template.
2. Create a Template called “plugin-bbpress.php” and put it in my Child Theme directory. That’s the simplest.
3. Hook into bbp_get_bbpress_template, which is used as a filter on the $templates array and add my Template name as the first entry in the array. This is the way it’s intended to be done, from what I can tell.
All three of these will work, but they all have the downside of completely ignoring the Template setting of the Page Attribute for a given WP page (see here for what I’m talking about). For a given WP page that is “partnered” with a bbPress page, bbPress should use the Template specified in the Page Attribute. That’s what it’s there for.
While I haven’t tried it yet, perhaps I can hook into bbp_get_bbpress_template and inject the current page’s Page Attribute for the Template. I’ll have to dig into this a bit and see if it’s worth the effort. It seems like that would be the cleanest way, as well as in the spirit of how Page Attributes are supposed to be used.
Wish me luck.
Michael
November 25, 2012 at 9:21 am #120734In reply to: How is the forum archive page generated?
Michael
ParticipantOkay, I’ve been doing some digging and perhaps as expected, the theme Template page.php (the default WP Template) is being called to build the Archive Base page. I can edit the page.php in my child theme and customize from there (where it eventually calls the_content(), which apparently executes content-archive-forum.php to display the Forum “front page”), but that’s a brute-force method since page.php is the default Template for all pages. I want to create a Template explicitly for bbPress pages, which means I need a way to specify the Template to use on a per-page basis.
Normally this would be done by simply creating a Template (like page.php) and put it in your child theme directory, then select it for a specific page you want to apply it to using the wp-admin Edit Page -> Page Attributes -> Template pull down, save it and voila, your page uses your custom Template.
But with bbPress pages that are “partnered with a WordPress page” (per this topic discussion), this doesn’t work for the partnered page. The Template setting seems to be ignored, and only for bbPress pages partnered this way.
This may not be a show-stopper for me, but may be for others looking to customize the overall page Template for their bbPress pages. Is it a bbPress bug? I can’t tell, and hopefully I’m missing something painfully obvious, being new to installing/using bbPress.
Seems like there must be some kind of code frag in the plugin that does something like:
if (request to display (Archive Base | Topic Base) {
if ((Archive Base | Topic Base) is partnered with WP page) {
point the_content() at (content-archive-forum.php | content-archive-topic.php);
call default page Template;
}
}
JJJ or someone else in-the-know, can you comment on how the “partnering with a WordPress page” works? Where is this performed? Sorry if the question is naive, I’m just having trouble understanding how this partnering works at the Template execution level.
Many thanks.
MichaelNovember 25, 2012 at 8:57 am #120733Michael
ParticipantYep, that does indeed work. I still have a problem with being able to apply different page templates to this page, though — and this may not be a bbPress-specific issue, but it shows up only on bbPress pages created this way.
The thread for this discussion is here.
Thanks
MichaelNovember 25, 2012 at 8:12 am #120732In reply to: Migrate under my xoops forum to bbPress
le-gentilone
ParticipantThank you for your fast response.
Should I install wordpress locally and to import into my website which is still under xoops, or save the database and then import the file “example.php”?
I’m so scared of losing everything, before I make a mistake trying to understand.
I am just a novice and I could not make this correspondence.Merci pour votre réponse aussi rapide.
Faut-il que j’installé wordpress en local, et faire l’importation sur mon site qui est toujours sous xoops, ou sauvegarder la base de données et ensuite importer le fichier «example.php» ?
j’ai tellement peur de tout perdre, qu’avant de faire une bêtise j’essaie de comprendre.
Juste que je suis novice et je ne saurais pas faire cette correspondance.November 25, 2012 at 7:38 am #120731In reply to: Roles and Capabilities in bbPress 2.2
NickMackz
ParticipantWell that’s weird. The ‘Member’ role just recreated itself. All I did was tick ‘Allow BuddyPress Groups to have their own forums’ in the forum options and save-changes and ‘Repair BuddyPress Group Forum relationships’ in tools.
It doesn’t have the same capabilities that it had before. It has gained the edit-posts capability and has a few bbPress related capabilities.
-
AuthorSearch Results