Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,926 through 31,950 (of 32,411 total)
  • Author
    Search Results
  • #1015
    ardentfrost
    Member

    Here’s one I hope you all enjoy.

    This plugin and helper files allows you to link to a member list page, which by default displays the username, user title, home page, join date (with some easier-to-read formatting), and I left in some commented out code for post count if you have my post count plugin installed (if not, you might want to delete those lines from memberlist.php).

    Additionally, you can click the colum title for Username and Join Date and get the list sorted by that column. Furthermore, if you click the same column again, it sorts it by the column in descending order.

    Lastly (and the coolest part in my opinion), admins will see an extra part to the table that will allow you to delete users (as many or few at one time as you want). Users without the ability to delete users will not even be able to see the added cells or submit button.

    To see the member list in action, visit http://www.rayd.org/forums/ (the link is at the top). You won’t be able to see the cool admin parts of the table, of course ;)

    To download the plugin, visit http://faq.rayd.org/memberlist/

    #52001
    M
    Member

    Alrighty, here’s the scoop:

    I added <?php do_action('extra_profile_info_display', $user); ?> to my profile.php file, right above the second to last line, <?php profile_pages(); ?>.

    In my template-functions.php file, I have the following:

    function extra_profile_edit() {

    //Globals

    global $user_id, $bb_current_user,$bbdb;

    // Get dA username, if it exists

    $da_username = $bbdb->get_var("SELECT meta_value FROM $bbdb->usermeta WHERE meta_key = 'da_username' AND user_id = '$user_id'");

    // Get the user's real name, if it exists

    $user_realname = $bbdb->get_var("SELECT meta_value FROM $bbdb->usermeta WHERE meta_key = 'user_realname' AND user_id = '$user_id'");

    // Input fields that have a default value of the set variable

    echo "

    <input

    name="da_username"

    id="da_username"

    type="field"

    value="$da_username" />

    .deviantart.com

    <input name="user_realname"

    id="user_realname"

    type="field"

    value="$user_realname"

    />";

    }

    And now for the real meat of the thing:

    function extra_update() {

    global $user_id;

    bb_update_usermeta($user_id, "da_username", $_POST['da_username']);

    bb_update_usermeta($user_id, "user_realname", $_POST['user_realname']);

    }

    add_action('extra_profile_info', 'extra_profile_edit');

    add_action('profile_edited', 'extra_update');

    add_action('extra_profile_info_display', 'extra_display');

    My apologies for the length of the post…

    #52000
    M
    Member

    I think I’ve found a solution, by searching the forums (go figure).

    https://bbpress.org/forums/topic/313?replies=21#post-1672

    I quite like this plugin… I’m going to enable it on my forums.

    I should have realized… I’m adding an action, not a filter…

    [edit] OK, well I’m one step closer, kind of. I need to make a new row (?) for each new profile field.

    [another edit]

    I’m closer: here’s the function I need; bb_update_usermeta

    #51999
    M
    Member

    Hey there, I’m trying something out here… I made a plugin called template-functions.php and I’m trying out one thing here.

    If I put this line:

    add_filter(

    'get_profile_info_keys',

    'extra_profile_info'

    );

    function extra_profile_info () {}

    my profile info is gone, except for the username field and a password field.

    I can only see the password field if I view the source… It’s not visible…

    Still working on it…

    edit: Oh boy, I guess the function extra_profile_info exists! Still going…

    another edit:

    Well now check this out:

    https://trac.bbpress.org/changeset/327

    10/13/05… “Hooks for extra fields”?

    This is more like it!

    #51997
    steven19
    Member

    Your site is down :(

    #51996
    ardentfrost
    Member

    lol, I’m actually working on a PM system as well :) Post Preview is on my to-do list.

    You can actually view what I have done, am doing, and plan to do on my forums. http://www.rayd.org/forums/

    Right now I’m putting some finishing touches down on a memberlist plugin with a really cool admin feature I think everyone will enjoy.

    As for my avatar plugin, I’d love to incorporate what you’ve done to make it more powerful, or maybe we can make your’s pluggable and we can make them work together to make one good plugin :)

    #51995
    M
    Member

    Awesome, I’ll give it a go.

    Funny you mention your avatar plugin… I saw yours but I wasn’t crazy about the modification of core files, so I wrote my own upload script. It uploads a JPG, GIF, or PNG file under 20kb, with a fixed resolution of 64×64 px. If any of these conditions aren’t met, it spits out an error.

    If your username is UserName, then the file is named username-avatar.gif or whatever image extension is.

    I have a simple detection script for the image in the file post.php. It works for now, but I’d like something a little better. If you’d like a peek at the code just let me know.

    I’m working on a PM system, and a post preview “plugin”… it’s slow going though, as college gets in the way quite a considerable bit.

    Thanks,

    Mike

    #51994
    ardentfrost
    Member

    If you go to bb-includes/functions.php you’ll see a function called “get_profile_info_keys()”

    This function holds the data you want, but you don’t want to adjust that file directly since it’s a core file, however, in the current release of my avatar plug-in, you do have to change that line.

    But if you notice, it says return apply_filters( 'get_profile_info_keys', yadda yadda );

    Anywhere it says “apply_filters” you can make your own.

    So I haven’t done this myself yet, though now that I look closer at it, I think I’m going to rerelease my avatar plugin with this change.

    Make a plug-in file in your my-plugins directory and put this in it:

    add_filter( 'get_profile_info_keys', array('user_email' => array(1, __('Email')), 'user_url' => array(0, __('Website')), 'from' => array(0, __('Location')), 'occ' => array(0, __('Occupation')), etc....

    And just keep adding stuff til you have everything you want. the ‘1’ in the “Email” part means that it’s required during registration. Everything else is 0’s because they are not required fields… you can, of course, change this.

    #51983
    so1o
    Participant

    a small mistake.. its bb_get_header() :)

    cheers!

    #51981
    so1o
    Participant

    there are two things you have to do..

    1. one change the topic tempalte to remove the call to topic_resolved()

      <li id="resolution-flipper"><?php _e('This topic is') ?> <?php topic_resolved(); ?></li>

    2. fix get_views() in the functions.php

      to that just write a plugin to remove the unwanted options from the views

      function my_no_support_views($views) {

      return array_diff($views, array('unresolved' => __('Unresolved topics')));

      }

      add_filter('bb_views', 'my_no_support_views');

    #1042
    ardentfrost
    Member

    I thought the secret to making a new page that is included into the bbpress fileset is to add the require_once('./bb-load.php');

    However, this must not be the secret because it doesn’t let me do stuff like get_header(). On the other hand, it sees my plugin file and gets the information I want from it.

    What am I doing wrong? I have a file dropped into the http root with the require_once and then requiring the work page in my-templates, but nothing inside the my-templates file works (ie. no bbpress functions in the file work).

    #51161

    In reply to: Private Forum script

    so1o
    Participant

    nothing prevents you from doing that… only thing is tomorrow if you change the template you will have to have this code there too..

    if you keep it in a plugin file in the my-plugins dir it will automatically come thru with the new files..

    cheers

    #51979
    so1o
    Participant

    try changing

    $bb->domain = 'http://www.wonderliver.com/bbpress';

    $bb->path = '/';

    to

    $bb->domain = 'http://www.wonderliver.com';

    $bb->path = '/bbpress/';

    #1040
    mkyb14
    Member

    A clean install of .73 with it’s own mysql NO wordpress integration

    After installing everything went fine till after logging in to do anything! The main screen is displaying just fine, but any links clicked after give the cookie issue below… and yes I have looked at the other postings but the all incorporate WP which I’m not. Regardless, I’m not refusing cookies so I’m at a loss as to why it would say this and refuse every other page but the dashboard…

    Thank you for your help, the error is displayed below

    Wonderliver.com/bbpress

    The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete

    * This problem can sometimes be caused by disabling or refusing to accept cookies.


    <?php

    define(‘BBDB_NAME’, ‘bbpress’); // The name of the database

    define(‘BBDB_USER’, ‘*******’); // Your MySQL username

    define(‘BBDB_PASSWORD’, ‘*******); // …and password

    define(‘BBDB_HOST’, ‘************’); // 99% chance you won’t need to change this value

    $bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!

    $bb->domain = ‘http://www.wonderliver.com/bbpress&#8217;; // Example: ‘http://bbpress.example.com&#8217;

    $bb->path = ‘/’; // Example: ‘/forums/’

    $bb->name = ‘WonderLiver’;

    $bb->admin_email = ‘admin@gmail.com’;

    $bb->mod_rewrite = false;

    $bb->page_topics = 30;

    $bb->edit_lock = 60;

    $bb->gmt_offset = 0;

    define(‘BBLANG’, ”);

    $bb->akismet_key = false;

    $bb->wp_table_prefix = false; // WordPress table prefix. Example: ‘wp_’;

    $bb->wp_home = false; // WordPress – Options->General: Blog address (URL) // No trailing slash

    $bb->wp_siteurl = false; // WordPress – Options->General: WordPress address (URL) // No trailing slash

    /* Stop editing */

    define(‘BBPATH’, dirname(__FILE__) . ‘/’ );

    require_once( BBPATH . ‘bb-settings.php’ );

    ?>

    #49533
    Trent Adams
    Member

    define('WP_BB', true);

    and

    $bb->wp_home = 'http://www.yoursite.com; // WordPress - Options->General: Blog address (URL) // No trailing slash

    $bb->wp_siteurl = 'http://www.yoursite.com'; // WordPress - Options->General: WordPress address (URL) // No trailing slash

    Hope that helps.

    Trent

    #51730
    spencerp
    Member

    I would love to see something like sub-forums implemented into bbPress earlier in the “game”. I think that would be so awesome. phpBB hasn’t even gotten to that “point” until phpBB3 beta or whatever.. lol!

    I know it might not work, and function extacly like “that”, but.. atleast it’s a start of it.. ;) :)

    spencerp

    #51155

    In reply to: Private Forum script

    topiq
    Member

    where do i have to put this code? in the header.php file? and whats the difference between the first post’s code? can you restrict the user group of a forum with this one?!

    #51555
    ardentfrost
    Member

    you can do

    echo get_user($topic->topic_last_poster);

    EDIT:

    Oops, better way

    echo $topic->topic_last_poster_name;

    #51554
    Null
    Member

    Perfect thank you so much

    One more question, this way I can also add things like topic_poster right?

    Can you give me one more excample of how to add the topic poster to this code as well? I think I get the hang of this and can figure things like topic_time etc out myself if I get that last part I asked!

    Greetz

    #51553
    so1o
    Participant

    <?php

    foreach($forum_one_topics as $topic) :

    $forum_one_topic_posts = get_thread( $topic->topic_id);

    ?>

    <?php topic_title(); ?><br/>

    <?php

    echo $forum_one_topic_posts[0]->post_text;

    endforeach;

    ?>

    #51552
    Null
    Member

    Made some changes, but this works:

    <?php

    $forum_id = 1;

    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC LIMIT 0,10") ?>

    <?php foreach($forum_one_topics as $topic) :

    ?>

    <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><br />

    <?php endforeach; ?>

    but it doesnt show the typed text only the title of the forum. What to add to also show the typed text (NOT the replies ofcourse)

    Many thx

    #51551
    so1o
    Participant

    sorry Null .. but this is the core code.. that will give you the topics..

    you will have to write a loop to display the topics eg:

    $forum_id = 1;

    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC LIMIT 0,10")

    foreach($forum_one_topics as $topic) :

    ?>

    <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>

    <?php

    endforeach;

    again: i warn watch where you put it. there are a lot of global variables. dont put in place where you are displaying other topics and stuff

    #51550
    Null
    Member

    Ow I forgot the forum_id…

    K I now have this in frontpage.php:

    <?php

    $forum_id = 1;

    $topics = $bbdb->get_results(“SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC LIMIT 0,10”) ?>

    This takes away the error but doesn’t display anything either..

    Greetz The Noob :)

    It can be done by a plugin, using the actions bb_new_user and extra_profile_info.

    But the problem would be, that an random password must be generated (no access to tweak insert-function) and then updated to the password the user has chosen. The the user would receive an email with his random password and not with his chosen password. This isn’t cool :(

    Does somebody know, if there is a plugin-way to overwrite/rewrite a whole function (like bb_new_user();)?

    #51667
    spencerp
    Member

    You’re awesome thomasklaiber!! Thanks so much!! :) ;) Once I get my new domain name situated and stuff, Im going to install it.. thanks again!

    spencerp

Viewing 25 results - 31,926 through 31,950 (of 32,411 total)
Skip to toolbar