Search Results for 'code'
-
AuthorSearch Results
-
starrett
MemberFel: I just made a small change to the
felbbreplies();
function in order to get a reply link on pages where there aren’t yet any replies. I simply addedecho '<h3><a href="' . bbreplylink() . '">Reply!</a></h3>';
to theelse
clause. If the topic has been created in the forums, it works perfectly, if not, the “Reply!” button simply links to the current page. Not ideal, I know, but it at least makes sure that the reply link appears, whether there are previous replies or not.I actually just installed the Upload Avatars plugin, but it doesn’t seem to be working correctly with bbsync – the
<?php bbreplyavatar(); ?>
portion offelbbreplies();
is returning the following on the WP pages:<img alt="admin avatar" src="http://path_to/wp/forums/avatars/" class="avatar" />
So it appears to know which directory contains the avatar, but doesn’t include the avatar’s file name.*Update* – I have just noticed that new forum replies don’t appear back in WP unless the original post is re-saved.
fel64
MemberStarrett, there’s a few template tags. Originally I was thinking I could make it so people can customise the comment structure in a seperate template file but dismissed it as thinking that no-one would care (I don’t). It’ll be quite easy to put it back in. They are all used internally, so they do work. Do you use the Avatar Upload plugin, actually? Can’t remember if I made a check for that.
It’s probably a good idea to let it stop at the
more
tag. With a link to the original entry? Can do, would make that a generic option (hmm, got quite a lot of options now).The option “how much of your post” is the character count. A little less than ideal, I suppose.
You can set this on a per-post basis by enabling per-post options, too.
Sneaky, the most important thing is error logs. I’ll see if I can help with that.
starrett
Memberfel: Disabling the “Do you want me to load bbPress whenever to …” checkbox worked! I’m now getting the replies from the forum topics on indie pages. Just a few quick questions:
How do you keep it from posting the entire original entry in the forums? (I know the “How much of your blog post do you want shown on the forums? Set it to 0 to get the full post.” option is there, but I don’t quite understand how to use it – for example, make it stop at the
<!--more-->
tag.)What are the rest of the tags (other than
<?php felbbreplies(); ?>
) that we can use? I can go ahead and test them out, to make sure that the rest of them are working as well.Sneaky: Don’t worry!
Trent Adams
MemberIn fact:
https://bbpress.org/forums/topic/1281?replies=7
https://bbpress.org/forums/topic/1275?replies=17
https://bbpress.org/forums/search.php?q=wp+header+bbpress
Some have had successful integrations and some problems depending on what you need. I am still sifting through which ones work and don’t
Trent
June 18, 2007 at 9:22 am #58438In reply to: “Cannot select DB.”
fel64
MemberIt probably means your database information is wrong. Open
config.php
and check it.fel64
MemberStarrett: Fantastic! I think I’ve got the problem, for now go to the options and disable the “Do you want me to load bbPress whenever to …” checkbox. Temporary fix.
Sneaky, we’re gonna make it work!
June 18, 2007 at 9:15 am #58403In reply to: bbpress info in wordpress?
fel64
MemberForget about the PHP.
Where it just says “avatar” instead of displaying the image, open the page source (in FF: Ctrl + U, in IE: probably something), then search for “avatar” until you hit the right place. There should be an image tag. Look at the
src
property. Does that URL point to a valid image file? If not, what does it read?June 18, 2007 at 2:05 am #58434In reply to: Please Help with BB/WP Header/Footer TIA!
ynotweb
Memberyou’re putting that code as the first line of config.php and nowhere else?
it might be the way your wp header is set up in comparison to the bbpress templates. mine was completely simple:
1. add the ONE php require line to config.php
2. drop Aditya’s files into a subdirectory of my-templates with a style.css with a name section
3. add bbpress styles to my wordpress theme stylesheet
4. change template in the presentation dashboard
Now I wanted my wordpress sidebar so I also added a div tag and sidebar include to those template files but otherwise haven’t had to change anything else.
June 18, 2007 at 1:44 am #58433In reply to: Please Help with BB/WP Header/Footer TIA!
sneakym
MemberThanks for the reply but I have followed those instructions to a T numerous times and nothing works, including downloading that template. This code
<?php require_once(‘/absolute/path/to/WordPress Parent Directory/wp-blog-header.php’) ?>
Breaks the forums completely. I only get a white page when going to the URL….
starrett
Memberfel: Success! I added
$bb_roles
to config.php, and it’s now creating new forum topics upon save of the post. However, it is still giving me the “Fatal error: Call to undefined function: get_topic() in /path_to/wp/wp-content/plugins/bbsync/bbsync.php on line 412” when I call<?php felbbreplies(); ?>
on my indie pages, if the corresponding forum topic has replies – it doesn’t do anything otherwise. Any suggestions?June 17, 2007 at 10:46 pm #56559In reply to: onvertigo.com
Trent Adams
MemberI made another change to my forums to match up with my blog at http://trentadams.com using one of the 9 possible combinations from the Crave4More suite of WP templates from Sadish.
Check it out and let me know what you think! I might even release it at some point
Trent
June 17, 2007 at 10:17 pm #58402In reply to: bbpress info in wordpress?
Kahil
MemberI don’t know the php code. I followed what was stated above. The URI points to the right folder. When you upload an avatar using the bbpress upload avatar plugin, it renames the image you upload to your username.
June 17, 2007 at 9:46 pm #57985In reply to: Plugin: Forum Icons
M
MemberI’m not proficient at php but finally figured out I needed to add these bits to front-page.php in my template to create a new column and make the icons show up. Might want to add a tiny bit of instruction for us neophytes.
<th><?php _e('Forum Icons'); ?></th>
<td class="num"><?php forum_icon(); ?></td>
Great plugin, didn’t even realize how useful visual pointers would be to my increasing number of new visitors – the little pics help direct those who don’t seem to be able to read and just post on whichever forum their mouse lands on first.
Also, any idea how to make it work with the Forum Restriction plugin so I’ve got an image instead of an ugly text link?
fel64
MemberSneaky: cool, thanks. I suspect you have a similar problem to Starrett but it’s going to be very difficult to find without seeing the errors. I’ll see if I can write you something that can read the error logs for you.
Starrett: That’s progress! I like it!
Try adding $bb_roles to the list, so that it becomes
global $bbdb, $bb_cache, $bb_roles;
This could be interesting. Either this will fix everything, or we’ll go through global by global variable and it should work eventually. Cool!
(All I’m doing is looking at the code you’ve got, finding the right line and looking at the variables called in it. The one we’ve got a problem with is usually the one which is called just before, like in this case line 275 uses $bb_roles and a few lines up it says
global $bb_roles;
. If you feel confident, you can look for the variable that’s causing a problem yourself. Or we can keep doing this.)
starrett
MemberFel,
Thanks for the quick reply. I replaced the version I had with the version you just linked, and added the
global $bbdb, $bb_cache;
and I am now getting this message when I attempt to save a post:“Warning: array_filter() [function.array-filter]: The second argument, ‘Array’, should be a valid callback in /path_to/wp/forums/bb-includes/capabilities.php on line 275
Warning: Invalid argument supplied for foreach() in /path_to/wp/forums/bb-includes/capabilities.php on line 279
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path_to/wp/forums/my-plugins/forum-moderators.php on line 52
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path_to/wp/forums/my-plugins/forum-moderators.php on line 52
Warning: Cannot modify header information – headers already sent by (output started at /path_to/wp/forums/bb-includes/capabilities.php:275) in /path_to/wp/wp-includes/pluggable.php on line 329″
June 17, 2007 at 5:01 pm #58400In reply to: bbpress info in wordpress?
Kahil
Memberwell, this plugin names the images by username I think. It also has a default image if no avatar has been uploaded… shouldn’t there be some sort of code there to reference a person’s username?
June 17, 2007 at 2:01 pm #58418In 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.
-
AuthorSearch Results