Search Results for 'code'
-
AuthorSearch Results
-
June 14, 2007 at 12:04 pm #50270
In reply to: Users dont receive password after registration
Pravin Paratey
Participanthttp://pravin.insanitybegins.com/articles/running-bbpress-on-sourceforge/
Read this for a full resolution. It emails users their passwords too
June 13, 2007 at 11:58 pm #58345In reply to: Any idea to integrate wp and bb login forms?
ganzua
MemberWell, I have think in a more elegant solution, but this is for wordpress users that inserted bbpress in their wordpress interface. I have it half working though. First of all, my wp-login and wp-registering forms are integrated in my custom theme because I hacked wb-login.php.
Whenever you login in wordpress there is a function in the sidebar, that displays two links;
Site Admin -> link to wp profile.php
Logout
This links are defined in /wp-includes/general-template.php -> line 50
$link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;You can change /wp-admin/ for bbpress/profile.php
The first failure of this theory is that bbpress uses an id to show user profiles; bbpress/profile.php?id=1 and I have no idea how to add this id to the link plus I don’t know if bbpress user id are the same that in wordpress.
The second failure is that if you are the admin you should get the original link to /wp-admin/
this should be something like if user = admin then “link to /wp-admin/” else “link to /wp-admin/profile.php?id=n user”
but since I have no idea of how to code all this I can’t go further
June 13, 2007 at 10:37 pm #58344In reply to: Any idea to integrate wp and bb login forms?
ganzua
Member“You’re the admin, right? You could just bookmark the page.”
-> Well, this is an option that I have in mind, but then all users that registered through bbpress will appear with “undefined” role in wordpress. And I can’t insert bbpress <?php login_form(); ?> in wordpress sidebar because it doesn’t work

