Search Results for 'code'
-
AuthorSearch Results
-
vafaaaan
Memberfel: ok.. to bad .. im trying figure out the relationships in the DB , seems complex. Why isnt there a wp_tags table?
Will you implement it? or should i try do some coding myself?
November 26, 2007 at 1:15 am #61703In reply to: Change Profile information
richsad
MemberI should add that my objective is to change the info collected to be related to the nature of the website. Occupation, Location, and such is not the right data for the website in question.
I also note that these are text fields ONLY. The content creator of this particular website wanted a dropdown question. I talked her out of it, but how would you do something like that?
Lastly, WHERE is it documented how the profile system works if anywhere. I found the source code was all I could find.
November 26, 2007 at 1:13 am #2631Topic: Change Profile information
in forum Installationrichsad
MemberHi. I want to change the data that is collected in the Registration:Profile Information page of bbpress. Some background…
I have a bbpress/WPMU integration. The system is working fine in terms of the two sites being integrated. When a user goes to register for an account on the forum, they are presented with a form with name, email, website, occupation, location and interests. I see in the source code where the associative array is (get_profile_info_keys). So I could modify the fields there, but there must be some “proper” way to change the profile info that is gathered.
I apologize if this is plainly explained somewhere. I can’t seem to find any admin page related to changing the bbpress profile info. I’d prefer to do this the sanctioned way and not modify source files.
Reading other posts I see stuff about plugins and the profile, but surely that isn’t the easiest way to change the nature of the data collected?
November 25, 2007 at 10:08 pm #53526In reply to: Fight Against Auto-Register Robot
Null
MemberSame. I’ve tried this one, but I could still registrate without leaving the webpage field blank

I need something too and fast, cause I am getting at 200! registration spammers already and counting…
_Null
November 25, 2007 at 10:03 pm #61713In reply to: Check if a user is a moderator+
chrishajer
ParticipantHow about
bb_current_user_can('moderate')?November 25, 2007 at 9:53 pm #2632Topic: Check if a user is a moderator+
in forum TroubleshootingBen L.
MemberHow do I? I tried
$user->caps['moderate']and I tried$user->has_cap('moderate'). Neither worked. What am I doing wrong?Edit: never mind, I figured it out.
November 25, 2007 at 8:47 pm #55907In reply to: Plugin: Restrict registration for bbPress
citizenkeith
ParticipantThanks for writing this plugin.

