Search Results for 'code'
-
AuthorSearch Results
-
June 17, 2007 at 2:01 pm #58418
In reply to: Editing hot tags so they point outside the bb
fel64
MemberNo. Just a mistake.
June 16, 2007 at 11:21 pm #58398In reply to: bbpress info in wordpress?
Kahil
MemberI’m confused… I activated that plugin and pasted what you put…but all that is there is the the word “avatar”….

I put in the url of the forum… did I do something wrong?
Thanks,
Kahil
June 16, 2007 at 11:02 pm #58397In reply to: bbpress info in wordpress?
fel64
MemberSame database but not same codebase. However you can make bb load wp at the start, and you can make wp load bb at the start (that’s the other method). It’s not difficult but not guaranteed to work, because only a few people have done it. It might mean fiddling with things until they work. If you did that, you could do what you were trying.
<?php
/*
Plugin Name: WP Avatars
*/
function wp_aud( $felID ) {
$avatar = get_usermeta( $felID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = 'Plz enter the URL of your bb install here';
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}
?>Otherwise you could paste that in a new text file, save it in your plugins folder, activate it and then use this in wordpress:
<?php wp_aud( $comment->user_ID ); ?>In theory.
June 16, 2007 at 10:27 pm #58396In reply to: bbpress info in wordpress?
Kahil
MemberI wouldn’t know where or how to insert something like you posted above. I thought that since both wordpress and bbpress were using the same database that all I’d have to do is paste the code. Like this for the avatar plugin I am using in bbpress:
<?php avatarupload_display($user->ID); ?>
June 16, 2007 at 10:02 pm #58416In reply to: Editing hot tags so they point outside the bb
peter-b
MemberI think I’m losing the plot..
just checked the bbpress hot tag and it points internally … so I suppose that while the question remains, the answer is probably “You can’t” – which in turn leads me to raise an enhancement request that such a facility (like the one in wordpress where you can add links to a blogroll on a sidebar)In fact it would be more useful if these tags could be added on a per forum (or even per topic basis)
June 16, 2007 at 8:37 pm #58395In reply to: bbpress info in wordpress?
fel64
MemberDidn’t see ganzua’s post, posted at the same time. 😮
When copy and pasting the code you have to remove any bb dependencies. For example, bb uses the $bbdb; wordpress uses the $wpdb, and for queries and the like you can just switch them. Note that $wpdb does not contain information about the names of bb tables, so $wpdb->topics or the like will not work. In other cases the function names are simply different; bb_get_option() or simply get_option() for example. This code is what I used in bbSync to integrate avatars:
function bbreplyavatar() {
global $bbposter, $opshuns;
$avatar = get_usermeta( $bbposter->ID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = $opshuns['bburl'];
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.
What’s the specific problem you want to solve right now, and what have you tried?
June 16, 2007 at 8:31 pm #58415In reply to: Editing hot tags so they point outside the bb
fel64
MemberGot an example? I haven’t seen that and can’t find it in the code. 😮
June 16, 2007 at 8:20 pm #58394In reply to: bbpress info in wordpress?
Kahil
Memberthe edit profile link, yes, that was resolved, but I just meant that statement as an example. There are other things from bbpress that I would like to have displayed in my wordpress sidebar.
Well, since you mentioned that the first option can be tricky, lets start with the latter? the php code?
Thanks,
Kahil
June 16, 2007 at 6:21 pm #58378csl749
MemberHmm. The main site is quite large, with the front page at about 200kB or something, but loads in about 5 seconds on my 2Mb connection (much of that waiting for Digg or YouTube, it seems). But when selecting topics on the forum it takes about 5 seconds again to load, where I’d expect it to take about a second, as it does here. After all, it’s just a few kB compared to the main site.
Thanks for investigating though, pravin – very much appreciated.
June 16, 2007 at 6:20 pm #58363In reply to: Any idea to integrate wp and bb login forms?
ganzua
Member“Very nice, sorry my ‘help’ wasn’t that useful
“-> Not at all, without you this integration wouldn’t have been possible!
June 16, 2007 at 6:07 pm #58362In reply to: Any idea to integrate wp and bb login forms?
fel64
MemberVery nice, sorry my ‘help’ wasn’t that useful
June 16, 2007 at 6:02 pm #58392In reply to: bbpress info in wordpress?
ganzua
Member“I would like to insert the “edit profile” link and some other stuff into my wordpress sidebar.”
-> I think we have solved this question in the other topic
June 16, 2007 at 5:53 pm #58361In reply to: Any idea to integrate wp and bb login forms?
ganzua
Membergot it, it is $current_user->display_name
so even more elegant; now when an user logs in has his nickname displayed in the sidebar
June 16, 2007 at 5:47 pm #58360In reply to: Any idea to integrate wp and bb login forms?
ganzua
MemberThis $current_user seems to be quite useful.
How can you insert $current_user here to replace Profile?;
. __('Profile') .for “UserName’s Profile”, is there any call using $current_user?
$current_user->NAME didn’t work
June 16, 2007 at 5:32 pm #58359In reply to: Any idea to integrate wp and bb login forms?
ganzua
MemberIt works!!!!!!
The working whole code is;
function wp_registro( $before = '<li>', $after = '</li>' ) {
if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a href="' . get_option('siteurl') . '/wp-login.php?action=register">' . __('Register') . '</a>' . $after;
else
$link = '';
} else { if( current_user_can('activate_plugins') ) {
$link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;}
else {global $current_user; $link = $before . '<a href="' . get_option('siteurl') . '/bbpress/profile.php?id=' . $current_user->ID . '">' . __('Profile') . '</a>' . $after;
}
}
echo apply_filters('register', $link);
}Now when any user logs in, wordpress sidebar displays a link to his profile in bb, but when is the admin the one who logs in he get a link to wp control panel.

Thanks a lot fel64!
June 16, 2007 at 5:09 pm #58357In reply to: Any idea to integrate wp and bb login forms?
fel64
MemberTry this one.
global $user_ID;
get_currentuserinfo();
... bbpress/profile.php?id=' . $user_id . '">' . ...June 16, 2007 at 4:44 pm #58356In reply to: Any idea to integrate wp and bb login forms?
ganzua
MemberThese two do not display anyting either;
/bbpress/profile.php?id=' . ID . '">'/bbpress/profile.php?id=' . $user->ID . '">'June 16, 2007 at 4:43 pm #58377Pravin Paratey
ParticipantAre you sure it is a .htaccess rewrite issue? Is your main site also sluggish? Your .htaccess file contains a *lot* less code than mine. And my site isn’t exactly slow.
I timed http://ochremusic.com/ using my wristwatch. The main page takes 14 seconds to load. 6 seconds for the site to even begin loading. Clicking forums immediately took me 5 seconds for the page to load.
That makes it 6 seconds for the DNS to resolve(?) 8 seconds for the main site and 5 seconds for the forums.
June 16, 2007 at 4:36 pm #58355In reply to: Any idea to integrate wp and bb login forms?
ganzua
MemberNop, it doesn’t work; this line
global $user; $link = $before . '<a href="' . get_option('siteurl') . '/bbpress/profile.php?id=' . $user . '">' . __('Profile') . '</a>' . $after;links to
/bbpress/profile.php?id=it is not catching the user idJune 16, 2007 at 10:58 am #1958Topic: Adsense (and YPN) injections (ads plugin)
in forum Pluginsthierryyyyyyy
ParticipantI made for my bbPress forum (http://forum.2diabolos.com) a plugin that inserts Adsense or YPN code in the posts.
Lots of configuration parameter (not show to administrators, positionning, number of adsense block ….);
easy to install and configure, with a administration panel (in Themes menu)
fel64
MemberThat’s a special version I made for Sneaky who had problems finding out what the error was
This is the currently latest version; I was planning to upload properly to the plugins section when there’s no outstanding problems here. This version is the same as the one you downloaded, though, just without the messages.Try changing the “global $bbdb;” to this:
global $bbdb, $bb_cache;June 15, 2007 at 7:19 pm #58323In reply to: Theme not working
fel64
MemberUnless you’ve sent out any header information with
header()there must be; I can think of no other way to explain it. It does say, output started in that file.June 15, 2007 at 6:02 pm #50272In reply to: Users dont receive password after registration
fel64
MemberI don’t know about chosen passwords.
Bugs go to http://trac.bbpress.org.
No permanent deletion yet.
No locking forums.
Yes. If
is_bozois 1, that is true, and the user is considered a spammer. 0 means they are not a bozo/spammer.Several other whats you have found?
June 15, 2007 at 5:56 pm #58321In reply to: Theme not working
fel64
MemberThat’s probably because there are some empty lines above or below the
<?phpor?>– check for them. Thanks for coming back and posting the solution, too.
June 15, 2007 at 5:54 pm #58354In reply to: Any idea to integrate wp and bb login forms?
fel64
MemberIt really should be, might have made another one of the silly little mistakes I’m so fond of. Try
global $user;and use
$user->IDinstead. -
AuthorSearch Results