Search Results for 'code'
-
AuthorSearch Results
-
May 13, 2008 at 5:30 pm #3315
Topic: Small bug in kakumei-blue theme
in forum ThemesNull
MemberWell the logo (page_header_bblogo.png) appears a bit darker then the background color of the header. You clearly see a grey square now. When overwriting the blue logo with the original green one, the same problem appears (thought perhaps the background color was made too dark).
Swithcing the theme back to the normal kakumei, the logo displays correct. Overwriting this with the blue logo gives no problems either.
So there is a bug in the blue kakumei theme, plz fix
May 13, 2008 at 3:45 pm #64721In reply to: bbPress 0.9.0.2 + WordPress 2.5.1 cookie conflict?
kineda
MemberI discovered for it to work that the secret keys cannot have spaces in them (as you could in version 2.5 of wordpress and 0.9.0.1 of bbpress). I generated a new secret key as one long string, and voila… users can pass through both programs without having to re-login.
May 13, 2008 at 3:13 pm #64959Georg Kevin Paquet
Member$bb->wp_table_prefix = 'wp__'; // your wordpress db prefix is
$bb->wp_home = 'http://yourwebsite.com/';
$bb->wp_siteurl = 'http://yourwebsite.com/';replace yourwebsite.com with the blog url.
if your blog url is for example
http://www.google.com then don’t forget to add the WWW to it, but if it doesn’t has WWW, the don’t use it.
May 13, 2008 at 3:08 pm #64925In reply to: Make BBPress a Page in WordPress???
gerikg
MemberOh forgot. In the header I put just
<li class="page_item"><a href="/forum/">Forum</a></li>after the page tag. It’s either going to be in front of all your pages or behind.
May 13, 2008 at 3:01 pm #64924In reply to: Make BBPress a Page in WordPress???
gerikg
MemberHow I did it… Please back up everything before starting.
You need to find a theme close to your WP to make it easier.
1. BBPress side,I renamed the style.css to styleold.css
2. Copied over the WPress style.css over to BBpress
3. Open both files at the same time. You want to copy over some of the codes from styleold.css to style.css. You might need to play with it. Do not copy “body”.
4. Open both header.php. On the BBpress header copy over from WP header everything after <body> tag. Replacing whatever is there.
5. Open both footer.php. This one is a little tricky.
You can just copy over the whole thing and make sure you have <?php do_action(‘bb_foot’, ”); ?> in the file. You will lose the designers info though OR You need to see on WP side if there is any closing tags. bring that over and delete any closing tags on the BBPress side.
6. Sidebars: depending where the <?php get_sidebar(); ?> tag. For example my <?php get_sidebar(); ?> tag is IN the footer.php Others the <?php get_sidebar(); ?> is in the other php files right before the get_footer tag or after get header tag.
that’s it.
make sure in your bb-config.php
there is
$bb->WP_BB = true;
if (file_exists(‘../wp-blog-header.php’))
require_once(‘../wp-blog-header.php’);
else
if (file_exists(‘../../wp-blog-header.php’))
require_once(‘../../wp-blog-header.php’);
after <?php tag.
Goodluck.
May 13, 2008 at 2:32 am #64720In reply to: bbPress 0.9.0.2 + WordPress 2.5.1 cookie conflict?
mrhoratio
MemberCan you post the lines you added to your wp-config.php and bb-config.php files?
The line defining the secret key in bb-config.php should look something like this:
define('BB_SECRET_KEY', 'My Secret Key');and in wp-config.php
define('SECRET_KEY', 'My Secret Key');Don’t forget the BB_ in fron of SECRET_KEY in the bb-config.php file.
May 12, 2008 at 10:53 pm #64875In reply to: tinyMCE losing <p> formatting on Edit
Sam Bauers
ParticipantbbPress turns < p > tags back into double line breaks and < code > back into backticks ( ` ).
You will need to somehow override this or force reconversion in TinyMCE or FCKeditor
May 12, 2008 at 10:52 pm #64942In reply to: Hide email addresses
leemon
MemberOops! You are right!
May 12, 2008 at 10:48 pm #64869In reply to: How to shorten a profile link?
mrhoratio
MemberBy the way, I made this hack cleaner by implementing it as a filter inside a plugin.
function my_get_user_profile_link_filter( $link , $user_id = 0 ) {
//check for rewrite
$rewrite = bb_get_option( 'mod_rewrite' );
if ( $rewrite ) {
//what kind of rewrite there is? slug use "forum_slug" column, else the column is "forum_id"
$column = ($rewrite === 'slugs')?('forum_slug')
'forum_id');
$link = str_replace('forums/profile/', 'people/', $link);
}
return $link; // Very important line!
}This was based on code suggested in another thread:
https://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done
May 12, 2008 at 10:40 pm #64856In reply to: Request: Plug-in Update
Sam Bauers
Participant@ _ck_
I’m not sure it works either…
May 12, 2008 at 10:37 pm #64957mrhoratio
MemberYou’re welcome. It’s included with 2.5.1, it’s just an optional entry, so I don’t think it would be in your default config file. But I think it is shown in the sample config file.
https://codex.wordpress.org/Editing_wp-config.php#Secret_Key_IMPORTANT
May 12, 2008 at 9:53 pm #64954mdata
MemberThe secret key is not mentioned period in the wp-config.php file, but is in the bb-config.php file. The WordPress secret is in the http://www.masterdata.com/forum//wp-admin/options.php file (yep, the double forward slash is accurate – cut & paste) and does match exactly (I used Excel to do the match).
If it is supposed to be in the wp-config.php file, please show me how the entire finished code should look (obviously my variables will differ but the structure will be the same). We might let the developer folks in on this too.
Awaiting your reply…. Thank you!
May 12, 2008 at 9:16 pm #64922In reply to: Make BBPress a Page in WordPress???
mrhoratio
MemberIPsource, to add a Forum button in the nav bar, you’ll need to edit your theme files in WordPress. And then do the same in the bbPress template files. Most likely, the files would be something called header.php. Every theme is different so it’ll depend on what you have. You might consider hiring a coder to do it, if you’re not comfortable with the html/php.
May 12, 2008 at 8:24 pm #52809In reply to: Plugin: Summon user
Null
MemberIs it possible to make it so that (when using the online plugin) you can summon a online person directly? So you summon a user who is online, he will recieve a pop-up (or something) . When he presses the link or button in the pop-up, he will go directly to the topic. Ofcourse the pop-up should heave 2 buttons. 1 to accept the summon and 1 to decline it. The summoner will recieve a pop-up when the summon is declined.
That would be so cool
May 12, 2008 at 3:18 pm #64941In reply to: Hide email addresses
djp
MemberHi Leemon
As far as I am aware, the email addresses of the people who register are not visible in their profiles by other registered users. It seems to be a default setting in bbpress.
The email addresses are only visible to the Keymaster & people who have been given Administrator access.
Hope this helps
May 12, 2008 at 12:10 pm #64810In reply to: Profile hook/filter
Bloggsbe
MemberYes, I know, but the one I used in bb-twitter is not so “bad”. I just hooked in to the show avatar function, and made sure that it only shows on the profile page, and no other pages. And that is just to show the latest tweet from that user.
The admin/profile part is using the right hooks so the user can control the twittername and chose to show or not to show the tweet!
I really hope there will be some hooks/filters for the profile page one day

—
Rune
May 12, 2008 at 6:58 am #57774In reply to: localizing plugins
A1ex
MemberAll calls of functions “__()” and “_e()” should be with textdomains.
For example
_e('Hello!', 'onlinelist');May 12, 2008 at 5:50 am #3362Topic: Make BBPress a Page in WordPress???
in forum Installationipsource
MemberSorry I’m new and I tried to look around for this topic but I guess I’m not wording it right in the search.
I want to make BBPress a page on my WordPress site. I’ve installed both and they are both sharing information just fine. I just want to integrate it visually into my site.
So is there anyway that when you click “forum” on my Navigation bar that the forum would just show up in the window below?
Again, I’m pretty new to this so when I have to go in and start messing with code I get lost easily. I really would appreciate any advice or help you can give. Thank you.
May 12, 2008 at 5:27 am #60387In reply to: nicer slug url rewrite plugin (done!)
mrhoratio
MemberI discovered another issue with this hack. If you write a new post in a new topic, after the submitting the form, you are redirected back to the forum’s front page, instead of the forum you were on. I spent some time digging around the get_post_link() related functions, and couldn’t figure out exactly what was going on. However, I was able to make this modification to the bb-post.php file to get it to redirect properly.
Paste this after line 43, in bb-post.php of bbPress 0.9.0.2
$link = str_replace('forums/', "forums/". $forum->$topic_slug, $link);May 12, 2008 at 5:21 am #64781In reply to: bb_query: get topics started within a date range?
mrhoratio
MemberHey Sam, thanks for making a ticket for this. I was able to query for topics within a date from directly from WordPress as well. Here’s something I wrote to merge “super sticky” bbPress topics into the WordPress loop. It’s a bit of hack, but it brings the “Promote to Front Page” functionality of Drupal into WordPress/bbPress:
<?php get_header(); ?>
<?php
//Put WordPress posts into an array
$wp_posts = $posts;
if (!is_single()){
//Retrieve first post of previous page (we need this post's date to query bbPress topics
$offset=$paged*$posts_per_page+$posts_per_page;
$first_post_of_previous_page = get_posts('numberposts=1&offset='.$offset);
//First set the start and end dates to limit the query to the bbPress table
$startdate=(date('YmdHis',strtotime($first_post_of_previous_page[0]->post_date_gmt)));
//If it's the most recent page, set end date to today
if ($paged){
$enddate=(date('YmdHis',strtotime($wp_posts[0]->post_date_gmt)));
} else {
$enddate=gmdate('YmdHis');
}
//Retrieve "Super Sticky" topics from bbPress tables
//This assumes your bbPress and WordPress tables are in the same database
$bb_topics = $wpdb->get_results("SELECT * FROM bb_topics WHERE topic_sticky = 2 AND topic_start_time BETWEEN $startdate AND $enddate ORDER BY topic_start_time DESC");
//Map bbPress topics to WordPress posts structure
foreach($bb_topics as $bb_topic){
$bb_first_post = $wpdb->get_results("SELECT post_text FROM bb_posts WHERE post_position = '1' AND topic_id = $bb_topic->topic_id", ARRAY_A);
$bb_post->ID = "forum_topic_".$bb_topic->topic_id;
$bb_post->post_author = $bb_topic->topic_poster;
$bb_post->post_date = $bb_topic->topic_start_time;
$bb_post->post_content = $bb_first_post[0][post_text];
$bb_post->post_title = $bb_topic->topic_title;
$bb_post->post_status = "publish";
$bb_post->comment_status = "open";
$bb_post->ping_status = $bb_topic->post_id;
$bb_post->post_name = "forums/topic/".$bb_topic->topic_slug;
$bb_post->post_type = "post";
$bb_post->comment_count = $bb_topic->topic_posts-1;
//add bbPress topic to WordPress posts array
$wp_posts[] = $bb_post;
};
//Create function to sort array of posts by date
function compare($x, $y){
if ( $x->post_date == $y->post_date )
return 0;
else if ( $x->post_date < $y->post_date )
return 1;
else
return -1;
}
//Sort array
usort($wp_posts,'compare');
}
?>
<div id="content-box" class="span-8">
<div id="content-area" class="clearfix">
<?php if ($wp_posts): ?>
<?php foreach ($wp_posts as $post): ?>
<?php setup_postdata($post); ?>
<div class="entry">
<div class="entry-header clearfix">
<div class="info span-2">
<a href="<?php the_permalink(); ?>#comments" class="comment-activity"><?php comments_number('<strong>Post comment</strong>', '<strong>1</strong> Comment', '<strong>%</strong> Comments' );?></a>
</div><!-- end info -->
<div class="content span-6 last">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div><!-- end content -->
</div><!-- end entry-header -->
<div class="entry-content clearfix">
<div class="info span-2 clearfix">
<p><strong><?php the_author() ?></strong><br />
<?php the_time('M j, Y'); ?>
</p>
<p class="share-this"><?php akst_share_link(); ?></p>
<p class="post-comment"><a href="<?php the_permalink(); ?>#respond">Comment</a></p>
</div><!-- end info -->
<div class="content span-6 last clearfix">
<?php the_content('Click to continue'); ?>
<p class="entry-tags"><?php the_tags('<strong>Posted in: </strong>', ', ', ''); ?> </p>
</div><!-- end content -->
</div><!-- end entry-content -->
</div><!-- end entry -->
<?php endforeach; ?>
<?php include (TEMPLATEPATH . '/navigation.php'); ?>
<?php else : ?>
<h2 class="page_header center">Not Found</h2>
<div class="entry">
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
</div>
<?php endif; ?>
</div><!-- end content-area-->
</div><!-- end content-box -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>May 12, 2008 at 3:36 am #64910In reply to: New bbPress BUGGY!!!
mdata
MemberLet me premise this by stating that I installed an “integrated” version of the upgrade (BTW, the instructions could be a LOT clearer on this process – not everyone is experienced with php).
I was planning on spending some time on this later, but on this subject (links), my original links were set to “Numeric …/forums/1”. After upgrading, links from my web sites to the bbPress section no longer worked and generated a 404 error. I looked at the links within the bbPress site and they looked fine. For instance, a “sticky” topic I link to from all my web sites is “http://www.masterdata.com/forum/bbpress/topic/62” (I copied the shortcut with a right click on the link). It looks correct, but it does not work. Not even within the bbPress section and certainly not from the outside coming in.
So I switched the setting on my “Pretty permalink type” to “None …/forums.php?id=1”. With this setting, everything once again worked. I left it this way, but these are definitely not “pretty” links. The link to the same topic is now “http://www.masterdata.com/forum/bbpress/topic.php?id=62”. BTW, “Name based …” links do not work either.
OK, that is the first issue. There are more and I will detail those tomorrow, each one in its own separate topic as suggested above.
Let me, however, compliment everyone who has been involved in this project and WordPress. Both efforts are truly beyond belief in terms of what you get by simply downloading some code from the internet. ABSOLUTELY EXCELLENT! So good, in fact, you spoil us to the point where we expect everything to be close to perfect at all times. That is a bit irrational and the experience with both programs should be graciously appreciated. Thank you for your work!
Best
L. Carhartt
May 12, 2008 at 2:14 am #64809In reply to: Profile hook/filter
Sam Bauers
ParticipantDirty hacks are prone to break from release to release…
May 12, 2008 at 2:00 am #64806Sam Bauers
ParticipantIt’s worth noting here that you can also override the database value in your bb-config.php file. Just in case anyone can’t directly access their database.
$bb->uri = 'http://example.com/bbpress/';May 12, 2008 at 1:31 am #64891In reply to: links longer than page width!
_ck_
ParticipantIt would be easier to disable the auto-link entirely for a post when is detected than to parse it out, if that will do. Somehow I missed the original question was scrolling on code, sorry about that but as you found it’s very simple CSS.
Disabling auto-link is something like: (untested)
remove_filter('post_text', 'make_clickable'); add_filter('post_text', 'make_clickable_if_not_code'); function make_clickable_if_not_code($text) { if (strpos($text,'<code>')===false) {return make_clickable($text);} return $text; }[code] is detected than to parse it out, if that will do. Somehow I missed the original question was scrolling on code, sorry about that but as you found it’s very simple CSS.
Disabling auto-link is something like: (untested)
remove_filter('post_text', 'make_clickable');
add_filter('post_text', 'make_clickable_if_not_code');
function make_clickable_if_not_code($text) {
if (strpos($text,'<code>')===false) {return make_clickable($text);}
return $text;
}May 12, 2008 at 1:20 am #64779In reply to: bb_query: get topics started within a date range?
Sam Bauers
ParticipantBB_Query can’t do this at the moment as far as I can tell. It probably should though.
I’ll make a trac ticket to suggest this.
At the moment you could do two BB_Queries and intersect their results. But that’s pretty poor.
Just be sure if you do use a direct query that you prepare it first. e.g.:
$startdate="20070602103049";
$enddate="20080212090232";
$query = $bbdb->prepare("SELECT * FROM %s WHERE topic_start_time BETWEEN %s AND %s ORDER BY topic_start_time DESC", $bbdb->topics, $startdate, $enddate);
$topics = $bbdb->get_results($query); -
AuthorSearch Results