“Otherwise I suggest you write a plugin that uses the WP wp_login hook and changes the hopefully global $redirect_to depending on whether or not the user is admin. That’s for wp. bb default login behaviour is okay?”
-> Unfortunately, I have no idea of how to write a plugin or a simple function
I can badly modify already made code.
June 13, 2007 at 10:20 pm #55207In reply to: Adding a plugin admin page into the admin menu
fel64
MemberThis worked for me:
add_action('bb_admin_menu_generator', 'contestsmenue');
function contestsmenue () {
global $bb_submenu;
$bb_submenu['content.php'][] = array(__('Contests'), 'moderate', 'contestinnerface');
}June 13, 2007 at 10:18 pm #58343In reply to: Any idea to integrate wp and bb login forms?
fel64
MemberYou’re the admin, right? You could just bookmark the page.
Otherwise I suggest you write a plugin that uses the WP
wp_loginhook and changes the hopefully global$redirect_todepending on whether or not the user is admin. That’s for wp. bb default login behaviour is okay?June 13, 2007 at 10:10 pm #58342In reply to: Any idea to integrate wp and bb login forms?
ganzua
Member“I’m not sure what you’re trying to do. “
-> I’ll try to explain better
My web will be made with wordpress and bbpress. Only registered users can comment wp blog entries and post topics in the bbpress forum. Login tables are integrated and bbpress is inside the wordpress interface. When you go to bbpress you can see there the wordpress header, footer and sidebar.
So, right now users could log in through two gates; wordpress sidebar or through bbpress frontpage.
Well, I want to get rid of of these two gates and I want to avoid users can access wordpress dashboard and profile because the interface of these two pages is different. However, admin still needs access to wp control panel.
June 13, 2007 at 10:09 pm #55206In reply to: Adding a plugin admin page into the admin menu
thierryyyyyyy
Participantin the admin-functions.php, there is the function which creates the main menu (and also submenu) : bb_admin_menu_generator()
at the end of the function, you have a “hook” that you can use :
do_action(‘bb_admin_menu_generator’,”);
I tried this code :
add_action('bb_admin_menu_generator', 'bbai_add_options');
function bbai_add_options(){
$bb_menu[20] = array(__('Options'), 'use_keys', 'my_options_page.php');
}but didn’t worked
June 13, 2007 at 9:32 pm #58279In reply to: email registrations/password resets not sent
fel64
MemberNot really familiar with drupal or Cron. What you’ll need to do is start your function using a hook when someone registers, probably
register_user, add your information for the email to a new table, schedule the cron job (no idea about that at all), and send the email however it’s done. bbPulp will be helpful when writing the plugin. Sorry I can’t help you more than that.June 13, 2007 at 9:25 pm #55642In reply to: What’s integration?
fel64
MemberYou could probably get away with some clever table dropping and simoultaneous config.php adjustments, but your method is simpler. #4 is not a problem, in this case you just want to add this to the middle of your
config.php:bb->cookiepath = '/';June 13, 2007 at 9:22 pm #58368In reply to: How to integrate 2 installs with one registration
fel64
MemberI think if you define
USER_BBDB_NAMEand similar (prefixingUSER_before all the DB constants) you can get bb to get the user info from a different database.I don’t know if they use another install of bb here. They could just have made an extra forum, used a plugin to remove it from the normal topic and forum listing, and applied some special stuff (like the ratings plugin) just for that forum. And so could you. Don’t know if that approach is any better.
June 13, 2007 at 8:52 pm #50269In reply to: Users dont receive password after registration
maphew
MemberAs best as I can tell this does not work on 0.8.1. The code appears to have changed quite a bit between then and now. Thinking that the latest replies are not getting responses because the status on this thread is set to “resolved”, I created a new thread at https://bbpress.org/forums/topic/1256 however after 5 days there is still no response. It looks like sourceforge users are too small a minority.
June 13, 2007 at 8:22 pm #58316In reply to: Theme not working
simon551
Memberfel64,
you’re right. It contains some wacky slashes:
<link rel="stylesheet" href="http://somethingsomethingforum/bb-templates/kakumei/style.css" type="text/css" />any idea how to fix this?
June 13, 2007 at 6:46 pm #1952Topic: Any idea to integrate wp and bb login forms?
in forum Troubleshootingganzua
MemberAfter integrating wp and bb and having wordpress header, footer and sidebar for both, wp and bb, I have these wordpress functions in my sidebar;
<?php wp_register(”); ?>
<?php wp_loginout(); ?>
<?php wp_meta(); ?>
And in bb press frontpage I have this one;
<?php login_form(); ?>
First, I thought I could replace wp functions in the sidebar for bbpress’ <?php login_form(); ?> but this function it is not defined for wordpress and I have got an error.
Besides there are two other problems;
* if users register through bbpress, their roles are not defined in wordpress
* if I remove wordpress meta functions from the sidebar I lose the link to the admin control panel.
Well, another option would be using the wp functions for login;
<?php wp_register(”); ?>
<?php wp_loginout(); ?>
<?php wp_meta(); ?>
and then changing their beaviour so;
* whenever you login you are not taken to the control panel unless you are the admin
* whenever you are an user and you click in “site admin” link wich appears above the log-out link, you are taken to the bbpress profile.php
My questions are; first of all, do you find any sense in all of this or is it just crap?

