Bloody wrote:

Yeehawjared, Great job. smile
A little question where in WP,  you have code of your login menu ? It's your own plugin ?

Not using WordPress - custom CSS for the layout.  The php code is posted above.  Let me know if you run into any problems.


in login.php change the last line (i think this is how i did it, it's been a long time)

if (isset($_POST['form_sent']) && $action == 'in')
{

   ...
   ... (lots of stuff here)
   ...
    

    redirect(htmlspecialchars($_POST['redirect_url']), $lang_login['Login redirect']);
}

hook me up with a digg if you've found this helpful... thanks!!
http://digg.com/music/Work_on_your_guit … ar_players

easy... here's the php I use for my login menu at the very top (which changes options when someone is logged in).  Basically if user == guest, show them A if not (else) show B.

function login_menu(){
    global $pun_user;
    if ($pun_user['is_guest']){
        $stroutput= '
        <form id="login" method="post" action="/forum/login.php?action=in" onsubmit="return process_form(this)">
        <p>
        <input type="hidden" name="form_sent" value="1"/>
        <input type="hidden" name="redirect_url" value="'.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'"/>
        <label for="req_username">user / pass</label>
        <input type="text" id="req_username" name="req_username" size="10" maxlength="25"/>
        <label for="req_password"></label>
        <input type="password" id="req_password" name="req_password" size="10" maxlength="16"/>
        <input type="submit" name="login" value="Login" class="submit"/>
        [<a href="/forum/register.php">Register</a>] 
        </p>
        </form>
    ';
    }else{
        $stroutput= '<p>Logged in as: '.pun_htmlspecialchars($pun_user['username']).' [<a href="/forum/login.php?action=out&id='.$pun_user['id'].'">Logout</a>]</p>';
    }
    echo $stroutput; 
}

I'm actually not using WordPress... 100% hand coded CMS in PHP.  I hand coded the upload as well, using uber-upload.
http://uber-uploader.sourceforge.net/

I wrote some linux shell scripts that convert the incoming videos to FLV using ffmpeg. Feel free to shoot me any php questions  you may have, but I won't be able to help with WP, as I've never used it.

4

(1 replies, posted in PunBB 1.2 show off)

http://www.guitarvideotabs.com/

On the home page you'll see recent forums posts.  The authentication at the top is also handled by GVT.  If you're logged in and upload a tab, you'll get credit for it.

thanks a lot...  100% hand coded in php...  You wouldn't believe the amount of time I've poured into this project!  Should be great when the next version of PunBB comes out - the clean URL option is very attractive.  Thanks again for the comment, hope this site really takes off!

http://www.guitarvideotabs.com/

I integrated site authentication on every page, as well as last X forum posts onto the main page.

If anyone needs help / code just let me know.  By the way, the site just went live today so there isn't much content in the forums yet.

edit:
help digg this to the front page of digg.com if you like this site smile
http://digg.com/music/Work_on_your_guit … ar_players

Here's the code I'm currently using.  Notice the hard linking of forum/login.php in the HTML

<?php
 define('PUN_ROOT', './forum/');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'include/parser.php';

 
// Show login if not logged in
if($pun_user['is_guest'])
{
    if(!isset($focus_element) || (isset($focus_element) && !in_array('login', $focus_element)))
    {
 
    // Load the language files
    require PUN_ROOT.'lang/'.$pun_user['language'].'/common.php';
    require PUN_ROOT.'lang/'.$pun_user['language'].'/login.php';
 
    // Set the $redirect_url to this page, 
    $redirect_url = '' ;
    if(isset($_SERVER['REQUEST_URI'])) {
        $redirect_url = $_SERVER['REQUEST_URI'] ;
    }
 
    $required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']);
 
?>
        <div class="logintop">
            <form id="login" name="login" method="post" action="forum/login.php?action=in" onsubmit="return process_form(this)">
                <p>
                    <input type="hidden" name="form_sent" value="1" />
                    <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
                    <?php echo $lang_common['Username'] ?>:
                    <input type="text" name="req_username" size="16" maxlength="25" />
                     <?php echo $lang_common['Password'] ?>:
 
                    <input type="password" name="req_password" size="16" maxlength="16" />
                     <a href="#" onclick="document.login.submit(); return false"><?php echo $lang_common['Login'] ?></a>  |  <a href="register.php"><?php echo $lang_common['Register'] ?></a>
                </p>
            </form>
        </div>
<?php
    }
}else
{
?>
        <div class="logintop">
            <p>
                <?php echo $lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong>  |  <a href="forum/login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>'; ?>
            </p>
        </div>
<?php
}
?>