Search Results for 'code'
-
AuthorSearch Results
-
September 23, 2009 at 3:20 pm #79636
In reply to: Delete the search facility.
chrishajer
ParticipantUsing display:none just hides it from display. If you want to remove it, remove the code from your template file. In the 1.0 versions it’s in header.php. Remove this stuff:
<div class="search">
<?php search_form(); ?>
</div>That will remove the search box.
September 23, 2009 at 1:06 pm #79581In reply to: Theme integration between bbPress and WP…
Jim R
ParticipantOk…after further testing and striking out, here is what a guy helping me and I have found out. We go through the ‘deep integration’ process, requiring the wp-load.php file in bb-config.php. Then we change all the bb_get_header(); with get_header();. That passes through the Hybrid News header’s style information but not the navigation.
When you link directly to the front-page.php, it shows the whole header, which is navigation, a banner ad I have in the header, everything. The same applies when you link directly to any of the affected pages in bbPress. However, it stops executing from there. So you just have the header and that’s it. There aren’t any errors showing up either.
So using my limited knowledge of PHP and my only slightly more developed since of deduction, one thing we can think which is different is we are bypassing:
path to bbpress / index.phpHere is that code:
<?php
require('./bb-load.php');
bb_repermalink();
$bb_db_override = false;
do_action( 'bb_index.php_pre_db' );
if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
$forums = false;
elseif ( !$bb_db_override ) :
$forums = bb_get_forums(); // Comment to hide forums
if ( $topics = get_latest_topics( false, $page ) ) {
bb_cache_last_posts( $topics );
}
if ( $super_stickies = get_sticky_topics() ) {
bb_cache_last_posts( $super_stickies );
}
endif;
bb_load_template( 'front-page.php', array('bb_db_override', 'super_stickies') );
?>This has to be easy (for those who really know PHP and WP). Right? Sadly, I’m not that kind of guy. It’s a bummer to have this kicka$$ WP theme and not have it be able to merge thematically with bbPress.
September 23, 2009 at 1:04 pm #79635In reply to: Delete the search facility.
Ashish Kumar (Ashfame)
ParticipantIs using
display:none;fine as per SEO? It violates the rule of showing different content to the users than the bot.September 23, 2009 at 12:56 pm #79633In reply to: Delete the search facility.
Adam Harley (Kawauso)
MemberAdd to your theme’s stylesheet:
.search { display: none; }September 23, 2009 at 12:46 pm #31853Topic: Delete the search facility.
in forum Themesrebeccadonnelly
MemberThe search box makes my forum look cluttered and as it will be a small forum I doubt it will ever be used. Therefore I would like to delete it, i’m quite new to web technologies and am having trouble working out what bits I need to delete to get rid of it! I’m sure this would be an easy question for someone more knowledgeable to answer, so help please!
September 23, 2009 at 9:17 am #31850Topic: Register form help me plz
in forum Pluginsharakiri1
MemberHi,
Can anyone help me how to add a new radio button ( male and female ) in register form and make it display in their profile ? with below code, i can change some text field but i cant create a dropbox or radio button to chose , for example : sex … it is too difficult

function get_profile_info_keys_personal() {
return array(‘user_email’ => array(1, __(‘Email’)), ‘user_url’ => array(0, __(‘Website’)), ‘from’ => array(0, __(‘Location’)), ‘occ’ => array(0, __(‘Occupation’)), ‘interest’ => array(0, __(‘Interests’)));
}
add_filter(‘get_profile_info_keys’, ‘get_profile_info_keys_personal’);
September 23, 2009 at 8:09 am #79552In reply to: Thanks for everything, Sam!
johnhiler
MemberWe should be ok. Best case scenario, Automattic will bring on someone to continue developing bbPress. Worse case scenario, we can fork the code from bbPress and continue development on our own…
Since WordPress is open source, maintaining cookie/user integration is definitely possible.But we can discuss all that in a separate thread… mostly just wanted to express appreciation for Sam in this thread! He wrote a huge amount of code and chimed in a lot of threads here on the forum – thanks again!
Sam, I hope the team at Automattic appreciates how hard you worked, and just how much they lost when you stepped down!
September 23, 2009 at 7:35 am #78775In reply to: "next page" link redirects to WordPress login page
annejan
MemberI fixed it!