Every time I update the restriction settings, my Private Forum plugin settings are reset to “Open To All.” Not sure if the problem is with this plugin or the Private Forum plugin.
vafaaaan
Memberhmm ok
think ill wait and get back to that page later then..
fel64
MemberHo hum. That’s pretty annoying, isn’t it? I put in a $bbdb->escape() because otherwise some database error would annoy me, but this way may well be worse. I’m not sure what to do; bb gets it nicely encoded through coming through $_POST I think. Still thinking about that one (if anyone knows what is probably quite obvious and tells me, that’d be great).
vafaaaan
Memberhmm.. posts gets n´s all over them…
projects. Please check back later for for more news regarding this.
n
nCode test
n n< ?php n// Testing.. n if (function()) n { etc...[code='php']
n< ?php
n// Testing..
n
if (function())
n
{
etc…fel64
MemberI put this in my template:
<?php if($topic_id = felwptobb( $id ) ) { echo '<a href="' . bbreplylink( $topic_id ) . '">Reply!</a>'; } else { comments_popup_link(' comments', '1 comment', '% comments','',''); } ?>Not at all, it’s a perfectly reasonably question.
November 24, 2007 at 11:46 am #61040In reply to: How to Write BBPress Plugins.
vafaaaan
Memberomg sry ..
add_profile_tab(__(‘Name’), ‘edit_profile’, ‘moderate’, ‘this-file-was-missing.php’);
So many ppl in this forum .. i can’t breathe
November 24, 2007 at 10:27 am #61039In reply to: How to Write BBPress Plugins.
vafaaaan
Memberam i doing it right?
function ed08_tab_add()
{
add_profile_tab(__('ED 08'), 'ed08', 'moderate', 'ed08-template.php');
}
add_action('bb_profile_menu', 'ed08_tab_add');November 24, 2007 at 9:40 am #61038In reply to: How to Write BBPress Plugins.
vafaaaan
Membercant get new profile tab/page link to work..
November 24, 2007 at 8:11 am #61037In reply to: How to Write BBPress Plugins.
vafaaaan
MemberWhat does these?
add_profile_tab(__('Name on tab'), 'whats this?', 'And this?', 'file.php');.
if i call it once in my plugin it will remain until i deactivate it ?
.
Add settings?
bb_update_option('my_options', $options);.
Delete settings?
bb_delete_option('my_options');.
Show notice on admin page?
bb_admin_notice(__('Settings Saved'));November 23, 2007 at 11:00 am #61646In reply to: How to: ddlb of user roles
Null
Member… sorry for asking for help…. thought forums where here for that…
I can’t program, never said I did, I build things with trial and error, learning that way. Reading and trying to understand how and why things works. So if I get just a piece of code I’ll try that and try other suggestions too. I am more a reverse engineer. The site and things I’ve builded can be done in 2 hours if you are a phpprogrammer, I do it in two weeks or more, but I get it done (don’t give up) and am proud if I acomplisch what I wanted.
Assuming someone can program cause his plugin is awesome wont work everytime
. Most things I can figure out myself, but if some small stupid thing like a ddlb takes too much time I am gonna ask the forums (duh). Kinda get the feeling now that, if you can’t program, you shouldn’t do it or ask for help…Like the post above from Chris, you’ve managed to make it work and you are assuming I can figure this out too cause it was apparently easy for you to figure out. But I don’t think like a programmer, it’s hard for an person like me to figure it all out. I don’t know where all code is pulled from or is placed. I use bbpulp a lot to find the needed code, but that isn’t always enough.
I’m glad Chris found an answer, but then I ask: how did you do it? Can you show me the code and explain some of it so I can learn from it…
Better look like it like this, I can build a car, but I don’t know how to construct it. I know I need an engine, but I don’t know how the engine works. I know what it does, I know I need it… and so I puzzel the car together. A mechanic will do it in 1 week, I’ll do it in 1 year…
I am weird, I know

Well I just wanted to get this of my chest and also mention I aint attacking anyone (especially Chris, just jused your post as an excample)
So no hard feelings (from me anyway) and thanks for your time
_Null
November 23, 2007 at 3:54 am #61644In reply to: How to: ddlb of user roles
livibetter
MemberHaven’t you noticed this line from bbPress source (L1296 in template-functions.php)?
$roles = $bb_roles->role_names;I think chrishajer and me thought you knew how to program with PHP (by checking your website). Yes, chrishajer gave you a piece of code that is a hint not a just-can-work code at everywhere. I thought you can code with PHP, and you should be able to put the rest on your own code. However, I was wrong or you think someone else has taken care of the rest for you?
you also need to do
global $bb_roles;, in case you really can not code with PHP.(edit: Sorry for this emotional post to everyone else)
November 23, 2007 at 3:36 am #57097In reply to: Code backtick bug
Arlo
MemberFel -yup, that was apparently the problem
Livi- and that plugin works without borking code. Thanks!
November 22, 2007 at 10:37 pm #61650In reply to: Suggestions and misc
vafaaaan
MemberIm getting these lines in the middle of the admin page: wp-admin/post-new.php
Error:
Warning: Missing argument 2 for bb_bozo_pre_post_status() in
xxxxxbb-includesbozo.php on line 173
Warning: Missing argument 3 for bb_bozo_pre_post_status() in
xxxxxbb-includesbozo.php on line 173then.. i get when i post..
Warning: Missing argument 2 for bb_bozo_pre_post_status() in
xxxxxbb-includesbozo.php on line 173
Warning: Missing argument 3 for bb_bozo_pre_post_status() in
xxxxxbb-includesbozo.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at
xxxxxbb-includesbozo.php:173) in
xxxxxwp-includespluggable.php on line 391November 22, 2007 at 9:20 pm #61643In reply to: How to: ddlb of user roles
Null
MemberOkay chris, now try this:
Make a clean php file.
Now add that code you mentioned
Make the php page a plugin and activate it.
Now go to your admin -> pluginpage and you’ll see an empty ddlb too

