Search Results for 'code'
-
AuthorSearch Results
-
March 8, 2012 at 8:48 pm #112333
pepeng
MemberNOTE: that is the code of my header.php
Cheers,
March 8, 2012 at 8:45 pm #42710pepeng
Member<div id="sub_header">
<?php
/***
* This conditional determines where exactly what page you are one.!
**/
if(is_home()){
/* Blog Page */
echo '<h1 class="page_title">';
echo 'Welcome to my Blog';
echo '</h1>';
echo '<h2 class="page_blurb">';
echo ' just another wordpress site';
echo '</h2>';
}else if(is_front_page()){
/* Landing Page */
echo get_post_meta($post->ID, "Landing Header", true);
}else{
echo '<h1 class="page_title">';
echo get_post_meta($post->ID, "page title", true);
echo '</h1>';
echo '<h2 class="page_blurb">';
echo get_post_meta($post->ID, "page blurb", true);
echo '</h2>';
}
?>
</div>This the default site of my bbpress forums:
http://localhost/mysite/forums/
And I try to make page for forum using the short code [bbp-topic-index] :
this is the link:
http://localhost/mysite/forum/
and I try to edit this code above:
}else if(is_page('forum')){
/* Forum Page */
echo '<h1 class="page_title">';
echo 'Forum Support';
echo '</h1>';
echo '<h2 class="page_blurb">';
echo 'Press community';
echo '</h2>';and it works fine only in page (forum) http://localhost/mysite/forum/
but when I click all the the content in the forums my Title and Blurb has gone.
WHat I want to do is my sub header page title and page blurb will appear in any page in forums.
ANYONE knows how to fix this or how to add code?
I’m just a beginners in wordpress
your reply is much appreciated,
Thank’s
March 8, 2012 at 6:52 am #112307In reply to: 2.1 auto-embed feature not working?
Jared Atchison
MemberHmm, I’m out of ideas then. It works on both of my test installs
March 7, 2012 at 9:58 pm #112280In reply to: Where do I find the forum users?
Jared Atchison
MemberYou will need to use the shortcodes listed on https://bbpress.org/forums/topic/bbpress-20-shortcodes
So for example you will want to create a ‘Registration’ page that will have the
[bbp-register]on it.Then you will probably want to create a ‘Login’ page that has
[bbp-login]on it.Lastly, you will want to go into your Forum settings (Settings > Forums) and uncheck “Allow guest users without accounts to create topics and replies”.
March 7, 2012 at 8:34 pm #112278In reply to: Where do I find the forum users?
Jared Atchison
MemberNo, unregistered users who leave a comment are not created an account. That’s why they aren’t showing up in the user list.
Even though they are entering in their email address, it’s not actually creating a user account for them
March 7, 2012 at 7:33 pm #112219In reply to: Custom profile fields
Rambomst
MemberIt’s not “incorrect”. Its just not “complete”. I am using Cimy Extra User Fields, I changed forum-user-edit.php to include the new field. I then set the field in the admin panel with a value which is being populated correctly however I was unable to find the function where all the information is being saved in bbPress when “Update User” is being clicked so I cant put in the code needed to save the Cimy fields.
March 7, 2012 at 7:08 pm #112161In reply to: Installed 2.0.2 Can't get shortcodes to work
removing1
MemberYes the forums show up when I change the theme to the bbPress 2010 theme.
March 7, 2012 at 6:20 pm #112253In reply to: Single Reply Freshness instead of Exact Post Date
highexistence
ParticipantAnyone else interested, place this in your functions.php file:
function bbp_get_reply_last_active_time( $reply_id ) {
$last_active = get_post_field( 'post_date', $reply_id );
$last_active = !empty( $last_active ) ? bbp_get_time_since( bbp_convert_date( $last_active ) ) . ' ago' : '';
return $last_active;
}and then call it in loop-single-reply.php
March 7, 2012 at 4:41 pm #112218In reply to: Custom profile fields
Jared Atchison
MemberWhat code are you using to register the extra field in user profiles? If it’s not showing up it’s likely not correct.
March 7, 2012 at 2:58 pm #112183In reply to: How to disable ahref tags in posts?
thetalltree
MemberThanks John for the heads up. This is what I did:
1.) Open Wp-includes > kses.php
2.) Find the following:
$allowedtags = array(
‘a’ => array(
‘href’ => array (),
‘title’ => array ()),
‘abbr’ => array(
‘title’ => array ()),
3.) Remove:
‘a’ => array(
‘href’ => array (),
‘title’ => array ()),
I tried adding // but it does not work, so I removed the tag.
Not sure if what I have done is the right method, but it seems to work.
Some more info here:
https://codex.wordpress.org/Answers-Configuration#Stopping_HTML_in_Comments
March 7, 2012 at 1:45 pm #112160In reply to: Installed 2.0.2 Can't get shortcodes to work
John James Jacoby
KeymasterMore likely it’s your theme not working with bbPress, then. Does whatever you’re trying to do, work correctly with TwentyEleven or bbPress (TwentyTen) ?
March 7, 2012 at 8:10 am #112217In reply to: Custom profile fields
Rambomst
MemberThey aren’t mirrored and if the extra fields are manually added into the theme then on update they aren’t set. I have looked through a lot of the bbPress files and can’t work out where I should add some custom code so on user profile update it will also update the custom entries I added.
Any help would be much appreciated.
March 7, 2012 at 5:55 am #88338In reply to: Avatar size
Aahan Krish
ParticipantThe size of user avatar displayed in posts/replies is defined in
/wp-content/plugins/bbpress/bbp-includes/bbp-reply-template.php.This is the piece of code:
function bbp_get_reply_author_link( $args = '' ) {
$defaults = array (
'post_id' => 0,
'link_title' => '',
'type' => 'both',
'size' => 80,
'sep' => ' '
);Change ’80’ (is equivalent to 80px) to a number of your choice.
While it’s not suggested that you modify core bbPress files, I know no other way (I don’t know PHP).
Hope that helps!
March 6, 2012 at 10:28 pm #112241dorsetjon
MemberI’m still hacking around and have just discovered shortcodes…they do some of what I wanted and, for example, can give a similar *layout* to the .org page. Still want to change some of the way the content looks, e.g. remove the navigation path above the forums and topics lists (is that possible without a theme or code change?), and I guess that may require a theme or code change but I’ll keep investigating.
March 6, 2012 at 10:11 pm #112238Jimfire
MemberMy original question was this: I have BBP 2.x. When my users click on “Forum” on my menu, I would like it to look like THIS forum that I am on right now.
I’m not a php coder and I haven’t figuered out how to make a theme just yet. I’ve only been at this for a little while.
I’m working on it, but I’m not there yet.
I’m running twenty-eleven with my WordPress right now. Does anyone know a painless way to get my BBPress to look like bbpress.org when my users click on it?
Tanks,
JIM
March 6, 2012 at 9:59 pm #112237dorsetjon
MemberThanks guys, really appreciate you taking the time to reply. That answered the question…I wanted to know how I could make some changes to the layout to achieve things I have seen on other sites and it appears a theme is the answer.
I am more than happy to learn and get my hands dirty as suggested, but really need documentation for that because I don’t have time to work out how this all works by looking through the code. However, that’s absolutely no criticism and I am well aware of how long it takes to create documentation.
Thanks again for your replies and for creating this plugin.
March 6, 2012 at 9:41 pm #112159In reply to: Installed 2.0.2 Can't get shortcodes to work
removing1
MemberIt is the bbPress shotcodes I can’t get to work. I thenk that it is bbPress is not working with the Zeoal theme.
March 6, 2012 at 9:37 pm #112236John James Jacoby
KeymasterI don’t really understand the question. If you want to make a theme that looks like another theme, you make it. If you don’t know how to, you either learn how and hopefully contribute what you learn back to the community via the codex or forums, or you hire someone that already knows how to do what you do not know how to do.

Maybe I’m missing the point. I get that the documentation isn’t great right now, but it’s exactly the same as making a WordPress theme. The template files and their locations are already in the bbp-twentyten theme as an example.
Making an entirely custom theme is *not* a step-by-step paint-by-numbers thing. It’s not something anyone can teach you how to do, you have to learn it yourself.
March 6, 2012 at 9:12 pm #112235Jared Atchison
Memberjjj will respond when he has a chance, but I’ll say he does 3 different jobs so he doesn’t always have time to respond right away.
He is an Automattic employee where his full time role is head of “social”. bbPress and BuddyPress are his other projects that he does on the side.
I encourage you, when you have time, to listen to a recent interview with jjj http://wpcandy.com/broadcasts/community-interviews/002-john-james-jacoby – you’ll get an idea of just how much work he has on his plate – frankly I don’t know how he does it.
Both bbPress and BuddyPress are maintained by volunteers like jjj and myself. We contribute and help out as much as possible, but ultimately projects that “pay the bills” come first.
I’ll let jjj give his point of view, but I can tell you with 99% certainty that there is no easy way to make bbPress 2.x look like bbPress.org – they are simply two completely different platforms. bbPress 2.x was a total rewrite of bbPress, from the ground up, so that bbPress could be a plugin instead of a stand alone install.
And yes, when bbPress.org is upgraded – whenever that time comes – it will adopt the new bbPress 2.x look. I understand that some people like the 1.x look better however that all comes down to personal preference – personally I like the 2.x look but that’s my preference.
Googling for bbPress themes and plugins is hit or miss but is going almost be a miss if you are using 2.x. It’s been out only a year, so the vast majority of what you find is going to be for 1.x. Recently there has been quite a few nice plugins popping up that are for 2.x – you can find these in the WordPress.org plugin repository
https://wordpress.org/extend/plugins/search.php?q=bbpress
bbPress is actually quite well documented, however right now most of the documentation is in the actual code. Writing up documentation takes a lot of time and effort – WordPress.org codex is a perfect example – it’s fantastic but it is also maintained by 100s of contributors.
I’m sure jjj could spend some time writing documentation, but then none of the bugs that come in would be addressed in a timely manner, none of the features that people are constantly asking for would ever get written. Every comes down to volunteers – we just don’t have enough. Anyone with a user account can write and contribute documentation for bbPress so i think it’s unfair to expect jjj to do that on top of the dozens of other things he already does.
I do know that when 2.1 is released, which should be fairly soon, we are going to add some stuff to the bbP codex, however it’s night going to be something that appears overnight.
I’m not sure what you mean by “better standard theme” – the theme that ships with bbPress 2.x works well – the one that ships with the upcoming 2.1 is even better. Logistically it’s impossible to ship with a bbPress theme that fits everyones needs and works with all WordPress theme, but we try to make it as compatible as possible.
bbPress does a lot of great things “out of the box”. However it comes to a point that when certain customizations are needed you are either going to have to get your hands dirty with code or hire a developer to assist you – and that’s just the nature of the beast – for any open source project.
If you are looking for a forum application that has 100s of contributors, many of which focus on the project full time, then unfortunately bbPress may not be the best fit for you. Vanilla, phpBB, along with others are some great alternatives.
March 6, 2012 at 9:04 pm #112216In reply to: Custom profile fields
John James Jacoby
KeymasterbbPress uses WordPress’s user profiles code, so any new fields you add to the dashboard profile (with a plugin or otherwise) should be mirrored in the theme. If you need an easy GUI to create profile fields, try BuddyPress.
There are a bunch of examples on how to do this with WordPress. Follow those instructions and you should be fine.
March 6, 2012 at 6:52 pm #112223In reply to: What am I doing wrong?
tilly2012
MemberSo does that mean I can have a forum? I don’t see it anywhere on my site. Sorry, I’m not good with this tech stuff at all. Please bear with me.
March 6, 2012 at 6:31 pm #112182In reply to: How to disable ahref tags in posts?
John James Jacoby
KeymasterTo answer your question, you’ll need to put a custom filter on WordPress’s kses. A Google search should help you tremendously. If you’re not a developer or not comfortable diving into the code, you’ll want to spend some time learning, or hire someone to help you.
March 6, 2012 at 6:16 pm #112255In reply to: MySQL Error After Forum Reply Submittted
John James Jacoby
KeymasterNo idea what the error is to help.
March 6, 2012 at 6:11 pm #112158In reply to: Installed 2.0.2 Can't get shortcodes to work
John James Jacoby
KeymasterShort codes are not used in bbPress, to limit their exposure from unauthorized users. Most shortcodes do not have capability checks attached to them, and since bbPress comes with its own shortcodes, we don’t want shortcodes inside shortcodes.
Maybe in a future version.
March 6, 2012 at 6:09 pm #112154In reply to: Adding a Reply Button to each single topic post
robgnyc
MemberIs there any reason why this wouldn’t work:
‘
onlick="document.getElementById('bbp_reply_content').focus();‘I put this in but it does nothing. Just need the button to jump down the page to the textarea and set focus there. Should be simple.
-
AuthorSearch Results