Search Results for 'code'
-
AuthorSearch Results
-
April 21, 2009 at 1:12 pm #54701
In reply to: Display latest post from WP
Ipstenu (Mika Epstein)
ModeratorFor a non-shared DB, you just have to define the database instead of
$bbdb
April 21, 2009 at 12:33 pm #73158In reply to: adding meta tags? or SEO option?
Ivaylo Draganov
MemberbbSEO Tools is great but it messes up cyrillic characters in the description for topic pages. I peeked into the code and tried replacing line 53:
return htmlentities($snippet, ENT_QUOTES);
with this:
return wp_specialchars($snippet, ENT_QUOTES);
Seems to be fine now
The plugin admin page is a bit messy – could use some more precise labels and explanations.
IDEA: Could the function for pulling out the description for topic pages be enhanced so that it strips bbCode and html tags from the output? They take up character space and look awful in search results.
I guess it’s a matter of writing some nifty RegEx but my knowledge is not sufficient for this.
Thanks and Cheers!
April 20, 2009 at 7:29 pm #69990In reply to: Plugin: bbPress Force Login for Buddypress
jfcarter
MemberIs this the most up to date code? I’ve tried to use it and I am getting no effect. No errors, nothing.
Is there a specific location where the plugin should reside (besides bb-plugins) or does it need a specific name?
Also, should the path just be the domain or something else?
April 20, 2009 at 6:59 pm #73166In reply to: BBpress in subdomain,cant login after wp integration
chrishajer
ParticipantIt seems pretty clear that this table does not exist:
saphruse_bbp01.wp_users
Can you look at the database and see what tables are actually present there? Looks like bbPress is trying to use the wp_users table for integration, but it’s not present? Did you use the same database for WordPress and bbPress?
April 20, 2009 at 5:09 pm #73169In reply to: target _blank
_ck_
Participantfunction bb_target_blank( $text ) {
$text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
return $text;
}
add_filter('post_text', 'bb_target_blank',255);April 20, 2009 at 2:08 pm #73030In reply to: bbPress Top 100 April 2009 Update
Ipstenu (Mika Epstein)
Moderator_ck_, I looked into some things about regionality and I don’t think you’ll be able to get it much better than it is, unless you do as you mentioned, with the whois. Even then, it’s not going to be accurate 100%, since sometimes a server is in the US, but it runs a Brazillian site, etc. (And I’m still pissed at Google, a year later, from when I was in Japan and I went to google.com and it kicked me to google.jp, based on my IP, and ignoring everything else like the fact that my browser info showed I used English. At the time, I couldn’t get it to show the link to ‘Google in English’ and I was stuck in Japanese for a while.) Regions and localization are things that seem like a really good idea, but there’s no way to make it perfect, since you can never tell when someone’s abroad
I like how you replaced “sticky” with a nifty little icon.
Thanks! That was my first ‘hack’ for bbPress and I slapped this in my functions.php
// This sets sticky label as an image
remove_filter('bb_topic_labels', 'bb_sticky_label', 20);
function my_sticky_label( $label ) {
global $topic;
if (is_front()) {
if ( '2' === $topic->topic_sticky ) {
return sprintf(__('<img src="/images/sticky.png" alt="[sticky]" /> %s'), $label);
}
} else {
if ( '1' === $topic->topic_sticky || '2' === $topic->topic_sticky ) {
return sprintf(__('<img src="/images/sticky.png" alt="[sticky]" /> %s'), $label);
}
}
return $label;
}
add_filter('bb_topic_labels', 'my_sticky_label', 20);April 20, 2009 at 9:15 am #57163In reply to: Registration Email Not Being Sent – new issue
possessed
MemberHi,
I’ve got the same problem, but with another host(Hosteurope).
I solved it after I’ve asked my hoster. When sending an Email from my host, I need to add a -f parameter to the sendmail function.
Doing so in BBPress you will need to add a valid (and known for the server) Email-adress in line 90 of your bbpress-root-folder/bb-includes/backpress/class.mailer.php file from
/**
* Sets the Sender email (Return-Path) of the message. If not empty,
* will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
* @var string
*/
var $Sender = '';
to
var $Sender = 'from@your-domain.com';
I hope this might help some of you
bb
April 20, 2009 at 5:00 am #72926In reply to: Remove Forum Dashes: —
Justin Tadlock
ParticipantUse this:
<?php forum_description( array( 'before' => false, 'after' => false ) ); ?>
April 20, 2009 at 4:44 am #72378In reply to: Getting errors on my WP Posts
brettbum
MemberI’m seeing this same problem in WordPress all by itself. Don’t think this is a BBpress problem but a WordPress problem. Don’t see anyone that seems to have a handle on it yet.
April 20, 2009 at 2:27 am #6617Topic: target _blank
in forum TroubleshootingFilipe Deschamps
MemberAfter some searching @ this forum, I’m really confused on how to make replies links to open on a new window by default. I’ve found some tweaking plugins by CK, but I think that was a really early version and didn’t worked out.
I’m using 9.0.4. Anyway to target=”_blank” links and bbCode-lite?
April 19, 2009 at 9:23 pm #73164In reply to: BBpress in subdomain,cant login after wp integration
chrishajer
ParticipantAlso, you don’t log in directly at bb-login.php like you can with wp-admin. You need to enter your login details in the front page of your forum, and if you are keymaster (or administrator or moderator), you will be shown the
Admin
link next to your name and that’s how you get to the back end. If you don’t have the Admin link then you’re not logged in as keymaster.April 19, 2009 at 4:36 pm #73155In reply to: adding meta tags? or SEO option?
_ck_
ParticipantMake this into a mini-plugin and it will add the tags as meta on topic pages:
function bb_tweaks_tags_as_meta_keywords() {
global $tags;
if (!empty($tags)) {
$keywords=""; foreach ($tags as $t) {$keywords.=$t->raw_tag.', ';}
echo "n".'<meta NAME="keywords" CONTENT="'.trim($keywords,", ").'">'."n";
}
}
add_action('bb_head', 'bb_tweaks_tags_as_meta_keywords',;
April 19, 2009 at 1:25 pm #73089In reply to: lock profile editing from non administrators
_ck_
Participantmake it into a mini-plugin, ie.
<?php
/*
Plugin Name: No Profit Edit
*/
function bb_tweaks_no_profile_edit($retvalue, $capability, $args) {
if ($capability=="edit_user") {return bb_current_user_can( 'administrate');}
return $retvalue;
}
add_filter('bb_current_user_can', 'bb_tweaks_no_profile_edit',10,3);
?>Save it as
no-profile-edit.php
put intomy-plugins
and activate.Make sure you don’t put any spaces at the beginning or end of the file.
April 19, 2009 at 1:03 pm #73088In reply to: lock profile editing from non administrators
cyclune
MemberChrishajer is right. I have bbpress linked with WordPress. I don’t want the users to change their own profile with wrong email adresses or new user names.
_ck_ – where do I have to insert this piece of code???
cyclune
April 19, 2009 at 11:11 am #73141In reply to: I just want header/footer
bruinfelix
MemberApril 19, 2009 at 11:05 am #73148In reply to: How to add and modify .mo file
_ck_
ParticipantTo edit a .mo file you first need to have the .po version of it.
Then you can edit it with POEDIT
If you don’t have any of those things, first get POEDIT
http://www.poedit.net/download.php
If you only have a .mo file and not the .po but wish to add/edit the translations, you can “decompile” or reverse the .mo file into a .po file from the command line with poedit , ie.
START -> RUN
/program files/poedit/bin/msgunfmt ab_AB.mo > ab_AB.po
April 19, 2009 at 4:42 am #73139In reply to: I just want header/footer
bruinfelix
MemberThen you must be more specific, on who you asking a question
April 19, 2009 at 4:35 am #73087In reply to: lock profile editing from non administrators
_ck_
Participantuntested, in theory:
function bb_tweaks_no_profile_edit($retvalue, $capability, $args) {
if ($capability=="edit_user") {return bb_current_user_can( 'administrate');}
return $retvalue;
}
add_filter('bb_current_user_can', 'bb_tweaks_no_profile_edit',10,3);April 19, 2009 at 3:37 am #73130In reply to: no www. = no fresh baked cookies
_ck_
ParticipantGo into your
wp-config.php
and put the line@define(COOKIE_DOMAIN,'.diskinserted.com');
then go into your
bb-config.php
and put the line$bb->cookiedomain = '.diskinserted.com';
Make you you remove any existing versions of the lines first.
Make sure you clear all cookies for your website.
Then try logging in and testing again.
April 18, 2009 at 4:55 pm #73137In reply to: I just want header/footer
bruinfelix
MemberI use the latest wordpress MU version (trunk), and just the alpha-6 version of bbPress
Ohw, and a recent version (also trunk) from the buddypress website
April 18, 2009 at 2:55 pm #59345In reply to: Adding a new User Type
firstangel
MemberI have saved, uploaded, activated. No new membergroup anywhere
April 18, 2009 at 2:38 pm #73092chrishajer
ParticipantActually, I think the problem is that there is no space after the <?php, the comment starts right away.
You have this:
<?php// ** MySQL-asetukset ** //
It should be this:
<?php // ** MySQL-asetukset ** //
Or just put the comment on the next line.
April 18, 2009 at 9:28 am #73135In reply to: I just want header/footer
bruinfelix
MemberI did it, and you can find the information for it, already on this forum
April 17, 2009 at 7:58 pm #73097In reply to: Any idea when final version will come out?
Test
MemberThanks for all your info.
April 17, 2009 at 3:06 pm #73119In reply to: Lost administrator upon integration with WPMU
rhammons
MemberLooks like I got the cookies hammered out after opening up my safari preferences and finding the cookie code in there… So now when I’m logged in in WP it seems to be consistent with the account logged into BBP, except I still have no admin options in BBP. Hrmph. Any ideas?
-
AuthorSearch Results