It was the WP-o-Matic plugin…
September 23, 2009 at 7:08 am #79551In reply to: Thanks for everything, Sam!
Navin
MemberI really don’t hope that too.
Wow, really hope development doesn't stop on bbPress.September 22, 2009 at 11:31 pm #79603In reply to: Member List with BBPM
brad_langdon
MemberEven if someone can show me the code snippet to insert a dropdown list of the current members that would be great!
September 22, 2009 at 9:27 pm #79548In reply to: Thanks for everything, Sam!
Adam Harley (Kawauso)
MemberThanks for some great code Sam
September 22, 2009 at 9:06 pm #79505In reply to: User Activity & Topics Started
gerikg
Memberhere’s another way of forming my question….
this
<h2>Latest Forum Discussions</h2>
<ul>
<?php
global $wpdb;
$query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_time DESC LIMIT 10";
$results=$wpdb->get_results($query);
foreach ($results as $result) {
echo "<li><a href='/forums/topic.php?id=".$result->topic_id."'>".$result->topic_title."</a></li>";
}
?>
</ul>gets the Latest Forum Discussions, how do I get a USER SPECIFIC Latest Forum Discussions?
September 22, 2009 at 9:03 pm #79580In reply to: Theme integration between bbPress and WP…
gerikg
MemberThe code he uses calls the WP theme header.php but the WP header is showing null when he is in his forums.
September 22, 2009 at 8:46 pm #79579In reply to: Theme integration between bbPress and WP…
Jim R
ParticipantNow…we can at least state between the require code and the get_header();, it works on an otherwise blank page. So this can’t be a WP template issue. Using just the following:
<?php
require_once('/home/jwrbloom/public_html/wp-load.php');
get_header();
?>I get this: http://www.hoosierhoopsreport.com/wp-test.php
That works as it should. When I put the code in the bbPress template (the require code in bb-config and the get_header wherever bb_get_header is, it doesn’t work.
September 22, 2009 at 8:29 pm #79503In reply to: User Activity & Topics Started
gerikg
MemberWhat if I say I want the User Activity & Topics Started to show on the side instead of the profile, would that make a difference?
I saw this in my bbpress header, what does it do?
<?php
$_head_profile_attr = '';
if ( bb_is_profile() ) {
global $self;
if ( !$self ) {
$_head_profile_attr = ' profile="http://www.w3.org/2006/03/hcard"';
}
}
?>It might be something I need to pull the User Activity & Topics Started???
September 22, 2009 at 7:40 pm #78774In reply to: "next page" link redirects to WordPress login page
annejan
MemberThanks for your reply. I copied your code and deleted my own code.
The WP things in my bbPress are still working, but the “next page” problem is there still too.
Anyone a solution for the “next page” problem?
Thanks in advance!!
September 22, 2009 at 7:29 pm #79459In reply to: hooking a function makes mysql query to return empty
Adam Harley (Kawauso)
Member$limit was passed something which wasn’t numeric because… I guess that’s what do_action() does when it doesn’t have any arguments? Doing a var_dump(), it appears to be an empty string, so I guess it just passed the default value of the argument variable.
I found it because I noticed the SQL query wasn’t valid when it was run in phpMyAdmin and then noticed that there wasn’t anything after LIMIT.
I don’t know if there’s any performance gain, but it’s how bbPress code is written iirc and in the case of calling the user table, it’s essential when you’re working with a WP/bbP integration (as the table prefix is different).
So mostly it allows for the table names to be entirely variable, which is probably better practice in case a plugin changes them.
September 22, 2009 at 5:15 pm #79600In reply to: Pagination
Billy Wilcosky
ParticipantThanks guys, I’ll try both of those tonight when I get home, I’m at work right now. It probably is the space. CSS can be sensitive.
I wish I wasn’t so picky, then I wouldn’t even be worrying about this.
September 22, 2009 at 4:42 pm #79458In reply to: hooking a function makes mysql query to return empty
Ashish Kumar (Ashfame)
ParticipantSomehow I missed replying sensibly. I just want it to hook with the
post_post_formaction. Looks like Kawauso got it fixed but I am looking for explainations. Thanks!Why the $limit was passed something which wasn’t numeric? and how did you find it? I would like to know your approach.
And I didn’t get the point of using $bbdb over $bb_table_prefix ? Is there any performance gain?
and yes your code for profile link works more efficiently than mine. Thanks!
September 22, 2009 at 3:35 pm #79457In reply to: hooking a function makes mysql query to return empty
Adam Harley (Kawauso)
MemberWhen I tried this (not using a manual call), it seemed that $limit was being passed something, but it wasn’t numeric. So I added in before the
globalline:if (!is_numeric($limit))$limit = 5;I also changed $query_recent_replies to:
$query_recent_replies = "SELECT * FROM $bbdb->topics JOIN $bbdb->posts ON $bbdb->topics.topic_id = $bbdb->posts.topic_id $where ORDER BY post_time DESC LIMIT $limit";and first echo inside the foreach to:
echo "n<li>". bb_get_profile_link( array( 'id' => $recent_reply->poster_id, 'text' => get_user_display_name( $recent_reply->poster_id ) ) ) . ' on <a href="' . get_topic_link($recent_reply->topic_id);but that’s more just my idea of cleaner code
September 22, 2009 at 2:08 pm #79599In reply to: Pagination
Ben L.
Member.page-numbers.current– Don’t use a space, it’s not a descendant.September 22, 2009 at 1:13 pm #79598In reply to: Pagination
Ashish Kumar (Ashfame)
Participantspan .page-numbers .currentshould workSeptember 22, 2009 at 12:50 pm #79597In reply to: Pagination
Billy Wilcosky
ParticipantThat didn’t work for me. I event added !important to it and emptied my cache.
That’s actually one of the things I tried last night. Anyone have any other ideas to make the following bold?
<span class=”page-numbers current”>1</span>
If it helps, .page-numbers {font-weight:bold;}, works! But, it changes all the pagination links bold and not just the current page. So, you would think the .page-numbers .current code would work but it doesn’t. I also tried .page-numbers #current and .page-numbers current
September 22, 2009 at 12:30 pm #79563In reply to: First Poster
Process of Illumination
ParticipantOMG thank you so much Ashfame!
Will try your code right now and will let you know if i encounter problems.
Thanks thanks thanks!
the Process.
September 22, 2009 at 9:48 am #79481kirpiit
MemberOk, this one works smooth!

Thanks again.
-
AuthorSearch Results