does anybody know where is defined wordpress login meta links so I can change them?
and finally, does anybody have a better idea?
June 13, 2007 at 3:11 pm #58339In reply to: Limit tags on front page
fel64
MemberYup. Replace
<?php tag_heat_map(); ?>in your copy offront-page.phpwith:<?php tag_heat_map('limit=20'); ?>Replace 20 with whatever you want. The default is 45.
June 13, 2007 at 12:49 pm #58335In reply to: What do you do with long user names?
ganzua
Member“if you have any problems just ask.”
-> thanks fel64! . I’ll go step by step. I’m going to solve the login and profile issue first because I’m having an idea
.
June 13, 2007 at 11:12 am #58334In reply to: What do you do with long user names?
fel64
MemberAvatars is easy to integrate – takes just a few lines of code if you’re using Louisedade’s Upload Avatar plugin in bb. There’s a good post count plugin in the plugin section I think, if what you want is to get the post count from WP also then you just have to rewrite the query for $wpdb. You can get quicktags for wordpress, it comes up after a google. Emoticons: I believe that bb grins (not in plugin section, search the forums themselves) is a port of the WP version. So it’s all possible, and if you have any problems just ask.
June 12, 2007 at 11:11 pm #58333In reply to: What do you do with long user names?
ganzua
Member“ganzua, can you post a link to your forum so we can take a look at the html/css?”
-> I didn’t upload yet, sorry, as soon as I finish I’ll post a link so you can check everything.
I’m working in my computer yet.I integrated wp and bb, and I removed bbpress header, footer and stylesheet. Now I’m using wp header, footer, sidebar and stylesheet for both, wp and bb.
I still have to find out what to do with login and profile forms because I have two instances of each one, one for bbpress and one for wp.
Besides I have to find out how to integrate emoticons, toolbar in forms (I have quicktags in bb and tinymce in wordpress) , post count, avatars… In fact I do not even know if all this is possible.
“to get both IE6 and IE7 on the same Windows machine, check this out:
* http://tredosoft.com/Multiple_IE”
-> Thanks for the tip! I’m checking the link
June 12, 2007 at 10:27 pm #58330In reply to: What do you do with long user names?
ganzua
MemberI can’t fix the width of the front page row. Tried this;
<td class=”numaut”>
and then;
.numaut {width: 50px;
overflow:hidden;}
an it doesn’t hide the overflow
It just expands its column.Perhaps replacing that tables with css boxes?
June 12, 2007 at 10:21 pm #58329In reply to: What do you do with long user names?
fel64
MemberThat’s strange, I’ve personally found 7 to be pretty reasonable with CSS. Got a link so I can check it out?
I’ve fortunately got pretty different results on my website – only about 1/5 of users are IE6ers. Significant but luckily it doesn’t include me.
June 12, 2007 at 9:52 pm #58328In reply to: What do you do with long user names?
ganzua
MemberThanks bobbyh098 (we posted at once) and fel64;
width + overflow hidden made the trick
“1. That’s true. I’m personally ditching IE6s, they deserve what they get.”
I’m tired of IE6 too but unfortunatelly it seems it is the most used browser yet;
http://www.w3schools.com/browsers/browsers_stats.asp
I installed a portable version of IE7 too, just to check compability, and I think it ignores all your css typography O_O
June 12, 2007 at 9:22 pm #58327In reply to: What do you do with long user names?
fel64
Member1. That’s true. I’m personally ditching IE6s, they deserve what they get.
2. Sorry! Just add
overflow: hidden;like bobby suggested and they will simply be cut off – also like this forum’s template when a username is too long next to their post.June 12, 2007 at 8:43 pm #58326In reply to: What do you do with long user names?
ganzua
MemberHi fel64! Thanks for your answer
There are two problems with max-width (I just checked);
1 it doesn’t work in IE6

2 In FF and IE7 you can fix the css box but the long name gets out of the box, just like it happens with the template of this forum
I noticec this same issue sometime ago when posting in the wordpress forum.
June 12, 2007 at 8:25 pm #58325In reply to: What do you do with long user names?
bobbyh098
MemberAs fel64 notes, max-width works well in FF and IE7. However, since max-width may have problems in IE6, you may want to try this alternate CSS:
.authorlist {width: 75px;overflow: hidden;}June 12, 2007 at 8:11 pm #58324In reply to: What do you do with long user names?
fel64
MemberI don’t handle the first issue. What you could do is change the
<td class="num">to this:<td class="num authorlist">Then at the bottom of your theme’s
style.cssadd:.authorlist {
max-width: 75px;
}or similar. You can add a similar
max-widthrule to the style for.threadauthorto the same effect: in FF and IE7, they will not exceed the intended width.You don’t make stickes, you promote them: just above the “Move this topic” bit when you edit topics there are links to
Stick topic(to the forum only) and(to front)(so it’s at the top of the front-page list too).June 12, 2007 at 8:07 pm #58314In reply to: Theme not working
fel64
MemberAre you running it on Xampp or similar? The problem might also affect windows servers, can’t remember. Check any output page’s HTML, looking for a
<link media="screen" type="text/css" src="example.com/style.css" />, and copy thesrcvalue here. It’s likely malformed, containing backwards slashes which FF doesn’t like. -
AuthorSearch Results