Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,101 through 31,125 (of 32,432 total)
  • Author
    Search Results
  • #54237
    Geezerjim
    Participant

    Outstanding. Works as advertised. ;-)

    Now I have to “borrow” your path structure and fix my graphic-display-ranks plugin

    #54234
    ardentfrost
    Member

    just hardcode it. Change BBPLUGINDIR to “/my-plugins”

    #54152

    In reply to: 404 upon innstall

    Scoop0901
    Member

    You have the new link for Customizing Permalinks? If so, could you please send it to me in email? I have a contact form on my site. I followed the Documentation link, but it isn’t there any longer. Not having a search function on the site hurts. Ouch. :(

    TIA,

    -dave

    #54228

    I’m stumped then. You win the prize :) !

    #1370
    Geezerjim
    Participant

    I’m having a problem with the plugin bb-ratings using 0.8

    I think the problem is here:

    <img src="<?php bb_option( 'uri' ); echo BBPLUGINDIR; ?>/star.gif" />

    From the source code:

    <img src="http://www.brightandearlyblog.com/bbPress//home/brightan/public_html/bbPress/my-plugins//star.gif" />

    #54150

    In reply to: 404 upon innstall

    Trent Adams
    Member

    I would imagine that you have the following in config.php:

    // Set to true if you want pretty permalinks.
    $bb->mod_rewrite = true;

    Maybe change that to the following until you get the install up and running:

    // Set to true if you want pretty permalinks.
    $bb->mod_rewrite = false;

    After that, head over to the documentation => Custimization = > Permalinks of the navbar at the top.

    Trent

    #54224
    Trent Adams
    Member

    I am sure Micheal can fix this quickly, but maybe try this until he gets around to it:

    <?php
    /*
    Plugin Name: Force Login
    Description: No one can see your forums unless they are logged in.
    Plugin URI: https://bbpress.org/forums/topic/117
    Author: Michael D Adams
    Author URI: http://blogwaffe.com/
    Version: 0.7
    */
    function force_login_init() {
    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {
    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {
    require( BBPATH . 'my-templates/kakumei/front-page.php' );
    } else {
    require( BBPATH . 'bb-templates/kakumei/front-page.php' );
    }
    exit;
    }
    }
    add_action( 'bb_init', 'force_login_init' );
    ?>

    I just hardcoded the new template directory. Not a long term fix. mdawaffe will have a fix soon enough!

    Trent

    #54220

    Hey, that’s me! :)

    Try this:

    <?php
    /*
    Plugin Name: Force Login
    Description: No one can see your forums unless they are logged in.
    Plugin URI: https://bbpress.org/forums/topic/694
    Author: Michael D Adams
    Author URI: http://blogwaffe.com/
    Version: 0.7
    */

    function force_login_init() {
    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') && false === strpos($_SERVER['REQUEST_URI'], 'bb-reset-password.php') ) {
    bb_load_template( 'login.php' );
    exit;
    }
    }

    add_action( 'bb_init', 'force_login_init' );

    ?>

    #1369
    pg2design
    Member

    I tried something… I changed the User Type to Blocked for the main user, the only user… And it worked… I couldn’t use bbpress anymore…

    Is this a bug? The user shouldn’t be able to disable itself… :)

    #54217
    zapata
    Member

    Trent… don’t remember where I picked it from it’s called the Force-login… did someone here give me the code and I copied and pasted it… not sure… here’s the code…

    <?php
    /*
    Plugin Name: Force Login
    Description: No one can see your forums unless they are logged in.
    Plugin URI: https://bbpress.org/forums/topic/117
    Author: Michael D Adams
    Author URI: http://blogwaffe.com/
    Version: 0.7
    */
    function force_login_init() {
    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {
    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {
    require( BBPATH . 'my-templates/front-page.php' );
    } else {
    require( BBPATH . 'bb-templates/front-page.php' );
    }
    exit;
    }
    }
    add_action( 'bb_init', 'force_login_init' );
    ?>

    Haven’t checked it the bbpress-integration (bbpress-wp same users share) is working or not.

    #54215
    Trent Adams
    Member

    Post a link to the plugin you are using or the code for it. We can fix it quickly here for the login only plugin. The display name is on the plugins site. We can fix that one after fixing your Important issue first.

    Trent

    #54204

    Please don’t put anything in bb-templates! This will be problematic for you later.

    Put your templates in a subdirectory of my-templates/ :)

    Check out https://bbpress.org/documentation/themes/

    #54138

    In reply to: Unique Style Sheet?

    Trent Adams
    Member

    Glad to here! Maybe a few release templates for bbPress then ;)

    Trent

    #54136

    In reply to: Unique Style Sheet?

    Trent Adams
    Member

    It seems goofy to be discussing WP on a bbPress forum, but this is important for theme integration between the 2. Here is my login form in my sidebar (well ex sidebar as I use wordpress.com now). I use a conditional to welcome the user or display the login form.

     <li id="login">
    <?php
    global $user_ID, $user_identity;
    get_currentuserinfo();
    if (!$user_ID):
    ?>
    <label for="s"><?php _e('Login:'); ?></label>
    <ul>
    <li>
    <form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
    <div><label><?php _e('Login') ?>:<br /><input type="text" name="log" id="log" value="" size="15" tabindex="7" /></label><br />
    <label><?php _e('Password') ?>:<br /> <input type="password" name="pwd" id="pwd" value="" size="15" tabindex="8" /></label><br />
    <input type="hidden" name="rememberme" value="forever" />
    <input type="submit" name="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="9" /><br />
    <?php wp_register('', ''); ?>
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/></div>
    </form></li>
    <li><script type="text/javascript">slvBanner();</script></li></ul>
    <?php
    else:
    ?>
    <label for="s">Welcome <?php echo $user_identity; ?>!</label>
    <ul>
    <?php wp_register(); ?>
    <li><a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&amp;redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a></li>
    </ul>
    <?php
    endif;
    ?>
    </li>

    Trent

    #54135

    In reply to: Unique Style Sheet?

    macwise
    Member

    So, maybe my problem is that I haven’t included ALL the code from wp-login in the sidebar…instead I’ve just included the code necessary to get them redirected to the wp-login.php to actually be logged in…Here’s what it looks like. Maybe you can make sense of it:

    <!--BEGIN SIDEBAR-->
    <?php

    $user_login = '';
    $user_pass = '';
    $using_cookie = false;
    if ( !isset( $_REQUEST['redirect_to'] ) )
    $redirect_to = 'wp-admin/';
    else
    $redirect_to = $_REQUEST['redirect_to'];

    if( $_POST ) {
    $user_login = $_POST['log'];
    $user_login = sanitize_user( $user_login );
    $user_pass = $_POST['pwd'];
    $rememberme = $_POST['rememberme'];
    } else {
    $cookie_login = wp_get_cookie_login();
    if ( ! empty($cookie_login) ) {
    $using_cookie = true;
    $user_login = $cookie_login['login'];
    $user_pass = $cookie_login['password'];
    }
    }

    do_action('wp_authenticate', array(&$user_login, &$user_pass));

    ?>

    <span class="sidenav_top">&nbsp;</span>
    <ul class="sidenav_body" style="">
    <li><h2>Login:</h2></li>

    <?php

    global $userdata;
    get_currentuserinfo();
    global $user_identity;

    if (!$userdata) {
    ?>

    <li style="padding-left: 10px; overflow: hidden;">
    <form name="loginform" id="loginform" action="/wp-login.php" method="post">
    <p style="margin: 0px; height: 25px; width: 175px;">
    <label style="font-size: 11px; text-align: right; width: 76px; display: block; float: left; clear: left;"><?php _e('Username:') ?>&nbsp;</label>

    <input style="float: right;" type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="13" tabindex="1" />
    </p>
    <p style="margin: 0px; height: 25px; width: 175px;">
    <label style="font-size: 11px; text-align: right; width: 76px; display: block; float: left; clear: left;"><?php _e('Password:') ?>&nbsp;</label>

    <input style="float: right;" type="password" name="pwd" id="pwd" value="" size="13" tabindex="2" />
    </p>
    <p style="margin: 0px; height: 22px; float: right; margin-right: 10px; clear: both;">
    <label style="font-size: 12px;"><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
    <?php _e('Remember me'); ?></label></p>
    <p class="submit" style="height: 35px;">
    <input style="float: right; clear: both; margin-right: 10px;" type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="4" />
    <input type="hidden" name="redirect_to" value="index.php" />
    </p>
    </form>

    I am guessing the difference between how I have it set up and how you have it is that I am sending the user to wp-login whereas you are authenticating right there on that page. I tried to get the sidebar to do all the work, but I ran into errors I couldn’t fix on my own…do you have a suggestion for how I might handle the logins in the sidebar? Do you maybe have code I can look at to see how you’re doing it?

    #54133

    In reply to: Unique Style Sheet?

    macwise
    Member

    Once again, I think this is done by default. WP has its theme and content. bbPress has its theme and content.

    As usual..more details.

    I am really trying to use elements from wp on the bb side, such as sidebar…so I’m calling

    <?php get_sidebar(); ?>

    on pages like this one:

    http://babyquestions101.com/forum/

    However, I have so many questions as to how to handle the login box in sidebar…Should it:

    – Go to BBPress login/register page always (wp or bb)

    – Go to WP login/register page always

    – Go to respective login/register pages depending on which side the click originated?

    Then, depending on that configuration, redirect questions ensue.

    I know this is probably a matter of preference, but I’m indifferent, and wondering what will overall be the best solution for the user. Any suggestions will be greatly appreciated.

    – Login Redirects to last visited page

    It seems to me that if you are integrated, both bbPress and WP use the wp_users table in the database so wherever you login will be redirected to the last visited page (as both programs do this now). It is easy to have th login in the header.php of your template in bbPress and just adding the login box to WP in sidebar also has login on every page.

    I have already made a tweak to the redirect in wp-admin to go back to the homepage in wp. I did this because it was redirecting to the profile.php page when a user logged in, instead of to the last page they were visiting. Is that the default behavior, or did I miss something? I am on wp v.2.0.5, so maybe something has changed in version 2.1 which changes this behavior?

    Ron

    #54180
    wpmaniac
    Member

    Patience my young padawan :)

    Soon!

    Soon, like today? Or soon like this month?

    I’m putting together a new install today and might as well wait for the current version if it’s coming soon!

    Thanks.

    #54179
    Null
    Member

    Think we have a fan :D

    #54178
    macwise
    Member

    It’s better than Christmas…

    But really, I have to say that even though I am much more familiar with phpbb, and even though it has a (currently) larger, more active community, and even though there are many more features, I chose to stick with bbpress to integrate with wordpress.

    First of all, the integration process, though buggy now, will no doubt only get simpler and cleaner. I also expect to soon see the types of features that I need, and a shortage of the code that I can do without.

    In fact, my decision may even have been in part due to the “code is poetry” which is written at the bottom of each page, but more importantly in the code. I’m excited to see the developments, and would even like to get to the point where I can lend a hand to the community like others are.

    #54173
    #54172
    Trent Adams
    Member

    What did you do to get the extra grey box above the username and profile information in the past 2 minutes? I haven’t looked to close, but need to do that on the bbPress forums theme release. (Maybe email the one you are using instead) ;)

    Trent

    #54171

    ;)

    All set, I think.

    #54177

    Patience my young padawan :)

    Soon!

    #54164
    Trent Adams
    Member

    Upcoming eh…. ;)

    Trent

    #54065

    In reply to: 8.0

    mozey
    Member

    wow wow, hold on!,

    you posted -1 year ago. WOuld’nt that make you,,,, hold on!, double negative!. so yeahh your right!. :) early!

Viewing 25 results - 31,101 through 31,125 (of 32,432 total)
Skip to toolbar