It works in your PNG image example, cause you just copied the code in the same page. It will always work that way, but not in a clean file…
_Null
November 22, 2007 at 9:13 pm #53524In reply to: Fight Against Auto-Register Robot
Null
MemberTried this, it aint working
November 22, 2007 at 8:58 am #61640In reply to: How to: ddlb of user roles
livibetter
Member@Null: of course, you get all roles’ data. I meant you can get each role’s name from the returning result of
$bb_roles->get_roles()(I thought you was going to do something special). However chrishajer has told you the useful information for all your need, you just need to read from https://trac.bbpress.org/browser/trunk/bb-includes/template-functions.php#L1296 to 1311. If you really want to do something with bbPress, you have to read the source of bbPress.November 22, 2007 at 8:42 am #61639In reply to: How to: ddlb of user roles
Null
MemberHi guys,
Sorry ddlb = drop down listbox
@ chris: yes i did try that one already, but it gave me a empty ddlb (proberbly because the user’s role couldn’t be defined) .
@livibetter: din’t try it but that will give (I think) all roles, but not in a ddlb.
For forums there is a function: bb_forum_dropdown, but I couldn’t adapt it to get user roles, so I think a whole new function must be written to put it in the plugin I am working on. I have the feeling all the pieces are there, but I have no idea how to put them together

Thx,
Null
November 22, 2007 at 8:03 am #61649In reply to: Suggestions and misc
vafaaaan
MemberNow .. ive managed to make WP and bbp share same theme. Dont know if its god but it works.. im running right now.
wp-content/theme/header.php
<?php
include(ROOT . '/theme/header-start.php');
?>
<title><?php bloginfo('name'); ?> - <?php if ( is_single() ) { ?> » Archive <?php } ?> <?php wp_title(); ?></title>
<?php
wp_head();
include(ROOT . '/theme/header-end.php');
?>
<body>
<?php
wp_head();
include(ROOT. '/theme/body-start.php');
?>my-themes/theme/header.php
<?php
include(ROOT . '/theme/header-start.php');
?>
<title>MyWebsite - <?php bb_title() ?></title>
<?php
bb_feed_head();
if ( is_topic() && bb_is_user_logged_in() ) : ?>
<script type="text/javascript">
var lastMod = <?php topic_time( 'timestamp' ); ?>;
var page = <?php global $page; echo $page; ?>;
var currentUserId = <?php bb_current_user_info( 'id' ); ?>;
var topicId = <?php topic_id(); ?>;
var uriBase = '<?php bb_option('uri'); ?>';
var tagLinkBase = '<?php bb_tag_link_base(); ?>';
var favoritesLink = '<?php favorites_link(); ?>';
var isFav = <?php if ( false === $is_fav = is_user_favorite( bb_get_current_user_info( 'id' ) ) ) echo "'no'"; else echo $is_fav; ?>;
</script>
<?php
bb_enqueue_script('topic');
endif;
bb_head();
include(ROOT. '/theme/header-end.php');
?>
<body id="<?php bb_location(); ?>">
<?php
include(ROOT . '/theme/body-start.php');
if ( is_bb_profile() ) profile_menu();
?>my-themes/theme/footer.php
<?php
do_action('bb_foot', '');
include(ROOT . '/theme/body-end.php');
?>wp-content/theme/footer.php
<?php
include(ROOT . '/theme/body-end.php');
?>theme/header-start.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://gmpg.org/xfn/11">theme/header-end.php
<link rel="stylesheet" href="<?php echo URL; ?>/theme/default.css" type="text/css" title="Default style" media="screen" />
<link rel="alternate" href="<?php echo URL; ?>/?feed=rss2" type="application/rss+xml" title="RSS Feed" />
<link rel="pingback" href="<?php echo URL; ?>/xmlrpc.php" />
<link rel="EditURI" href="<?php echo URL; ?>/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD" />
<link rel="wlwmanifest" href="<?php echo URL; ?>/wp-includes/wlwmanifest.xml" type="application/wlwmanifest+xml" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="WordPress 2.3.1" />
</head>theme/body-start.php
<div id="wrapper">
<?php
get_sidebar();
// Etc...
?>theme/body-end.php
<?php
// Etc...
wp_footer();
?>
</div>
</body>
</html>Hope its all there..

URL and ROOT is defined in wp-config.php
Edit: you can of course cut BODY to include different sidebar wp / bbp
November 22, 2007 at 3:52 am #61638In reply to: How to: ddlb of user roles
livibetter
MemberTry to use
$bb_roles->get_roles()( https://trac.bbpress.org/browser/trunk/bb-includes/capabilities.php#L25 ) -
AuthorSearch Results