Search Results for 'code'
-
AuthorSearch Results
-
April 26, 2007 at 7:49 pm #1785
Topic: Plugin: bb-Scripture-Links
in forum Pluginswittmania
MemberVersion 1.0
This plugin automatically turns scripture references into links that will take the visitor to BibleGateway.com, where they can view the verse(s). The administrator can set the default version to one of more than a dozen available versions, including ESV, NIV, KJV, NASB, The Message, and so on.
The links are created dynamically each time a topic is loaded, so the actual text of the post is left alone. This is nice because it allows you to disable/delete the plugin without having to go back through and edit your posts to remove the extra markup.
This plugin is ideal for forums that are religious/spiritual in nature, as it will save your users a lot of time from having to hard-code links to passages they reference in their posts.
This plugin is almost entirely based on a similar WordPress plugin that does the same thing to WP posts. You can view the WP plugin here:
http://dev.wp-plugins.org/wiki/Scripturizer
You can read more about the plugin, or download the latest version of bb-Scripture-Links, here:
http://blog.wittmania.com/bb-scripture-links
You can see a working demo here:
April 26, 2007 at 3:52 pm #56960In reply to: bbpress / wordpress avatar?
fel64
MemberWhy don’t you copy the code here or upload and link to it? If anyone’s interested they can modify it then.
April 26, 2007 at 3:29 pm #52911In reply to: MediaWiki, bbPress, and WordPress integration..
citizenkeith
ParticipantDid you put BOTH database tables and such in the SAME database? Like I said above here?
Yes, just like that, although I am not integrating my WP with bbPress.
As far as I know, you would only need to do what’s on this page right? Since we’re not talking about WP here at all?
That’s correct. That’s what I’ve been trying to figure out… I’m following those directions, but I still get these errors.
Sorry if I’m not much help..
Not a problem! I appreciate your efforts.
April 26, 2007 at 2:50 pm #57216In reply to: Anyone have Prev/Next Thread / Forum plugin?
Nola1974
ParticipantExcellent… Had a couple typos in there that I fixed, will post code when I’m done.
I’m actually trying to make a theme based on old dial-up BBSs. Fun, fun, fun.
The menu is the hardest part, trying to get different options to show up depending on what page you’re on (forum/topic/etc…)
Here’s what I have so far:
http://fearandloathingbbs.com/forum/
Not quite ready for prime time .
April 26, 2007 at 1:38 pm #55000In reply to: Soon to come, the WP Gathering theme for bbPress..
Null
Memberinternet frustration
April 26, 2007 at 7:35 am #54998In reply to: Soon to come, the WP Gathering theme for bbPress..
spencerp
MemberScrew it, Trent…can you delete this thread for me man? If you want copy of it Trent, and then release it … go ahead man. I’ll send ya a zip or tar to your email addy then.
spencerp
April 26, 2007 at 5:06 am #52910In reply to: MediaWiki, bbPress, and WordPress integration..
spencerp
MemberSorry, my mind is waaay off here. I just have so much crap going through it on a daily basis it’s not funny sigh. Sorry if I’m not much help..
spencerp
April 26, 2007 at 4:41 am #52909In reply to: MediaWiki, bbPress, and WordPress integration..
spencerp
MemberDid you put BOTH database tables and such in the SAME database? Like I said above here?
If you want, and IF I can find the stuff I had before.. I’ll post it back here. As for the stuff you’re talking about above there… couldn’t ya just change the references from WP database calls to bbPress calls?
As far as I know, you would only need to do what’s on this page right? Since we’re not talking about WP here at all?
https://codex.wordpress.org/User:RobLa/bbPress_Auth_for_MediaWiki
spencerp
April 25, 2007 at 9:20 pm #57226In reply to: Hack: bb replies as wp comments; using bb API?
fel64
MemberOh, bizarre. It must have edited it in somehow. Trent, could you take that out in case someone else comes along? My hour’s up.
Excellent!
April 25, 2007 at 9:10 pm #57225In reply to: Hack: bb replies as wp comments; using bb API?
smurfdude
MemberNevermind i figured it out. You put < code > tags on this line:
$topic_id = $wpdb->get_var(“SELECT topic_id FROM <code.>$posts_table</.code> WHERE <.code>post_id</.code> = $felpostID LIMIT 1;”);
Now it works great, big thanks!
April 25, 2007 at 9:02 pm #57224In reply to: Hack: bb replies as wp comments; using bb API?
smurfdude
MemberI get this error on my comments page
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘
wp_bbpress_post_posts
WHEREpost_id
=]SELECT topic_id FROM
wp_bbpress_post_posts
WHEREpost_id
= 32 LIMIT 1;April 25, 2007 at 8:24 pm #57221In reply to: Strange browser problem
chrishajer
ParticipantI have no idea honestly. I am using WP with permalinks and bbP without permalinks and it works fine all over the place (FF and IE, Linux and Windows.)
I did notice with weirdness in the forum source:
<script type="text/javascript" src="'. bb_get_option('uri') .'my-plugins/bb-emoticons.php?bb_grins_output=javascript"></script>
Looks like the bb_get_option wasn’t wrapped in php tags? Maybe there are more things like that?
April 25, 2007 at 7:51 pm #1794Topic: Hack: bb replies as wp comments; using bb API?
in forum PluginsApril 25, 2007 at 6:28 pm #55707In reply to: simple way to add TinyMCE to BBpress
kernow
Memberfel64 wrote: How did you make it work?
Its easy to install really. You have the main tinymce folder which I opened and uploaded the contents to the ‘my-plugins’ folder. This is the mistake I made.
- Just upload the jscript folder within the tinymce folder to my-plugins
- Edit header.php in your bbpress template, adding the reference to the javascript
This is part of the code which I copied, which you put before the </head> closing tag in header.php.
<script language=”javascript” type=”text/javascript” src=”http://example.com/bbpress/my-plugins/jscripts/tiny_mce/tiny_mce.js”></script>
Change to:
<script language=”javascript” type=”text/javascript” src=”my-plugins/jscripts/tiny_mce/tiny_mce.js”></script>
The FULL code you put in header php is the top of the page, but this bit is important.
April 25, 2007 at 4:10 pm #57215In reply to: Anyone have Prev/Next Thread / Forum plugin?
fel64
MemberAhh, that’ll teach me to remember the difference between get_bbpress_thing() and bbpress_thing(). >_< Sorry.
Replace the code in there now with this.
Set the last parameter to true if you want it to return an array of information. To use this you would use code like this:
<?php $mytopicnavarray = feltopicnav( '', '', ' ', true, true );
echo '<a href="' . $mytopicnavarray['next']['link'] . '">Click here to go to the next topic!</a>'; ?>Use
<?php felforumnav(); ?>
to get the forum navigation in a similar way to the topic navigation. It’s just a simple wrapper for what feltopicnav does, but it’s a bit easier to see what it’s supposed to do. Check the code for possible parameters.I won’t submit this as a proper plugin because the code is awkward. Maybe sometime I’ll recode it or someone else will.
<?php
/*
Plugin Name: Topic Navs;
Plugin URI:
Description: Put <?php feltopicnav(); ?> in a topic template to show links to the previous and next topics, and put in <?php felforumnav(); ?> to get basic next/previous forum navigation. More parameters such as $infoonly available.
Author: fel64
Version: 0.7
Author URI: http://www.loinhead.net/
*/
function feltopicnav( $nexttext = '', $prevtext = '', $betweentext = ' ', $lastpost = true, $infoonly = false, $forumnav = false; )
{
global $topic_id;
$nexttopic = $topic_id + 1;
$prevtopic = $topic_id - 1;
global $forum_id;
$nextforum = $forum_id + 1;
$prevforum = $forum_id - 1;
if( !$nexttext )
if( !$forumnav ) {
$nexttext = get_topic_title( $nexttopic );
} else {
$nexttext = get_forum_name( $nextforum );
}
if( !$prevtext )
if( !$forumnav ) {
$prevtext = get_topic_title( $prevtopic );
} else {
$prevtext = get_forum_name( $prevforum );
}
$prevtext = get_topic_title( $prevtopic );
if( $lastpost ) {
$nextlink = get_topic_last_post_link( $nexttopic );
$prevlink = get_topic_last_post_link( $prevtopic );
} else {
if( !$forumnav ) {
$nextlink = get_topic_link( $nexttopic );
$prevlink = get_topic_link( $prevtopic );
} else {
$nextlink = get_forum_link( $nextforum );
$prevlink = get_forum_link( $prevforum );
}
}
if( $infoonly ) {
$topicnavinfo['next']['title'] = $nexttext;
$topicnavinfo['next']['link'] = $nextlink;
$topicnavinfo['prev']['title'] = $prevtext;
$topicnavinfo['prev']['link'] = $prevlink;
return $topicnavinfo;
} else {
echo '<a href="' . $prevlink . '"> « ' . $prevtext . '</a>' . $betweentext . '<a href="' . $nextlink . '">' . $nexttext . ' » </a>';
}
}
function felforumnav( $nexttext = '', $prevtext = '', $betweentext = ' ', $infoonly = false )
{
$fni = feltopicnav( $nexttext, $prevtext, $betweentext, false, true, true );
if( $infoonly ) {
return $fni;
} else
echo '<a href="' . $fni['prev']['link'] . '"> « ' . $fni['prev']['title'] . '</a>' . $betweentext . '<a href="' . $fni['next']['link'] . '"> « ' . $fni['next']['title'] . '</a>';
}
}
?>April 25, 2007 at 4:00 pm #57186In reply to: Show exact date of post? (not freshness)
fel64
MemberPaste in
<?php global $post;
$lalaposttime = date( 'D M Y', strtotime( $post->post_id ) );
echo $lalaposttime; ?>anywhere you like outside other
<?php ... ?>
tags. So you could put it next to the code snippet you quoted. If you use Notepad 2 or something it makes it a lot easier by colour-coding these things.The fact that it’s spread out over several lines doesn’t make a difference when it’s inside the
<?php ... ?>
tags.April 25, 2007 at 12:27 pm #57213In reply to: Anyone have Prev/Next Thread / Forum plugin?
Nola1974
Participantyou rule.
how about prev / next forums?
I plan on doing something kinda neat with this. you’re definitely getting thanks.
April 25, 2007 at 8:38 am #57184In reply to: Show exact date of post? (not freshness)
fel64
MemberI suspect that this will work. Replace
get_post_time()
or whatever it is withglobal $post;
echo $post->post_time;(Remember to have the
<?php
…?>
tags around it!) If you want different formatting on that, I think that$post->post_time
is a bit too much detail so you could instead haveglobal $post;
$lalaposttime = date( 'D M Y', strtotime( $post->post_id ) );
echo $lalaposttime;You can change the way the date will appear by changing the first parameter (currently it’s ‘D M Y’) of the
date()
function. A list of how you can format dates is here.April 24, 2007 at 6:29 pm #56406In reply to: Freshness Linked
fel64
MemberThe topic closed thing comes from the pagecount being too high. I think
get_topic_last_post_link()
must be screwing up – did the latest reply thing stop working immediately after recount? Not sure what the solution is, sorry. Perhaps get the latest version, see if the problem persists?I just recounted on my forum (running 1.0-alpha), but it seems to still work.
April 24, 2007 at 6:18 pm #57212In reply to: Anyone have Prev/Next Thread / Forum plugin?
fel64
MemberThere is now!
Save this in a file, call it
sumting.php
, and drop it into yourmy-plugins
folder. Then put<?php feltopicnav(); ?>
somewhere in a topic template. Not tested, so please tell me if it works.<?php
/*
Plugin Name: Topic Navs;
Plugin URI:
Description: Put <?php feltopicnav(); ?> in a topic template to show links to the previous and next topics. Optional parameters are $nexttext, $prevtext, $betweentext and $lastpost.
Author: fel64
Version: 0.7
Author URI: http://www.loinhead.net/
*/
function feltopicnav( $nexttext = '', $prevtext = '', $betweentext = ' ', $lastpost = true )
{
global $topic_id;
$nexttopic = $topic_id + 1;
$prevtopic = $topic_id - 1;
if( !$nexttext )
$nexttext = topic_title( $nexttopic );
if( !$prevtext )
$prevtext = topic_title( $prevtopic );
if( $lastpost ) {
$nextlink = topic_last_post_link( $nexttopic );
$prevlink = topic_last_post_link( $prevtopic );
} else {
$nextlink = topic_link( $nexttopic );
$prevlink = topic_link( $prevtopic );
}
echo '<a href="' . $prevlink . '">' . $prevtext . '</a>' . $betweentext . '<a href="' . $nextlink . '">' . $nexttext . '</a>';
}
?>April 24, 2007 at 2:02 pm #54417In reply to: about WP-BB user role prob
Nicki Faulk
Member“What I ended up doing was removing the forum registration”
That’s exactly what I did for mine. Instead, I just pointed to the WP register link and that works out beautifully for me.
April 24, 2007 at 2:35 am #57143In reply to: Registration Email Not Being Sent – new issue
chrishajer
ParticipantRyan,
That is with the command line version? The -r just tells it to run the following code without the <?php ?> tags. Maybe they don’t have a command line version installed for your use.
Did you try the web php version?
–Chris
April 24, 2007 at 1:45 am #52908In reply to: MediaWiki, bbPress, and WordPress integration..
citizenkeith
Participantbump
April 23, 2007 at 10:53 pm #57142In reply to: Registration Email Not Being Sent – new issue
stuboo
MemberThanks for the message. I got this error
Error in Argument 1, char 2: option not found r
Thanks,
Ryan
April 23, 2007 at 5:12 pm #57136In reply to: My Forums: Temporada De Patos
benbeltran
Memberyeah
it should … li uses display:list-item and uses different properties … like line-height instead of height and it behaves differently in some contexts.
In some cases using the default display mode it would overlap with other items, but with display:block; it stretches properly
-
AuthorSearch Results
Wanting to integrate bb and wp more, I hacked up wp’s
comments.php
template to get replies in the forum to show up below posts in the wp section of the site too.This currently requires the bbPress Post plugin.
Fairly simple job: find the corresponding topic, get the replies, and output them. My solution should work for you, too, if you have bbPress post installed and activated as a wp plugin. Code’s below.
I want to make it possible to reply to the topic from the wp section of the site if you’re logged in. Obviously I could make queries to insert the post into the database, but I’d like to use the bb API so it can be validated correctly, hooks are called etc. Not sure how I would go about making it accessible. Currently calling any bb functions returns the “undefined function” error; how can I make them available for use?
Paste this in front of the rest of your wp
comments.php
template:and paste this at the very back:
<?php } //end else conditional for corresponding topic to blogpost ?>
Example here