Search Results for 'code'
-
AuthorSearch Results
-
November 23, 2012 at 6:45 pm #120652
In reply to: bbPress 2.2.2 released
LabSecrets
ParticipantBetween 2.2.1 and 2.2.2, we found that the profile pages suddenly “vanished” (but the code was still there). It was a CSS issue.
For our clients and personal sites, the fix was on line 78 of the default css:
We changed “clear:none” to “clear:both”
#bbpress-forums #bbp-user-wrapper ul.bbp-lead-topic, #bbpress-forums #bbp-user-wrapper ul.bbp-topics, #bbpress-forums #bbp-user-wrapper ul.bbp-forums, #bbpress-forums #bbp-user-wrapper ul.bbp-replies, #bbpress-forums #bbp-user-wrapper fieldset.bbp-form { clear: both; }November 23, 2012 at 6:42 pm #120651Pierre-Luc Auclair
ParticipantI’m trying to understand if/how it is possible to call BuddyPress functions outside the forum (in a regular WP page). The Codex isn’t of much help…
I am trying to create a latest topics list and a forums list on regular WP pages (home.php, index.php), etc.
Thanks for the help !
November 23, 2012 at 5:07 pm #120647In reply to: 2.2 and Theme Compatibility
John James Jacoby
KeymasterIt’s a bit difficult to wrap your head around at first, but the reason theme compatibility exists, is because you should not modify code/templates that come with plugins or themes. When using a plugin like bbPress, and a theme that isn’t yours, you need some other way to introduce code into WordPress.
You can use either a plugin, or a child theme to do this.
You’ll want to research both methods, and figure out which one suits your situation and needs.
November 23, 2012 at 5:00 pm #120646In reply to: Getting forum description
John James Jacoby
KeymasterYep!
bbp_get_forum_content( $forum_id );to returnbbp_forum_content( $forum_id );to echo
November 23, 2012 at 4:58 pm #120645Topic: 2.2 and Theme Compatibility
in forum Troubleshootingnickzee
ParticipantDear community.
I have spent the last few (5) hours reading the various posts, trying to get bbpress to integrate with my custom WP theme. Unfortunately, I don’t have the knowledge (or enough) to figure out how to make the two work together.
Info
Wordpress: 3.4.2
Site link: http://www.restorationcoach.com/restoration_coach/forums/
Using this theme: http://www.templatemonster.com/wordpress-themes/39849.html
bbpress: 2.2My main issue seams to be css related. I think bbpress is and the theme are sharing css files, causing a funky appearance. Overall forum function seems to be working fine.
So far I’ve done the following.
Completely removed bbpress and installed new 2.2 version.
Read: http://codex.bbpress.org/theme-compatibility/ (this is for customizing the bbpress theme, if you want? And if you don’t, then leave the install as is?)
Watched: http://www.youtube.com/watch?v=lB2Oodx2GJw (not sure if this applies with 2.2)
Switched to Twentyeleven: Looks better, side bar is missing, and footer contact form, map and links are over top one another.I can see in firebug where both style.css and bbpress.css are being used to style the forum. Most specifically #page-content ul li. This, I believe, is causing the issues but not quite sure how to fix it.
Thank you in advance for the assistance.
November 23, 2012 at 4:23 pm #120642In reply to: Roles and Capabilities in bbPress 2.2
Kevin Behrens
ParticipantCapabilities are saved in the database, per user, per site, and they bubble based on the role they are granted. If you use any plugin that modifies editable roles or capabilities in the database, what you’re doing is changing the individual capabilities for every user that gets that role going forward, but not necessarily every user that had that role in the past.
I think the type-specific dynamic roles are a nice addition to the WP permissions layer. No doubt a significant minority of users will continue to find value and convenience in the ability to customize stored role definitions. Once WP moves to disregard the wp_user_roles array, role editing plugins will just be forced to store the rolecaps array externally and apply them through the filters you provide.
I won’t argue the philosophy of how much customization to fence off for safety/liability, but your writeup exaggerates some of the existing hazards. The “existing users unaffected by role edit” scenario only occurs if custom user capabilities were explicitly assigned. Otherwise, under stock code:
Granting a role stores the role name into the user’s usermeta capabilities array. So editing a stored role definition does affect current members of that role (not just future members).
Granting a role does not store a copy of all currently defined rolecaps into the usermeta capabilities array.
November 23, 2012 at 4:15 pm #120641John James Jacoby
KeymasterPut this in mu-plugins, or make a plugin out of it, or put it in your functions.php file of your theme. Probably will want to rename “foo” though.
function foo( $args = array() ) { $args['teeny'] = false; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'foo' );November 23, 2012 at 4:11 pm #120639John James Jacoby
KeymasterThat’s not a great solution, because you’re missing out on all the other things that hook to the_content otherwise.
Are you using
query_posts()anywhere? Are you not usingwp_reset_query();when your WP_Query’s are done?November 23, 2012 at 3:23 pm #120637htz77
ParticipantI found a solution: if my template uses get_the_content() instead of the_content(), then I can apply the normal content filters — wpautop() and wptexturize() — directly to the raw content, untouched by bbPress.
$raw_content = get_the_content();
echo wptexturize(wpautop($raw_content));
November 23, 2012 at 2:31 pm #120635padekan
ParticipantI updated to bbPress 2.2.1 last night and had the same problem with Ultimate TinyMCE plugin. The plugin sued to work beautifully with bbPress, now I get the default fancy editor. I’m not a PHP guru so I’ve been trying to avoid messing around in the code as Michael suggests. Is there any other option to get that editor enabled (it does show up in the dashboard versions of new Topic and I miss the table drawer)
regards, Paul
November 23, 2012 at 10:38 am #120626In reply to: Filter name
John James Jacoby
KeymasterChanged to
bbp_single_user_details_avatar_sizein the branch, will be 2.2.3, which has no date set yet. You can safely modify that code in your file if you’d like, any future update will include it.November 23, 2012 at 10:13 am #120620Topic: Filter name
in forum TroubleshootingSami Keijonen
ParticipantThere is filter called
twentyten_author_bio_avatar_sizein user-details.php. Is this intentional, or should it be likebbpress_author_bio_avatar_size?November 23, 2012 at 7:05 am #120611htz77
ParticipantHey JJJ, thanks for helping out again.
Hmm. When I comment out line 633 in bbpress/includes/core/theme-compat.php,
//bbp_remove_all_filters( 'the_content' );
the problem is fixed — the custom WP_Query’s all have the correct paragraph breaks. So it still seems related to me somehow. But of course I don’t want to just keep it commented out. I’m sure it’s there for a reason, and I don’t want to edit core files.Also, I just added
is_main_query()andin_the_loop()to the templates that do my custom WP_Query queries. And even those show is_main_query = TRUE, which seems weird, huh. Though in_the_loop = False, as it should be, so I’m not sure why that wouldn’t prevent the problem.Any further insight much appreciated!
November 23, 2012 at 1:52 am #120594In reply to: I give up. Will pay for BBpress migration help.
bbuser12345
ParticipantI’m confident you’ll figure it out.
I wish I was as confident…
It’s fine to be frustrated, but your tone towards the volunteers trying to help you is pretty crappy.
My tone is one of exasperation (maybe desperation). I have been using BBPress for 5 years, and stuck with it through “the dark years”. I have read all the help pages, and I know my way around a command line, yet this converter, built ostensibly to help non-experts, does not work and I cannot find help. I have a message board that is falling apart, and being overrun by spam, and I have spent countless hours trying to migrate the database using the converter. Which is just the first step in migrating the forum.
If you don’t like the documentation, change it. It’s a WordPress site where everyone is an Editor, and you can be part of the solution just like every other volunteer, or you can be upset because the amazing free software you’re using isn’t as polished as we all know it could be. If only we had more volunteers… Paradox.
I am not sure whether to laugh or cry. If I knew what was wrong with the documentation, I would change it. Of course if I knew what was wrong with the documentation I would likely not have a problem in the first place and would never have sought out the documentation. There is your paradox. People who seek out documentation are by definition having trouble and are likely not expert users. They are the last people who are qualified to improve the documentation.
We brought the old bbConverter into bbPress in 2.1. bbConverter development stopped, and I took it over and brought it into bbPress core along with several much needed fixes. Trying to use software that you know is abandoned and others have not succeeded with is generally a bad idea.
Thats great information!! Why does it not appear either on the bbconverter plug-in page or on the https://codex.bbpress.org/import-forums/ page?
I should note that I don’t see any way for me to add this information to the documentation of either the old deprecated plug-in (which gets downloaded and installed many times a day apparently) or on the codex page for the converter.
The connection failure doesn’t provide the feedback you’re wishing for. There is no “your password was incorrect but the username is okay” level of feedback, so you’re on your own. Based on how capable and experienced you are, let’s assume it’s correct anyway.
Wait! You said connection failure… how do you know it is a connection failure? Is there something in the message (or that is not in the message) that tells you that? If so why does the console not report:
“You have failed to connect to the server. At least one of these three things is wrong: The Old Database’s Server Name, The Database’s User Name or the old Database’s User Password. Unfortunately, this converter cannot tell you which one or more of these things is wrong”
Instead the error I get is one I would expect if I had the name of a table in my database wrong in a query.
Look, I know that you cannot pass on information to the user that the server does not report. But when I access mySQL databases and servers the wrong way with a mySQL client or R or python or myPHP I get error messages with error codes. Things like “#1045 Cannot log in to the MySQL server”. This lets me know what I have screwed up so I can fix it. Is it a missing table or the wrong database name? Or am I not even connecting to the server at all? Again if for some reason you are not getting these messages then I guess I am “on my own”.
So… you’ll have the best luck if your bbPress 1.1 tables are in the same database as your current WordPress installation. Maybe try exporting those tables out of the other database, and importing them into the current one, and give it another shot.
Even more good information! Thank you. I would edit the documentation to let others know about this, but every time I try to log in to the codex site for BBpress, I get taken to the buddypress site.
=======================================================================
For what it is worth:My tone is also one of frustration. BBPress is an awesome bit of code and you guys have spent a great deal of time making it do really awesome things, but as is the case with many opensource projects, no one seems to care if anyone can actually use the awesome product.
I am a part of a pretty big opensource community, and bad documentation is a systematic problem. People make amazing things then fail to help users actually use the code. I write lots of code that I end up releasing to that community. I spend a good bit of time making my documentation work for people who are newbies to using the program. I assume they picked up the program just to use my package/functionality and I write my help with that in mind. Why?, because I want them to use my code, I want them to learn about the program, and I eventually hope they will become a part of the community and contribute.
November 23, 2012 at 12:02 am #120580In reply to: Custom login Page
Keikabile Lesego
ParticipantHello, Stephen. Looking at the were things are, accoding to my little experience since i started using wordpress, I know the is no how wp-login.php page can look this way without editing the core css Because wp-login.php file is not located in a child theme root so its a lil difficult, to call css style from a child theme that will edit the apparence of page that is not in the child theme… Unless The web-owner used a plugin to replace the core, still as i mentioned above it looks the same as other pages because there is no page header, though it was made to suit the site appearance… What if you want to call the header, for those who have a different websites with a header. Maybe i dont know something does removing a link that you dont want or any code in wp-login.php called hacking core? If it is then there was core hacking on the link you just shared. In royaltweet.com i just called the header, edited css style and removed the links that i didnt like, eg login title and everything became great.
November 22, 2012 at 11:35 pm #120579In reply to: I give up. Will pay for BBpress migration help.
bbuser12345
ParticipantFair enough. If I have to pay someone more than $20 to use the provided migration wizard I will. (FWIW, on oDesk people are free to bid whatever they are willing to bid to do the project.) I have been trying this conversion on and off myself for about 6 months, I’d pay $100 if someone who knew what they were doing would help me out. (Why it would take anything like 20-40 hours for someone to figure out what I need to fill in on a web form in order to get the wizard to work is beyond me.)
This should be simple right? I have a BBpress standalone and I want to convert the database to be used by the plug-in. This is the simplest case. I know how to set everything up all I need to know is what set of magical things to put in the form fields to get the converter to actually work.
I know how to back up my database, and I use mySQL all the time in my daily work. I write programs for a living that access and analyze massive data bases. If I knew what needed to be done to the data base to make it work with the plug-in (that is what the wizard is doing under the hood) I could do the migration myself with an R script or something similar. However, there is no place where it is documented what needs to be done to convert the database.
The statement that: “Once you have the right tools and become relatively proficient, it’s actually pretty easy.” is tautological. However, it is the sentiment one gets when trying to follow the BBpress’ documentation: “If you already knew how to do this, here is how you would do this”.
Here are a few of the issues:
Half of the replies in the forums say to follow this plan:
https://codex.bbpress.org/import-forums/The other replies say to use the plugin:
https://wordpress.org/extend/plugins/bbconverter/Which is it? Why are there two different ways? Is one applicable to one situation and the other to another?
Of course neither will work for me (and many others apparently). The support page at http://bbconverter.com is dead and so there is no information there. The other page contains very sparse information about what one should put in the form fields.
***Here is the biggest issue. The console on the wizard does not give any information that would help you diagnose what step in the process has failed.
For example I just get:
==========================================
Please don’t forget to update your counters HEREWordPress database error: [Table ‘databasebbpress.forums’ doesn’t exist]
SELECT convert(forums.forum_id USING “utf8”) AS forum_id,convert(forums.forum_parent USING “utf8”) AS forum_parent,convert(forums.forum_name USING “utf8”) AS forum_name,convert(forums.forum_slug USING “utf8”) AS forum_slug,convert(forums.forum_desc USING “utf8”) AS forum_desc,convert(forums.forum_order USING “utf8”) AS forum_order FROM forums AS forums LIMIT 0, 100No forums to convert-
Not clearing default passwords-Not Converting users Selected-
No data to clean-
Starting Conversion…
==============================
I am left to wonder, is the problem logging in to the server?
If so:
Is the problem the server name?
Is the problem my password?
Is the problem my username?Is the problem connecting to the database?
If so:
Is the problem the database name?
Is the problem a permission?
Is the problem my password?
Is the problem my username?I am just told that the database does not exist. Well it does, I can log-in using myPhp and there it is.
I will continue to search for “the right tools” and to become more “proficient”. In the meantime I will continue to try to find someone who know enough about the guts of BBpress and WordPress to tell me why my database that does exist, does not exist in the eyes of the converter.
November 22, 2012 at 9:56 pm #120576In reply to: Index page not working properly in Graphene Theme
Stephen Edgar
KeymasterProfile Shortcode? No such thing? https://codex.bbpress.org/shortcodes/ Maybe there should be?
November 22, 2012 at 9:31 pm #120572In reply to: Index page not working properly in Graphene Theme
Pippin Williamson
ParticipantOk now I see the issue with the profile page. If you create a new (regular) page and place the profile short code on it, does it work?
November 22, 2012 at 9:07 pm #120571In reply to: Any Way to Convert WordPress Comments to BBPress
Stephen Edgar
Keymaster@radi_v Take a look at this https://github.com/nosecreek/Posts-to-bbPress
It is doing ‘Converts WordPress posts and comments to bbPress topics and replies.’
I haven’t looked closely at the code yet (possibility including this to the bbPress core ‘import tool’) though you may be able to tweak it to only do ‘comments’ to ‘replies’.
November 22, 2012 at 7:45 pm #120567In reply to: upgrading bbPress 1.1-alpha-2855 to latest version
Stephen Edgar
Keymaster– Backup your site and all your databases often during all these steps in case any step along the way you can revert back to a working site
– Upgrade your bbPress 1.1alpha to the final 1.1 release https://bbpress.org/download/legacy/ https://codex.bbpress.org/legacy/updating/
– Install bbPress 2.2x plugin to WordPress https://wordpress.org/extend/plugins/bbpress/
– Run the bbPress 2.x Tool ‘Import Forums’ to import your old forums https://codex.bbpress.org/import-forums/November 22, 2012 at 5:05 pm #120557Martin ( Martin_C )
ParticipantIn case a user change his display name to be diffrent from his username, you cannot use @someusername to mention someone since you do not know what the users username is.
Would be nice to be able to optionally include an
@someusernamejust below the link to a reply or topic authors profile.Perhaps the best way of doing this would be to add an extra argument to the args array for the bbp_get_reply_author_link function. The current args are:
$defaults = array (
'post_id' => 0,
'link_title' => '',
'type' => 'both',
'size' => 80,
'sep' => ' ',
'show_role' => false
);But could be changed to:
$defaults = array (
'post_id' => 0,
'link_title' => '',
'type' => 'both',
'size' => 80,
'sep' => ' ',
'show_role' => false,
'show_mention' => true,
);I know having the user name visible is kind of a security issue, but since the user name already is visible in the profile URL…
Also, a setting for this in the backend would be nice.
-
This topic was modified 13 years, 9 months ago by
Martin ( Martin_C ).
-
This topic was modified 13 years, 9 months ago by
Martin ( Martin_C ).
November 22, 2012 at 1:06 pm #120551spwestwood
ParticipantHi Kannued,
There were 2 queries I posted. There needs to be 2 because previously in v1 bbPress had 2 seperate tables – one table for the initial topic post and then another table for the followup replies. All posts are now contained in wp_posts.
So the first query takes all the author ids from the forum topics and copies them across to the wp_posts table:
update wp_posts inner join bb_topics on wp_posts.post_title=bb_topics.topic_title set wp_posts.post_author = bb_topics.topic_posterThe second then does all the replies:
update wp_posts inner join bb_posts on bb_posts.post_time = wp_posts.post_date set wp_posts.post_author = bb_posts.poster_ id where wp_posts.post_author = ’1′(This is a bit messier. The only way I found to match bb_posts to wp_posts was by the time the post was made. For some reason looking at the text of the actual post didn’t match. Perhaps there was an encoding difference or something.)
Before running either it might be a good idea to check you are getting the same error I have. If you run the following:
select topic_title,topic_poster,post_author from wp_posts inner join bb_topics on wp_posts.post_title=bb_topics.topic_title order by bb_topics.topic_id descThis doesn’t make any changes. It shows you 3 columns: topic title / author in old bbpress / author in new bbpress.
For me the 3rd column was all 1s (which is my user id). So all I had to do was copy the second column across, which is what the 2 queries above do.
November 22, 2012 at 11:24 am #120547In reply to: Custom login Page
innomarkglobal
ParticipantShane answer is right you should take a look before any modification.
https://codex.wordpress.org/Customizing_the_Login_Form#Make_a_Custom_Login_PageNovember 22, 2012 at 8:07 am #120544In reply to: bbp_list_forums does not show anything
Shane Gowland
ParticipantAn even easier way to call shortcodes is with the do_shortcode() method.
You can programmatically call the bbp-forum-index shortcode like this:
<?php echo do_shortcode(‘[bbp-forum-index]‘) ?>
November 22, 2012 at 8:03 am #120543In reply to: Custom login Page
Shane Gowland
ParticipantHi Lesego,
As a general rule, we strongly advise users not to modify core WordPress/bbPress files under any circumstances. There are a whole host of issues you could be causing.
I recommend taking a look at “Customizing the Login Form -> Make a Custom Login Page”
-
AuthorSearch Results