Search Results for 'code'
-
AuthorSearch Results
-
May 8, 2007 at 7:53 pm #57034
In reply to: How to refer to the current topic?
fredvee
MemberAlright! Somehow I had to do like this to get to it:
global $topic_id;
$topic = get_topic($topic_id);
$topic_poster_id = $topic->topic_poster;
May 8, 2007 at 4:33 pm #57033In reply to: How to refer to the current topic?
fel64
MemberWhat do you mean, no go?
This code should do it! At a wild guess, remember that globals have to be declared as globals again in each function.
global $topic;
$topic_poster_id = $topic->topic_poster;It may also be helpful to know that the attributes or whatever they are (things after the ->) correspond to the columns of data in the table.
May 8, 2007 at 4:27 pm #57231In reply to: Hack: bb replies as wp comments; using bb API?
fel64
MemberYou do need to use that table, but if you installed WP yourself it should also be created when you activate the plugin. Maybe de-activate and re-activate.
However I’m working on a plugin that will do the entire thing (complete integration hopefully) based on a different, IMO much neater system. I don’t want to promise anything before it’s done, but if this plugin doesn’t work for you there’ll be a simpler alternative soon.
May 8, 2007 at 8:28 am #57511In reply to: Announce new topics via Twitter
bruz
MemberHu
I’ve been searching this forum before posting, so I thought I had really missed something in first place
Yea, the plugin is for WordPress, I think I will try if I can make it work for bbPress…
May 8, 2007 at 5:00 am #57230In reply to: Hack: bb replies as wp comments; using bb API?
lira
MemberErm… hey guys, could you tell me what I’ve done wrong?
I’ve just installed “bbPress Post”, and WordPress is telling me there’s no table called “wp_bbpress_post_options” (which is true). I reckon I should solve this problem before hacking wp’s comments.php template… but how?
ps.: Oh, and you guys are doing a great job here, congratulations
May 8, 2007 at 4:04 am #57503In reply to: My dream theme.
Nola1974
Participantbah with your PCBoard..
wwiv sysop here for 7 years until 2000. been thinking about putting up another.
a theme like this would be so freakin’ cool.
if someone can get the commands working, I’d be happy to theme it to look like whatever board package. I’m better with html than i am with php.
May 7, 2007 at 5:32 pm #57064In reply to: Plugin: bbPortal 1.2
Null
MemberYEah some dude fixed it, but never mailed me the solution
May 7, 2007 at 2:42 pm #53433In reply to: Rss feed for latest topics
fel64
MemberI did
Should every affected topic be tagged modlook or is it better to tag just one?
May 7, 2007 at 1:36 pm #1829Topic: My dream theme.
in forum InstallationNola1974
ParticipantAnyone see the CLI theme for WordPress?
testing here: http://fearandloathingbbs.com/wordpress/
My dream would be a theme like this for bbpress that would turn it into an old school BBS a la WWIV, VBBS or teleguard. I’ve been trying, but I suck.
No really. how cool could that be?
May 7, 2007 at 12:09 pm #57194In reply to: Show exact date of post? (not freshness)
fel64
MemberOkay, I promise in future I’ll be all mature and responsible and test these things first. Sorry for the inconvenience. This works on my forum now; just copy and paste this into a new plugin file. Then put
<?php aposttime(); ?>
for default time output, or<?php aposttime( 'DATE FORMAT' ); ?>
for your own time formatting.<?php
/*
Plugin Name: Accurate Post Time
Plugin URI:
Description: Outputs an accurate post time in, optionally, your choice of formatting. Use <?php aposttime( 'DATE FORMAT' ); ?> in your template, <a href="http://uk3.php.net/date">date formatted according to PHP standards.</a>
Author: fel64
Version: Phi
Author URI: http://www.loinhead.net/
*/
function aposttime ( $dtformat = "jS F 'y" ) {
global $bb_post;
$aposttime = date( $dtformat, strtotime( $bb_post->post_time ) );
echo $aposttime;
}
?>May 7, 2007 at 11:58 am #57356In reply to: Plugin: Move It
gh3
Memberi have just released the 0.12 version.
in this new version i added the merge topic feature
you can download it on bbpress svn or my site.
hope it could be useful
ps. sooner i’m planning to add split topic feature, but ‘ll have to work on it…
May 7, 2007 at 6:41 am #1832Topic: Announce new topics via Twitter
in forum Pluginsbruz
MemberHi there,
nowadays everybody is using twitter for everything – so why don’t use it for something useful?
I think it would be nice to announce a new topic to a specific twitter-account so that people will know when to visit the forums.
May 6, 2007 at 11:21 pm #51236In reply to: Anonymous post
gh3
Memberi had a look at code trying to do something in this way, but i wasn’t able to find the right function to hook… i can find the pre_post_form and post_form, this one allows me to work only after the post form so i think that in this very moment there is no way to do it, or better there is no way using a plugin…
May 6, 2007 at 11:21 pm #57507In reply to: Theme problem with new topic page from front page
fel64
MemberI really do
This Patrick Ehrlund? He’s great – even if he does have a flash website
I’d argue that the coolness of appearance is worth it, since the login form’s not exactly rocket science. I think it’s still pretty distinguishable anyway. Mockups:
http://img513.imageshack.us/img513/5090/ochreblackuf9.jpg
http://img338.imageshack.us/img338/5758/ochrewhiteyh4.jpg
That’s just suggestions if you’re interested, no need to give it further thought
Test account to see the problem with the HTML, didn’t realise Chris had already fixed it. My bad.
May 6, 2007 at 10:56 pm #57506In reply to: Theme problem with new topic page from front page
csl749
MemberAha – thanks very much chrishajer! I’ve just noticed that there’s a surplus /div in footer.php. I’ve removed it and all is now well, as far as I can tell. Though it’s strange how it only affected that one page (?!). Thanks for pointing me in the right direction.
Thanks fel64 – glad you like the design of the site!
The header pic was designed by a friend of mine, Patrick Ehrlund. I’m torn about the login background – it does look much better without the white background, but also more difficult to read. I might play with some font colours to get something that displays nicely over the header pic colours.
A test account? What do you mean? I’ll help if I can.
May 6, 2007 at 10:44 pm #57403csl749
MemberHmm. I tried the path (it’s thrown up in the error anyway so I assume it’s the correct path!) but it’s still not working, providing me with an error.
Everything works anyway, as I built the forum theme up around the main site, but it’d be nice to know that I could call BB and WP functions if I wanted, without worrying. Oh well…
Thanks very much for the kind help though Fel64!
May 6, 2007 at 3:43 pm #51234In reply to: Anonymous post
Duchemin
MemberUsers on my forum posted 1 or 5 messages, they don’t need registration. But in bbpress database there is no field of Name (post linked with user by poster_id).
How to make ‘Anonymous post’?
May 6, 2007 at 3:35 pm #57505In reply to: Theme problem with new topic page from front page
fel64
MemberIt’s a really nice site and I love the header. The login form would fit in more if you remove the
background: #FFFFFF
property in the CSS.Could you make a test account please, so we can see the HTML?
May 6, 2007 at 12:31 pm #57394In reply to: Trying to integrate bbpress with my wordpress
fel64
MemberYes. Put the
Secondary
inMain
, get rid of its margin, add the CSSfloat
property to bothSecondary
andDiscussion
– onefloat: right
, onefloat: left
. That will make it work.May 6, 2007 at 12:29 pm #57192In reply to: Show exact date of post? (not freshness)
fel64
MemberI see. Sorry, I thought that was just an example for the format.
How’s this instead?
<?php global $post;
$lalaposttime = date( 'D M Y', strtotime( $post->post_time ) );
echo $lalaposttime; ?>May 5, 2007 at 7:21 pm #57494In reply to: Code for different size tags
fel64
Member<?php tag_heat_map(); ?>
will do that.May 5, 2007 at 6:55 pm #1827Topic: Code for different size tags
in forum Installationabc12345
MemberWhat is the code used to make the list of tags with their fonts different sizes?
May 5, 2007 at 12:21 pm #57190In reply to: Show exact date of post? (not freshness)
fel64
MemberWhat does it show? Something completely crazy or something slightly wrong?
You can set your timezone in
config.php
, just change$bb->gmt_offset
to whatever you want.May 5, 2007 at 12:17 pm #55855fel64
MemberAck, I’m sorry but the stupid easy mistake is mine. This will only work for blog posts which have a corresponding topic in bbPress, so for any blog posts you made before installing the bbPress Post plugin it won’t work. Should’ve thought about that before copying you the code.
function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
if( $tid ) {
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
} else {
comments_number('No Comments','1 comment','% comments');
}
}Replace the old
forumreplylink()
with this and it will either show the reply link or a link to the comments. If you only want it to show the reply link but no link to comments, just take that comments line out.May 5, 2007 at 12:32 am #55854Griffology
MemberOK here’s my file
<?php
/*
Plugin Name: HFFIB
Plugin URI:
Description: Helper function for integrating bbPress into your theme.
Version: 0
Author: fel64
Author URI: http://www.loinhead.net/
*/
function felblogtotopicid( $felpostID ) {
global $table_prefix, $wpdb;
$posts_table = $table_prefix . "bbpress_post_posts";
$topic_id = $wpdb->get_var("SELECT topic_id FROM '$posts_table' WHERE 'post_id' = $felpostID LIMIT 1;");
return $topic_id;
}
function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
if( $post ) {
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
} else {
echo 'ouch!';
}
}
?>I am running a custom theme, but it’s called in the spot as the original wordpress comments were and those worked fine. Here’s how I’m calling the function:
<div class="details">
<a>"><?php comments_number('No Comments','1 comment','% comments'); ?></a>
<span class="tool">Category: <?php the_category(', '); ?></span>
<span class="tool"><?php akst_share_link(); ?></span>
<span class="tool"><?php forumreplylink(); ?></span>
</div>Still getting the error, and no ‘ouch’ anywhere… I do have bbpress_post plugin running, is it supposed to or does this replace it? I’m thinking it has to be running, I’m just trying to elimate a stupid easy mistake I’ve made.
-
AuthorSearch Results