Search Results for 'code'
-
Search Results
-
DB Error in bb_insert_topic: Incorrect integer value: '' for column 'topic_id' at row 1
INSERT INTO bb_topics (
topic_id
,topic_title
,topic_slug
,topic_poster
,topic_poster_name
,topic_last_poster
,topic_last_poster_name
,topic_start_time
,topic_time
,topic_open
,forum_id
) VALUES (”,’Your first topic’,’your-first-topic’,’1′,’admin’,’1′,’admin’,’2008-12-16 05:10:50′,’2008-12-16 05:10:50′,’1′,’1′)This problem has been around since the previous 1.0 alpha releases. The installation would say that it was successful but it would not create a topic as that error in the last stage would indicate.
The first forum is created and it says there is 1 post but upon clicking said forum it presents you with a “New Topic in this Forum” form. When you post a new topic, it gives you an error: “This topic has been closed.”
Apache 2.2.10
MySQL 5.1.0
PHP 5.2.6
Windows Server 2003
Database Collation: utf8_general_ci
Curious to know if plans exist to ever use a templating engine like Smarty in order to separate logic for design.
So that no more code and HTML are in the same file
Topic: Sanitizing user names
Hi!
I have an old issue with bbpress-wppress integration that I can’t solve.
I use this wp-plugin to sanitize user names;
What this plugin does is that whenever a user registered as “Joe” tries to log in as “joe”, “jOe”… can login.
However bbpress is not compatible with this plugin, when activited bbpress reports this error;
Catchable fatal error: Object of class stdClass could not be converted to string in
wampwwwwordpresswp-includesformatting.php on line 453
In formatting.php line 453 obviously we have wordpress function sanitize_user and it seems bbpress doesn’t like to have this function modified.
I just wanted to ask if anybody knows another way to sanitize usernames because it is a pain to have all the time people complainig that they can log in because they registered as “Joe” and try to access with “joe”
On some forums you might want to remove bad html markup that’s not allowed instead of encoding it into text. Here’s a mini-plugin to do just that. It also converts
<b>
into<strong>
and<i>
into<em>
It only runs when posts are saved instead of each time they are displayed to keep things at full speed. Posts by Moderators and Administrators are not stripped.
(note: for now it doesn’t obey backticks and will strip inside them)
<?php
/*
Plugin Name: Strip Bad Markup
Plugin URI: http://bbpress.org/plugins/topic/
Description: removes tags that are not allowed in posts instead of encoding them
Author: _ck_
Author URI: http://bbShowcase.org
Version: 0.0.1
*/
add_filter('pre_post', 'strip_bad_markup',9);
function strip_bad_markup($text) {
if (!bb_current_user_can('moderate')) {
$tags=bb_allowed_tags(); $tags['br']=true; $tags['p']=true; $tags = implode('|',array_keys($tags));
$text=preg_replace(array("/<(/)?b>/si","/<(/)?i>/si"),array("<$1strong>","<$1em>"),$text);
$text=preg_replace("/</?(?!($tags)).*?>/sim","", $text);
}
return $text;
}
?>Howdy. I’ve got a buddypress, mu and bbpress site. buddypress is trying to access some forums in bbpress thru xmlrpc. Essentially sambauer’s bbpress_live widget is being used. My problem is that the connection between buddypress and bbpress is failing for some reason unknown to me.
Here’s the sequence of things going on.
buddypress wants to do some stuff in the bbpress forums so a bbpress_Live_Fetch obj is instantiated and the constructor is called. The constructor, since it’s purpose is to fetch something, tries to setup a connection between buddypress and bbpress through one of it’s member functions set_endpoint().
With me so far? We haven’t gotten to the problem yet.
set_endpoint() makes a call to a function in /wp-content/comment.php called discover_pingback_server_uri(). That function’s purpose is to do exotic stuff finding a ‘pingback server uri’ for the passed uri.
I don’t know what that is and don’t really care. I do care that the workhorse part of that function is actually a call to a new 2.7 function that goes out and GETs what is located at the url in question. When it GETs the goop back from that url, it parses it and returns a ping back server uri.
However, the function that it uses to GET goop from the passed url always returns 404 when looking for my bbpress url. It does exist.
The function wp_remote_get() when passed a valid url for bbpress such as ‘http://myfavsite.org/bbpress/’ returns 404.
Here’s the maddening part. It works on a windows development server but not on the live linux server. Same code, same .htaccess files, essentially the same httpd.conf file.
Why would wp_remote_get() return 404 for a valid url? wp_remote_get() and it’s brethren seem to be new in mu 2.7.
wpmu 2.7 r1574 is what I got runnin’
Okay, so here’s how the story goes…
I downloaded bbPress 1.0-alpha3 because I’m using WordPress 2.6.3…however I’m not sure if that even matters since I don’t really want to integrate the two.
I removed all the installation files from the bbpress folder, and placed them into my /forums directory. I did this because I wanted my forums to be in http://www.beardownarizona.com/forums, not beardownarizona.com/forums/bbpress.
Once all the files were installed via FTP into my /forums directory, I went to the site and proceeded with the installation. The first screen said “There doesn’t seem to be a bb-config.php file. This usually means that you want to install bbPress. ” so I continued and put in my database name, username, password, along with my host.
When I hit “save database configuration” I got a ridiculously long error message:
Warning: fopen(
Hosting3362703htmlforums/bb-config.php) [function.fopen]: failed to open stream: Permission denied in
Hosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1019
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fwrite(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1025
Warning: fclose(): supplied argument is not a valid stream resource inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1031
Warning: chmod() [function.chmod]: No such file or directory inHosting3362703htmlforumsbb-adminincludesclass.bb-install.php on line 1033
Warning: Cannot modify header information - headers already sent by (output started atHosting3362703htmlforumsbb-adminincludesclass.bb-install.php:1025) in
Hosting3362703htmlforumsbb-includesfunctions.bb-core.php on line 842
So instead of hassling with that, I created my own bb-config.php file, and uploaded it to the /forums directory. This allowed me to complete the entire installation. However it had one minor error, which said “Key master email not sent!” The installation log is below:
`Referrer is OK, beginning installation…
Step 1 – Creating database tables
>>> Modifying database: beardownforum (beardownforum.db.3362703.hostedresource.com)
>>>>>> Table: bb_forums
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_meta
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_posts
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_terms
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_term_relationships
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_term_taxonomy
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_topics
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_users
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: bb_usermeta
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
Step 2 – WordPress integration (optional)
>>> Integration not enabled
Step 3 – Site settings
>>> Site name: Bear Down Arizona Forums
>>> Site address (URL): http://www.beardownarizona.com/forums/
>>> From email address: brad@beardownarizona.com
>>> Key master created
>>>>>> Username: beardownarizona
>>>>>> Email address: brad@beardownarizona.com
>>>>>> Password: (password removed)
>>> Description: Just another bbPress community
>>> Forum name: Bear Down Forums
>>>>>> Topic: Your first topic
>>>>>>>>> Post: First Post! w00t.
>>> Key master email not sent!
There were some errors encountered during installation!’
Now when I go to my forums page at http://www.beardownarizona.com/forums, I get a “page not found” error. I’ve double checked my installation files, and they are all there, so I don’t think I’m missing any files…
I’m just at a complete loss for how to proceed. I just want to install the forums on the page, I’m not worried about integration or anything like that, since I don’t really have “users” on my main site. The forums are going to be used for that purpose.
If it makes a difference, I’m using godaddy as my host…If you have any ideas for how I can fix this, please let me know!!
Thanks!