Search Results for 'code'
-
AuthorSearch Results
-
October 28, 2006 at 2:48 pm #826
Topic: How to read bb_topicmeta?
in forum Requests & Feedbackear1greyMemberI’m writing a plugin and looking for a way to read the bb_topicmeta table without resorting to cranking out SQL. I can find the
bb_update_meta
method but no matchingbb_get_meta
.Is there an obvious other metadata retrieval method or is this one for trac?
AphelionZParticipantAdded this to the above function… still nothing
function outlet_encode_bad( $text ) {
$text = wp_specialchars($text);
$text = preg_replace('|<(/?strong)>|', '<$1>', $text);
$text = preg_replace('|<(/?em)>|', '<$1>', $text);
$text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?ol)>|', '<$1>', $text);
$text = preg_replace('|<(/?p)>|', '<$1>', $text);
$text = preg_replace('|<(/?img)>|', '<$1>', $text);
$text = preg_replace('|
|', '
', $text);$text = preg_replace('|<(/?ul)>|', '<$1>', $text);
$text = preg_replace('|<(/?li)>|', '<$1>', $text);
$text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?code)>|', '<$1>', $text);
$text = preg_replace(“|
(.*?)
|se”, “‘' . encodeit('$1') . '
‘”, $text);return $text;
}
add_filter( ‘encode_bad’, ‘outlet_encode_bad’, -1, 3);
There’s also the bb_autop function but that unfortunately is beyond me… I can barely understand regex as it is.
Anyone?
meeciteewurkorMemberwhat about the encode_bad function in the same formatting-functions.php file?
It has the same list of default allowed html tags. I don’t know enough php yet to understand what it does, though?
Maybe the img tag needs to be placed here as well?
function encode_bad( $text ) {
$text = wp_specialchars($text);
$text = preg_replace('|<(/?strong)>|', '<$1>', $text);
$text = preg_replace('|<(/?em)>|', '<$1>', $text);
$text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?ol)>|', '<$1>', $text);
$text = preg_replace('|<(/?p)>|', '<$1>', $text);
$text = preg_replace('|
|', '
', $text);$text = preg_replace('|<(/?ul)>|', '<$1>', $text);
$text = preg_replace('|<(/?li)>|', '<$1>', $text);
$text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?code)>|', '<$1>', $text);
$text = preg_replace(“|
(.*?)
|se”, “‘' . encodeit('$1') . '
‘”, $text);return $text;
October 28, 2006 at 2:20 pm #50500In reply to: post count – 1
Shawn MaddockParticipantWhoops, I should have specified that the code I posted replaced ear1grey’s. If you keep both then there are two filters being added to your “get_topic_posts”, which would cause the -1’s you’ve been seeing. Sorry ’bout that!
meeciteewurkorMembernevermind, that list is hard-coded into post-form.php. That would have to be changed, too, just to let people know the tag is allowable. If we can get it to work, of course.
devils_advocateMemberHOW do you make the plugins work?
the “display-name.php” file adds a header of broken links and mod info (which I don’t understand) to the beginning of every install page but otherwise appears to not do anything.
and the “bbpress-integration.php” plug-in for WordPress (I’m using 2) adds the same “Trac” information at the top of every loaded WP page…(!!!)
very frustrating…
help?
AphelionZParticipantI just tried plugin-izing that but it didn’t work either… what are we missing?
<?php
/*
Plugin Name: Allow <img> tags in posts
Plugin URI: https://bbpress.org/forums/topic/149
*/
function outlet_bb_allowed_tags() {
$tags = array(
'a' => array(
'href' => array(),
'title' => array(),
'rel' => array()),
'img' => array(
'src' => array(),
'alt' => array(),
'title' => array()),
'blockquote' => array('cite' => array()),
'br' => array(),
'code' => array(),
'em' => array(),
'strong' => array(),
'ul' => array(),
'ol' => array(),
'li' => array()
);
return apply_filters( 'bb_allowed_tags', $tags );
}
add_filter( 'bb_allowed_tags', 'outlet_bb_allowed_tags', -1, 3);
?>
meeciteewurkorMemberThis didn’t work:
'img' => array(
'src' => array(),
'alt' => array(),
'title' => array()),
added that to formatting-function.php in the bb_allowed_tags() function.
Seems like it would have, though?
October 28, 2006 at 12:47 pm #50705In reply to: freshness = -1 years
meeciteewurkorMemberOk, well that fixed the -1 year “freshness” problem. Now the post times are incorrect by 1hour.
I’m in -5 gmt timezone and my server is in -6gmt timezone.
One issue fixed and another created. I seem to remember having this problem with WordPress a loooooooong time ago. Like pre 1.0 ago. Can’t remember how that was dealt with.
Anyway, I’ll keep tinkering until I figure it out. Thanks for the help, AphelionZ.
October 28, 2006 at 6:49 am #50712In reply to: bbPress 0.73 released
AphelionZParticipantNow you guys just need to make a wiki, and a gallery!!!
October 28, 2006 at 5:52 am #50465In reply to: Hard to warm me up for bbpress
peiqinglongMemberIt was a bit fustrating in the beginning, but I’m finding it kind of fun. It’s a good back-to-basic-code refresher for me. Here is a little modding I’ve been doing: http://dev.abunchofcars.com/forum/ and I like its pretty easy to integrate into WP since its practically built off the same engine.
October 28, 2006 at 2:26 am #50718In reply to: using wordpress.com akismet spam key?
Nola1974ParticipantTook me a bit to figure this out… it’s not a true/false configuration.
replace
'$bb->akismet_key = true;'
with
'$bb->akismet_key = "123456789";'
(123456789 being your key)
October 28, 2006 at 2:23 am #50499In reply to: post count – 1
Nola1974ParticipantI couldn’t get rid of the -1’s, so I tinkered with it until it was working for me. This is working .73 as well.
<?php
function bb_decrement( $value ) {
return $value-1;
}
add_filter( 'get_topic_posts', 'bb_decrement', 1);
?>
<?php
function bb_decrement_topic( $value ) {
global $forum;
return $value;
}
function bb_decrement_forum( $value ) {
global $forum;
return $value-get_forum_topics();
}
add_filter( 'get_topic_posts', 'bb_decrement_topic', 1);
add_filter( 'get_forum_posts', 'bb_decrement_forum', 1);
?>
October 28, 2006 at 1:52 am #821Topic: using wordpress.com akismet spam key?
in forum TroubleshootingmeeciteewurkorMemberHowdy,
just tinkering around with bbpress.
In the config.php file it has this:
‘$bb->akismet_key = true;’
How do I enter my key into that? Let’s say my key is 12345678. How would the code look after inserting the key?
thanks.
oh, guess I could add that I get this in my dashboard everytime I try to put the key in:
The API key you have specified is invalid. Please double check the ‘$bb->akismet_key’ variable in your config.php file.
October 27, 2006 at 9:59 pm #817Topic: No style sheet
in forum Installationbat755MemberHi I’ve installed BBPress and I see no style sheet at all
My blog’s URL is http://phlog.it. BBpress is installed in a subdirectory called forum. I can’t see no style sheet. I’ve copied the stylesheet’s URL seen in the source code of the Forum’s homepage (http://phlog.it/forum/bb-templates/style.css) and it doesn’t work. How can I fix that?
October 27, 2006 at 8:51 pm #50675In reply to: User management, WP and BBP
Michael Adams (mdawaffe)MemberIf
bb_
really is your bbPress table prefix, and that is what is entered int the integration plugin page, users registering through bbPress should be given WordPress’ default role upon logging into WP for the first time.So I’m not sure what’s wrong exactly, but it may be caused by the stuff you’re doing manually (as you expect).
October 27, 2006 at 5:18 pm #50286In reply to: sports template
RedSkunkMemberAww
October 27, 2006 at 2:49 pm #50463In reply to: Hard to warm me up for bbpress
zimpetMemberHi ear1grey, jepp, you are right… Maybe I am too spoilt by all the coders work on wordpress. In fact, bbpress is a good point to start with, and the idea of having a forum and a blog coming right from “one-stop” is the right decision. So, don’t get me wrong! It is really a wish of mine to have it all “together” and tools get merged this way.
The only thing I want to highlight is, that – I’m not a coder from nature, but a tinckerer – it is not as easy as it sounds to set up the forum and integrate it into a running blog; first of all, if you are using wordpress for more than only as a “blogging-machine”. So, I will report
all bugs I find and – if it is possible for me, give advice how to fix it. In case I have the courage… as mentioned, I’m a tinckerer, not a coder.
October 27, 2006 at 2:37 pm #50085In reply to: Load Bbpress into WordPress
bonnywebMemberHi guys,
I’ve tryed to integrate bbpress in my wordpress blog, but I’ve some problems…I think in the configuration file.
I’ll post my config file for semplicity:
wp-config.php:
<?php
define(‘DB_NAME’, ‘blog_wp’);
define(‘DB_USER’, ‘root’);
define(‘DB_PASSWORD’, ‘root’);
define(‘DB_HOST’, ‘localhost’);
$table_prefix = ‘wp_’;
define (‘WPLANG’, ”);
define(‘ABSPATH’, dirname(__FILE__).’/’);
require_once(ABSPATH.’wp-settings.php’);
?>
bb-config.php:
<?php
define(‘BBDB_NAME’, ‘blog_wp’);
define(‘BBDB_USER’, ‘root’);
define(‘BBDB_PASSWORD’, ‘root’);
define(‘BBDB_HOST’, ‘localhost’);
$bb_table_prefix = ‘bb_’;
$bb->domain = ‘http://localhost/neoxyty’;
$bb->path = ‘/forum/’;
$bb->name = ‘Neoxyty forum’;
$bb->admin_email = ‘pippo@pluto.com’;
$bb->mod_rewrite = false;
$bb->page_topics = 30;
$bb->edit_lock = 60;
$bb->gmt_offset = 0;
$bb->akismet_key = false;
$bb->wp_table_prefix = false; // ‘wp_’;
$bb->wp_home = “http://localhost/neoxyty”;
$bb->wp_siteurl = “http://localhost/neoxyty”;
define(‘BBPATH’, dirname(__FILE__) . ‘/’ );
require_once( BBPATH . ‘bb-settings.php’ );
?>
The intallation of the wordpress is ok and it works, and also the installation of bbpress seams to be ok, but when I try to read a post or make some changes in the admin section it doesn’t work…
Some section are ok and other no…
Somebody can help me…please!
P.S. sorry if my english is not so good…
October 27, 2006 at 2:01 pm #50462In reply to: Hard to warm me up for bbpress
ear1greyMemberHi Zimpet, “alpha”, “beta”, “0.72”; it really doesn’t matter what the label says; any code is only as good as the number of man hours that have been spent writing it, and then refining it.
The ratio of hours spent on WP versus BB is currently* around 100,000:1, so a certain lack of polish is likely.
* educated guess
bbPress has reached the point of maturity where it can have more people developing it, using it, and commenting on it; so this is the point where it’s development can accelerate whilst it’s core capabilities mature into something stable, so if you think you’ve identified problems, then thats a good thing, so be happy.
The best thing that you (and any of us) can do is to isolate and describe each problem (and each suggestion) so it can be entered into trac, prioritized and fixed.
October 27, 2006 at 11:46 am #49910In reply to: changing user type
maxroeleveldMemberI ran into that exact same problem; no matter what you changed the user role into, he/she would always stay a member. bbPress would also NOT give me the “profile updated” message after submit.
My guess: since I was also using a localised version of WP (I had already tried to just include WP, not use the wp_ tables for user info), a lot of strings were translated, including the roles. It even changed the URL to the profile edit page to /profile/2/bewerken/ (bewerken == edit).
And sure enough, after complete removing the WP inclusion code, things worked again…
Maybe there’s some strings being gettext’d, that shouldn’t be?
October 27, 2006 at 11:29 am #766Topic: Hard to warm me up for bbpress
in forum Requests & FeedbackzimpetMemberHi! I am truly a fan of WordPress (I use it on several websites), but I am a little bit disappointed of bbpress. I know, that it is a beta, but there are plugins for wordpress available, making integration into wordpress much better. Easier integration concerning templates, user-management, navigation etc. In spite of being a beta, the code still is “grubby” – having templates in “my-templates” does not mean that all functions will work with them. Eg. “bb-login.php” still include “login.php” from “bb-templates”. So, it means wasting time by seacrhing and fixing these things… And truly: who did directly understand “how-to-integrate-bbpress-into-wp” ? Or otherway round?
And why do I always have “Ok. The document has moved here”? After login, logout – using IE. Using Firefox, nothing happens – no redirect, no link. I am enervated. Sorry. I have expected a bit more. Perhaps my fault…
October 27, 2006 at 9:45 am #50647In reply to: A bit further with the install
edwinkortMemberAnd now I’ve got the same error again
October 27, 2006 at 7:02 am #50520In reply to: next release ideas
gnawphMemberSome of these additions are either done with a simple plugin or template modifications…
Personally I’d like to see bbPress continue on with it’s development without spending resources to integrate the two programs together. Rather bbPress should stand alone as a forum system and not just a glorified WordPress plugin. It is my opinion that current forum systems offer way too many features and confuse themselves with content managment systems and social networking sites. Huge avatars and signatures take away from actual content and private message systems have been around for ages disguised as email.
The community around bbPress should develope plugins for all of these specific features. Remember that 90% of your users will just read and post on your forum and all those other goodies are just taking up resources that aren’t contributing to the overall “digital discussion” philosophy of a forum. Usenet is still pretty popular and that hasn’t changed much in years.
I’d like to see improvements on security, speed, and ease of use in the next releases rather than glittering goodies and features.
I am working on another ghetto plugin to highlight threads that have been started since your last visit. It’s been painful and frustrating to work on this since it’s been so long since I’ve worked with php but man is it fun. Another thing I’d like to see in the next release is a list or plan of what is going to happen next so I don’t waste time creating a plugin that is going to be in the next release.
Although it is fun.
P.S.
I’m biased on this issue as I’ve been in web stuffs for a number of years now so I can easily integrate a theme. It should be very simple as most of your design should be located inside your wp css file. The only thing you really have to change is some <div> placement. I threw away the default bbpress css theme and just flung bbPress into my WordPress site’s containers and it worked pretty well.
October 27, 2006 at 3:53 am #50570In reply to: Cannot login, Hide forum
zapataMemberI have the cpanel… is there anything I can do? Or should I just paste my .htaccess file here… Oh Gurus please help me … (I now could write a screenplay on my adventures in bbPress…)
-
AuthorSearch Results