lordcoder (@lordcoder)

Forum Replies Created

Viewing 20 replies - 1 through 20 (of 20 total)
  • @lordcoder

    Member

    K , thanks thomasklaiber , i ill create a new plugin so i don’t lose the changes on a specific update :P

    PS : i am from Morroco , but i can speak French , German , English …

    @lordcoder

    Member

    Ok the problem is solved by using this function instead of the default profile_menu :

    function profile_menu() {

    global $bb, $bbdb, $bb_current_user, $user_id, $profile_menu, $self, $profile_page_title, $bb_table_prefix;

    $user_id=(isset($user_id)) ? $user_id : $bb_current_user->ID;

    $list = "<ul id='profile-menu'>";

    $list .= "nt<li" . ( ( $self ) ? '' : ' class="current"' ) . '><a href="' . get_user_profile_link( $user_id ) . '">' . __('Profile') . '</a></li>';

    if ( isset( $profile_menu ) ) :

    foreach ($profile_menu as $item) {

    // 0 = name, 1 = users cap, 2 = others cap, 3 = file

    $class = '';

    if ( $item[3] == $self ) {

    $class = ' class="current"';

    $profile_page_title = $item[0];

    }

    if ( can_access_tab( $item, $bb_current_user->ID, $user_id ) )

    if ( file_exists($item[3]) || function_exists($item[3]) )

    $list .= "nt<li$class><a href='" . wp_specialchars( get_profile_tab_link($user_id, $item[0]) ) . "'>{$item[0]}</a></li>";

    }

    endif;

    $list .= "n</ul>";

    echo $list;

    }

    @lordcoder

    Member

    Ok if my PHP/MySQL knowledge is still good , the plugin must , on the first use , add a new collumn to bb_topics table ( named for example cat_id ) , and a new table titled bb_cats .

    On each use of the plugin , it must check if everything is good ( the collumn cat_id , the table bb_cats ) before continuing , and if not , it must display the default structure of the forum .

    To perform this last , there must be new template tags which can be ignored if the plugin installation is wrong , so the plugin needs its proper template file …

    We know that the goal of BBPress is to be light and fast , so if you code all the things above and use them on a plugin , BBPress will be slower , i think like PunBB …

    So my tip is ; don’t use categories , try to remove no useful forums , merge some forums if they are similar , and you’ill have a good order without categories .

    @lordcoder

    Member

    Ok , i see that my messages are incomprehensible ( normal , i am not a native english speaker ) , i ill try again ( my english will suck a little :P ) .

    I have this on my my-templates/footer.php :

    <?php if ( $bb_current_user->ID ) : ?>

    <li><h2 class="vcard">Profile</h2></li>

    <li>

    <?php profile_menu(); ?>

    </li>

    <?php endif; ?>

    My goal is to display the avaible profil options for the connected user if no other user’s profil is viewed .

    But it doesnt work until i dont go to another user’s profil and displays this error :

    Warning: Invalid argument supplied for foreach() in /home/httpd/bouazza/bouazza.franceserv.com/sbouazza/forums/bb-includes/template-functions.php on line 59

    And only one item is viewed , Profile , and it contains a bad link ( http://bouazza.franceserv.com/sbouazza/forums/profile/, without an user ID ) .

    But if i am viewing an user’s profil , the menu is correctly displayed , and allthing is fine .

    I Hope I can get more replys now .

    Thanks !

    PS : It will be great if we can speak here on this board in another language like French , German … espiecially for guys like me who ar’nt familiar with English :P .

    Bouazza .

    @lordcoder

    Member

    No one ?

    @lordcoder

    Member

    I edited correctly the message , sorry if it was incomprehensible .

    I use that code on footer.php without modifying de template-functions.php file .

    Normally , it shows only the profil menu if a user’s profil is viewed , but i wanted that the profil menu will be displayed using the current user’s settings if no profil is viewed .

    @lordcoder

    Member

    Thanks ardenfrost , i ill use get_topic_resolved .

    @lordcoder

    Member

    Is the SAFE_MODE on ?

    @lordcoder

    Member

    where’s blix located ? on bbpress or wordpress templates folder ?

    @lordcoder

    Member

    You need to change themes tags to bbpress ones , but like i do’nt have anything to do today , i ill do that for you ;-)

    @lordcoder

    Member

    Awesome :D

    @lordcoder

    Member

    K , thanks !

    @lordcoder

    Member

    so that means i can have 10MB of topic in my forums, right?

    Yes but its anything like 9,9 or low , because the table and collumn names take also place on your MySQL space , but like ranrar said , the size is’nt important .

    @lordcoder

    Member

    Ok i found the solution on another thread here : https://bbpress.org/forums/topic/168?replies=6#post-874 .

    In reply to: Avatars

    @lordcoder

    Member

    Thanks Atsutane , $user->user_email is what i searched for !

    @lordcoder

    Member

    Ok , i ill look at the included php files .

    In reply to: Avatars

    @lordcoder

    Member

    No , there’s a very simple way , simply use this url as the image url :

    http://www.gravatar.com/avatar.php?gravatar_id=MD5

    MD5 should be replaced by the md5 hash of the poster’s email address .

    Look at the “How the URL is constructed” section on http://gravatar.com/implement.php if you need more options like the size , rating …

    In reply to: Avatars

    @lordcoder

    Member

    Hello ,

    try http://gravatar.com/ .

    @lordcoder

    Member

    Thanks for your help !

    @lordcoder

    Member

    Thanks very much for your help !

Viewing 20 replies - 1 through 20 (of 20 total)