Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,701 through 28,725 (of 32,499 total)
  • Author
    Search Results
  • #58204

    In reply to: bbSync

    vafaaaan
    Member

    fel: 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?

    #61703
    richsad
    Member

    I 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.

    #2631
    richsad
    Member

    Hi. 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?

    #53526
    Null
    Member

    Same. 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

    #61713
    chrishajer
    Participant

    How about bb_current_user_can('moderate')?

    #2632
    Ben L.
    Member

    How 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.

    #55907
    citizenkeith
    Participant

    Thanks 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.

    #58199

    In reply to: bbSync

    vafaaaan
    Member

    hmm ok :) think ill wait and get back to that page later then..

    #58198

    In reply to: bbSync

    fel64
    Member

    Ho 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).

    #58197

    In reply to: bbSync

    vafaaaan
    Member

    hmm.. 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…

    #58196

    In reply to: bbSync

    fel64
    Member

    I put this in my template:

    <?php if($topic_id = felwptobb( $id ) ) { echo '<a href="' . bbreplylink( $topic_id ) . '">Reply!</a>'; } else { comments_popup_link('&nbsp;comments', '1 comment', '% comments','',''); } ?>

    Not at all, it’s a perfectly reasonably question. :)

    #61040
    vafaaaan
    Member

    omg sry ..

    add_profile_tab(__(‘Name’), ‘edit_profile’, ‘moderate’, ‘this-file-was-missing.php’);

    So many ppl in this forum .. i can’t breathe ;)

    #61039
    vafaaaan
    Member

    am 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');

    #61038
    vafaaaan
    Member

    cant get new profile tab/page link to work.. :(

    #61037
    vafaaaan
    Member

    What 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'));

    #61646
    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

    #61644
    livibetter
    Member

    Haven’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)

    #57097

    In reply to: Code backtick bug

    Arlo
    Member

    Fel -yup, that was apparently the problem

    Livi- and that plugin works without borking code. Thanks!

    #61650

    In reply to: Suggestions and misc

    vafaaaan
    Member

    Im 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 D:xxxxxbb-includesbozo.php on line 173

    Warning: Missing argument 3 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    then.. i get when i post..

    Warning: Missing argument 2 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    Warning: Missing argument 3 for bb_bozo_pre_post_status() in D:xxxxxbb-includesbozo.php on line 173

    Warning: Cannot modify header information - headers already sent by (output started at D:xxxxxbb-includesbozo.php:173) in D:xxxxxwp-includespluggable.php on line 391

    #61643
    Null
    Member

    Okay 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

    #53524
    Null
    Member

    Tried this, it aint working :(

    #61640
    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.

    #61639
    Null
    Member

    Hi 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

    #61649

    In reply to: Suggestions and misc

    vafaaaan
    Member

    Now .. 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() ) { ?> &raquo; 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 :)

    #61638
    livibetter
    Member
Viewing 25 results - 28,701 through 28,725 (of 32,499 total)
Skip to toolbar