Search Results for 'code'
-
AuthorSearch Results
-
October 19, 2007 at 1:30 am #60750
In reply to: Shares Roles with WordPress [Role Manager]
Lars-Christian
MemberI’ve looked through the (two) plugins that allows us to restrict forums, and sadly, it seems your guesses are correct. The first one which allows you to allow users in to a forum based on member names is hardly compatible with the latest version of bbPress (and seems dead). I almost got it working right, except for the fact that it messed up my forum hierarchy, and some other bugs, which meant that threads couldn’t be posted to a certain forum without being in that forum, which was enough for me to rule it out.
The other option, private forum as you tried out yourself, doesn’t allow us to do anything but restrict it to either members, mods or admins, which is the most viable solution to me at this point. It does mean however that I will need to give all my members who need access to the restricted forum moderator capabilities. Hardly ideal, but I’ll have to go with it for now.
I’ll be looking at it this weekend though, and hopefully I can find a sort of solution to it. Right now I’m thinking of finding a way to strip moderators of actual moderating powers, but I really don’t know. Adding another usergroup (pretty simple) should work too, but it has to be reflected in the plugin as well, but I don’t have the coding skills (I don’t have any coding skills) to do that.
Hopefully a gifted plugin developer will step in and solve this for us
October 18, 2007 at 11:47 pm #61119In reply to: Key Master Doesn’t Have Permission to Add Forum
Lars-Christian
MemberWell, this is just plain weird. Still haven’t been able to fix it for my original WP admin account (the dummy one holds up however), but I experienced something even weirder today.
Was logged in, adding some tags to a thread, and whoops, after being able to add one just fine, it gave me the “No permission” message when I tried to add a second.
Go figure.
Hope someone is able to work out a fix for this. Haven’t added any code to the config.php file.
October 18, 2007 at 10:00 pm #61166In reply to: Fatal Error Prior to Installation
iamfyrestorm
MemberWell, I don’t know, but since there’s a deregister view following the register view function maybe it’s not necessary.
function bb_register_view( $view, $title, $query_args = '' ) {
global $bb_views;
$view = bb_slug_sanitize( $view );
$title = wp_specialchars( $title );
if ( !$view || !$title )
return false;
$query_args = wp_parse_args( $query_args );
if ( !$sticky_set = isset($query_args['sticky']) )
$query_args['sticky'] = 'no';
$bb_views[$view]['title'] = $title;
$bb_views[$view]['query'] = $query_args;
$bb_views[$view]['sticky'] = !$sticky_set; // No sticky set => split into stickies and not
return $bb_views[$view];
}
function bb_deregister_view( $view ) {
global $bb_views;
$view = bb_slug_sanitize( $view );
if ( !isset($bb_views[$view]) )
return false;
unset($GLOBALS['bb_views'][$view]);
return true;
}I’m in trouble if I ever need to create my own views or if the views that are being created in the default-filters.php page are ever used. But until I get a response from someone that knows what’s going on, I’m running bbPress without it register views.
October 18, 2007 at 9:54 pm #61156In reply to: Internal Server Error
livibetter
MemberThat’s weird…
Did you modify the code by your hands?
[17-Oct-2007 20:53:46] PHP Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user ‘unrprus1’@’localhost’ (using password: NO) in /home/unrprus1/public_html/wp02/forums/bb-includes/db-mysqli.php on line 80
According your log, that’s
mysql_get_server_infonotmysqli_get_server_info.The patch changed the function from
mysql_get_server_infotomysqli_get_server_info(there is an additional letter i). Could you read thedb-mysqli.phpagain?I have this error before on my hosting server, once I modified that code. It totally fixed I only modified line 80.
October 18, 2007 at 9:40 pm #61154In reply to: Internal Server Error
livibetter
MemberHave you tried this this
to modify line 80 in
db-mysqli.php?October 18, 2007 at 9:04 pm #53043In reply to: Change the default ‘Member’ role title?
livibetter
MemberI made another approach to fit this need and used it on my forum.
function ChangeRoleDisplayName() {
global $bb_roles;
$bb_roles->role_names['keymaster'] = "Toilet Cleaner";
[...]
}
add_action('bb_got_roles', 'ChangeRoleDisplayName', 10, 0);
?>The complete code is in role-display-name.php.
October 18, 2007 at 8:58 pm #61138In reply to: Showing HTML tags on post
andrew79
MemberI do have allow image plugin . That was the thing that wasn’t allowing me to post
<img>tags. I’ve installed the plugin that you have pointed me to . The comment-quick-tags but it returns a script error for me on my firebug (firefox addon) making me think it’s not loading properly.October 18, 2007 at 8:37 pm #61137In reply to: Showing HTML tags on post
chrishajer
ParticipantDo you have the allow-images plugin? Just curious.
I think it’s related to this (still unresolved):
https://bbpress.org/forums/topic/cant-put-code-between-backticks-after-upgrade?replies=4#post-8736
October 18, 2007 at 6:48 pm #61118In reply to: Key Master Doesn’t Have Permission to Add Forum
SimOnline
MemberI have this problem as well, but haven’t added the code mentioned above to my config file. I’ve added another user as a key master, and that one can add forums, but I’d really want the original admin to be able to do that. Any suggestions?
vitovarducci
MemberI’m not sure what I’m doing wrong.
I filled out all of the proper synchronization options and everything registered correctly.
But when I go to migrate from bbpress post, I receive this error:
WordPress database error: [Table 'db218346346.wp_bbpress_post_posts' doesn't exist]
SELECT * FROM wp_bbpress_post_posts
WordPress database error: [Table 'db218346346.wp_bbpress_post_posts' doesn't exist]
SELECT * FROM wp_bbpress_post_postsHow do I fix this?
Thank you for your help!
October 18, 2007 at 4:39 pm #61134In reply to: Showing HTML tags on post
andrew79
MemberYeah,
Here’s my forum
http://smi.robertdesilva.com/forum
Yupe I’m using the backticks …. `
This is what I’m trying to do
<img src="http://somewebsite.com/someimagefile.jpg" />Thanks,
Andrew
fel64
MemberNice one jaz. I’ll try it (note that I never had this problem) and add it tonight I hope. Has anyone else had this problem, can they try it?
Hehe, slex, at least it’s alright now. Do you actually know what caused your loss of privileges? It may be important.
Re. database redundancy, I’d say no. It’s a one-time database hit and I feel somewhat better letting the comments actually sit in the database, so that once someone’s had enough of bb or bbsync they still have _something_. But if you can code a neat implementation, I’ll gladly branch the code.
October 18, 2007 at 3:35 pm #61162In reply to: Fatal Error Prior to Installation
iamfyrestorm
MemberI’ve done a little more troubleshoot, although it’s gotten me nowhere, but I’ll post it here in the event that someone may be able to help me:
Line 81 in the bb-includes/default-filters.php file is:
bb_register_view('no-replies', __('Topics with no replies'), array('post_count'=>1));I did a search in the files and “bb_register_view” pops up in 3 files:
default-filters.php
functions.php
template-functions.php
jazbek
MemberYou didn’t scare me, but you made me laugh..
October 18, 2007 at 4:37 am #2516Topic: Fatal Error Prior to Installation
in forum Installationiamfyrestorm
MemberI’m doing a fresh install of bbpress. I’m not linking it to wp.
I’m getting this error:
Fatal error: Call to undefined function: __() in /home/2816/domains/ridetoremedy.com/html/community/bb-includes/default-filters.php on line 81
My config file is correct. It’s linking to the same db as wp (simply because there’s no reason to use a different db if I can just prefix the tables differents, i.e. bb)
Any help would be appreciated. I don’t want to have to go to a different forum system, but I really thought this would be easier than it’s turning out to be.
Thanks
slexaxton
MemberEDIT:THIS IS NOT A VALID POST IT WAS USER ERROR (aka im dumb)
I may have spoke too soon. I dont know what caused it, but i lost all keymaster functionality. Nothing gets added to the database, but it doesnt recognize me as an admin. I even reverted back to old code, and keymaster has no “keymaster” capabilities, even though the database clearly shows the entry that says it does.
I’ll let you guys know if I find out the problem.
jazbek
MemberYeah, I think that did it. I just tested a post as a regular user and it worked without any errors. I am short on time right now so if anyone else has a chance to try it out, that’d be cool. Here’s all I did (all in felsyncpost()):
1) added
$bb_current_userto the globals2) commented out line 36
3) added
$bb_current_user = $current_user;in its place.Try it out.
October 18, 2007 at 12:59 am #61131In reply to: Showing HTML tags on post
chrishajer
ParticipantCan you wrap it in a backtick, which on a US keyboard is on the upper left, on the same key as a tilde, next to the number 1?
Like this:
<img ...(that img tag is wrapped in backticks to make it appear)
fel64
MemberJazbek, you may well be right. I believe my original reason for that code was that I ran into problems with bb not properly initialising the user and that $bb_current_user would not be set (hence, no posting either). However, if that fix works then I may well have made a mistake then (or in remembering). Would be lovely.
livibetter
MemberHi there,
After I saw a British tv show “IT Crowd”, I decided to create a forum for all IT workers over the world. You are welcome to join even you are not a IT person like me.
The name of this forum is “forgetIT“. Yes, forget IT, you read it correctly.
Huh? I said forget IT.

If you have any suggestions or ideas for this forum, please let me know. I am learning.
jazbek
Memberslex, i just noticed that the code in my reply was screwed up and fixed it just now. i put a link to trac for the line where the user is being set, might want to re-read.
jazbek
MemberActually, I figured out when in the felfunctions the “member” capability was being set (you may already know this) – line 36
I thought that maybe the globals should be changed to
global $bb_current_user;instead of
global $current_user;That seemed to work when I was posting in wordpress as an admin, but I just tried posting with another user account and got an SQL error, so no dice. I have some other stuff to work on right now, but will come back to this later. Maybe the global $bb_current_user needs to be set to the $current_user instead of doing
bb_set_current_user( $current_user->ID );?
October 17, 2007 at 7:20 pm #61130In reply to: WPMU + 404 error
jazbek
Membermy rewrite rules for the document root where wordpressmu is installed are (note, my bbpress is installed in the /discuss directory):
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_URI} ^/discuss(.*)$
RewriteRule . – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
then, in my bbpress directory, i put in my .htaccess:
Options +MultiViews
if the +MultiViews thing doesn’t work for you, there’s something else you can put in there (only needed if you want to use the pretty-permalinks). Described here:
slexaxton
MemberThe fix that I made to that function has been tested now and it seems to work, but the fact of the matter is that it could have very well just broke that function all together. I think everything works to my satisfaction now though, so I probably wont worry about it until I run into some more problems. The only thing that gives me hope in that respect is that previously, that
if statementwas failing. meaning that the user was not a bb_user:if ( !( is_object($user) && is_a($user, 'BB_User') ) )so it would create new capabilities for the user (incorrectly at that). But when I changed it to wp_User, for some reason that
if statementcatches and just returns without creating the new capabilities that break access permissions. I don’t know why this works after looking into the code, but until I see negative side effects, I might turn a shy eye (<— i dont think thats a real saying…).Also, on the topic of redundant database entries, I think since we have the integration set up from the WP comment box, it wouldnt be incredibly difficult to simply take out the one database call (somewhere in the wordpress code never-never-land) that actually posts the comment to the database. So we’re not inputting a box from bbpress, but we would effectively stop wordpress comments from being saved to the database since we never actually look at them. This of course wouldn’t work if you were merely copying database entries in order to post the comments as posts in bbPress, but I dont think thats what you’re doing. It probably is two separate database
INSERTcalls, and I bet we can take the wordpress one out, and have identical functionality (assuming we took out wordpress comments and exclusively use felbbreplies()). It’s merely an optimization though, and unless the user base is larger than any of us probably are going to have it might not matter… I’ll look into it tonight when I get home, and let you know.sorry for the long post
-Alex
October 17, 2007 at 12:35 pm #61117In reply to: Key Master Doesn’t Have Permission to Add Forum
richsad
MemberOK I fixed it. It looks like we took some bad advice. There was a post saying to make wpmu and bbpress get along I should add:
if ( isset( $bb->wp_table_prefix ) ){
$bb->usercookie = ‘wordpressuser’;
$bb->passcookie = ‘wordpresspass’;
}
to the config.php
That is the code that was messing things up. Without it admin works fine as keymaster and I see no other problems yet.
-
AuthorSearch Results