Search Results for 'code'
-
AuthorSearch Results
-
October 31, 2007 at 1:15 pm #61247
In reply to: Adding tekst in a new custom page, hyperlinks broken
livibetter
MemberI have no idea which file you meant. Please just paste the code about how you query for something from your database and how you process the data for the visitors.
October 31, 2007 at 1:10 pm #61250In reply to: on plugin activation, create table in db
livibetter
MemberYou don’t have to check the existence of the table you need
http://dev.mysql.com/doc/refman/4.1/en/create-table.html
Just create a table with
IF NOT EXISTS.October 31, 2007 at 10:57 am #61245In reply to: Adding tekst in a new custom page, hyperlinks broken
livibetter
MemberCould you paste your
test.php?October 31, 2007 at 10:53 am #61248In reply to: on plugin activation, create table in db
livibetter
MemberHere is an example for deactivation hook
//bb_register_deactivation_hook(__FILE__, 'GADeactivate'); // Bug in bbPress 0.8.3, do same thing using next line
add_action('bb_deactivate_plugin_' . bb_plugin_basename(__FILE__), 'GADeactivate');just remove “de” from above, that should work. For example,
bb_register_activation_hook(__FILE__, 'hook_fct');However, I haven’t used activation hook, therefore I don’t know is there a problem with it.
October 31, 2007 at 4:25 am #61287livibetter
MemberSorry, my mistake
<?php
echo '(<a href="' . get_profile_tab_link(bb_get_current_user_info('id'), 'edit') . '">edit</a>)';
?>login_form()useslogged-in.phpof current active theme if current user is logged in.October 31, 2007 at 4:14 am #61284In reply to: Rationale behind profile page content?
lookfab
MemberThanks livibetter. I just realized that the profile field doesn’t show any fields that are not populated, so in my case there was no information to show until I added the website a few minutes ago.
Not my brightest moment
October 31, 2007 at 3:41 am #61285livibetter
MemberYou can put this at proper place in your
logged-in.php<?php
echo '(<a href="' . get_profile_tab_link(0, 'edit') . '">edit</a>)';
?>October 30, 2007 at 10:40 pm #61269In reply to: Disable posting and registration
jazbek
Memberthanks man.
October 30, 2007 at 11:09 am #60314In reply to: Using the add_role function
akhater
Memberfel64 WOW this is nice
we learn every day don’t we 
I will add your link to my mod it will help ppl
October 29, 2007 at 11:10 pm #60313In reply to: Using the add_role function
fel64
MemberNice, akhater. Just for simplicity and maintainability, you don’t actually have to copy and paste the
membercapabilities, you can simply duplicate them through code. (For example)October 29, 2007 at 9:21 am #61194In reply to: Plugin: Gravatar
livibetter
MemberNew Version, 0.2. Download the zipped file.
- Two Gravatar Email Source
- Use registered email
- Use additional Gravatar Email field
- Email Verification – Users need to verify Gravatar Emails which they input
- Options page (screenshot)
- Default Image – Supports displaying Default Image
- Also supports displaying different Default Image based on user’s role
- Display Name – Shows Display Name instead of Login name if available
- Customize Size, Rating of avatar
- Complete Deactivation – Removes options and data in usermeta
jazbek
Memberhey fel et al.,
found another issue which i just spent way too much time trying to figure out.. why is it that anywhere
bb_get_optionis called, it returns nothing? somehow thebb_get_optionfunction doesn’t have access to the$bbobject. I placed the following 2 lines of code in my bbpress functions.php, at the top of thebb_get_optionfunction (after the line that readsglobal $bb;:print_r($bb);
echo " $option ";and i got:
akismet_key mod_rewrite use_cache active_plugins usercookie usercookie page_topics— notice, the requested option names are being echoed, but there’s no output from print_r($bb). why isn’t $bb set in the
bb_get_optionfunction?this issue is causing bbrepliestext() to output:
Warning: Division by zero in /httpdocs/discuss/bb-includes/functions.php on line 1465if the “Do you want me to load bbPress whenever to make things like links nicer?” option is checked in Options > bbSync. To be specific, the error comes from line 500 in bbsync.php
October 29, 2007 at 6:22 am #60809In reply to: Removing Profile Fields
livibetter
MemberUse this code as a plugin.
function Hook_get_profile_info_keys($keys) {
unset($keys['interest']);
return $keys;
}
add_filter('get_profile_info_keys', 'Hook_get_profile_info_keys');October 29, 2007 at 4:37 am #61271In reply to: Using bbPress Functions in WordPress
mrwonderr
MemberThanks, it works.
October 28, 2007 at 6:16 pm #2551Topic: Changing the title of a view
in forum Themeslookfab
MemberIs there a simple way (i.e. not involving a plug-in) to change the title of a view? For example, if I wanted the view “Topics with no replies” to say “Threads with no replies”, how can I do this?
I do see that the views are set up in default-filters.php, so I guess I’m asking whether there is an easy way to override these view definitions using code in the theme.
Thanks.
October 28, 2007 at 11:10 am #61193In reply to: Plugin: Gravatar
bigmumu
MemberThanks guys, great job
October 28, 2007 at 10:26 am #61270In reply to: Using bbPress Functions in WordPress
fel64
MemberInclude bb in
wp-config.phplike so:require_once('path/to/bb-load.php');October 28, 2007 at 7:06 am #61268In reply to: Disable posting and registration
livibetter
MemberI checked 0.8 in svn. You can simply comment out or remove those capabilities in
capabilities.php.October 28, 2007 at 6:37 am #61267In reply to: Disable posting and registration
jazbek
Memberthanks, yeah, i am not using bbpress + wordpress on the installation i’m trying to disable posts and registration on.. that’s the old one that’s getting moved to the new site that has wordpress.
0.8 doesn’t have plugin activation, i guess everything’s just enabled by default (someone correct me if i’m wrong). i’ll have to check out capabilities.php tomorrow (i’m off to a halloween party!). thanks for the help.
October 28, 2007 at 2:35 am #61266In reply to: Disable posting and registration
livibetter
MemberDid you activate it? and did you use a normal user to try posting? (keymaster remains all permissions)
I noticed you probably use WP and bbPress together (by your recent posts), I have no idea if this code can work under that condition.
* Sorry! I just realized that you meant 0.8. Well, I started to use bbPress from 0.8.3, so I don’t know is this compatible to 0.8. You need to check
capabilities.phpif available in 0.8.October 28, 2007 at 2:08 am #2549Topic: Using bbPress Functions in WordPress
in forum Troubleshootingmrwonderr
MemberI want to have one universal sidebar in my website for both WP and BB, but I can’t because I need a few BB Functions for it, particularly
login_forms(). Is there a way to uselogin_forms()in WP?October 28, 2007 at 1:01 am #61265In reply to: Disable posting and registration
jazbek
MemberDo you know if the Changes Roles Stuff plugin is compatible with bbpress 0.8? i installed it, but it doesn’t seem to be getting called. I have, in my-plugins/custom-roles.php:
<?php
/*
Plugin Name: Changes Roles Stuff
Plugin URI: http://www.livibetter.com/it/
Description: Changes Roles Stuff
*/
function ChangesRolesStuff($roles) {
// Changes Key Master Role's display name to 'The Boss'
$roles['keymaster']['name'] = 'The Boss';
$roles['member']['capabilities'] = array('read' => true);
$roles['moderator']['capabilities'] = array('read' => true);
$roles['administrator']['capabilities'] = array('read' => true);
return $roles;
}
add_filter('get_roles', 'ChangesRolesStuff');
?>but people can still post.
October 28, 2007 at 12:49 am #56763In reply to: Plugin: Avatar Upload
mrwonderr
MemberTo fix any odd problems regarding permissions, you can CHMOD it using PHP.
Add the code above line 128 where it says
"$success_message = "Your avatar has been uploaded.";chmod("/PATH/TO/FORUMS/".$config->avatar_dir . $user_filename, 0666);
October 27, 2007 at 10:34 pm #61257In reply to: Show login name
livibetter
MemberReplace line 194 in
bb-avatar-upload.php$felidenticon = $identicon->identicon_build( $user->user_login, '', false, '', false );with
$felidenticon = $identicon->identicon_build( (($user->display_name) ? $user->display_name : $user->user_login), '', false, '', false );PS. Just a quick guessing solution and I haven’t used this plugin.
October 27, 2007 at 1:32 pm #61236In reply to: No New posts for members
livibetter
MemberHave you tried to search one in Extend?
If you find no plugin and you can do code, I think you can check line 18 in /bb-post.php, line 479 in /bb-includes/capabilities.php.
You need to check current user’s is allowed to start a new topic in specific forum or not in your filter hook.
Just thoughts, but should work.
PS. I think it’s better not to do too much that bbPress can’t by default, or you could suffer more after upgrading unless you completely know what you do.
- Two Gravatar Email Source
-
AuthorSearch Results