mkay this acc works, BUT (im sorry if you find my questions moronic but if I dont ask I will never learn...) the (script) works but now i reggs me as Online even when I have logged out, do i have to check for cookie or similar? The thing I'm trying to fix is a small "community" function where I use the login from punbb's database and add other functions to another DB that will hold the userpage and such tongue?

ohh the code:

<?php if($pun_user['1'])
                {
                    echo ' logged out ';
                }
                else
                {
                    echo ' logged in';   
                }
                ?>

tyvm

Hello dear community I need some fast help with this:

<?php if( $user_id = '1' )
                {
                    echo '
                        guest
                    ';
                }
                else 
                {
                    echo '
                           logged in
                     ';    
                }
                ?>

This should according to my "PRO" reasoning give a logged in IF i've logged in at the forums? But it won't so I'm guessing that there is something wrong with PunBB, now you make this work! (kidding) anyone that can explain what I've done wrong?

4

(2 replies, posted in PunBB 1.2 troubleshooting)

Okay I have a minor problem, I've tried searching for a automated user removal (cause I have over 200 bots in my userlist...) I need a fast simple tool to remove all bots that have 0 posts...

Okay so just check in what the tables are and such?

Well here is the thing: I've used Punbb since god knows when, and I want my webpage to have a login and a register on the mainpage. I've tried the other script that has been here for a while but that just don't work.

So what I really need is a easy guide and some nice copy-pasta code that I can use. But To learn more I just want to know how to use the dblayer in a file were I've called for common.php I know php (a fairly small bit) and I know how to connect to a db but I want it secure and i certainly don't want alot of connect to db scripts lying around in my webfolder if I can call the db with a simple $dblayer function?

Okay here is my questions:

First Smartys how do I integrate the dblayer command (I know I'm dumb but I can't seem to wrap my head around this code at all) I've tried the login (from waaay back) that exists but that wont work for me at all.

Secondly I'm guessing that I can use this in a method post call right?

Please disregard any of this if it makes no sense tongue

8

(2 replies, posted in PunBB 1.2 troubleshooting)

ahh thanks missed that loooong line sad

9

(2 replies, posted in PunBB 1.2 troubleshooting)

Well here is my Q what file is it that makes the banned page? the one that the offender gets to see? Is it possible that you can point it out or is it the index.php file with a special msg? This is cause I use one template on my site and another on the forums therefore it looks silly when you are banned getting a html only page... Thanks in advanced

10

(2 replies, posted in PunBB 1.2 troubleshooting)

dough!

Okay here my problem, www.b-landia.com got the usual integration + login mods

<?php
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
define('PUN_ROOT', 'forums/');
include ('./inc/login.php');
require PUN_ROOT.'include/common.php';
?>



but the problem is that the site don't seem to work anymore the code:
<?php
if ($pun_user['is_guest']) {
  echo "tis an taht";
    }
else {
echo "Nope?";
}
}
?>

this code should show something IF you were logged out but it don't seem to work, can you point me in the right direction?

Okay I want to add a really simple function to my forums, because of the fact that I can't do any PHP (almost) at all makes it a bit harder. I want to add in users viewable profile "games I play". this should be fixed by the users themselfs by checking boxes for eg : CS1.6 and so on. I wonder if there is any forum that got this function or you know someone that can help me out.

(i dunno if this is the right spot to put this)

13

(2 replies, posted in PunBB 1.2 troubleshooting)

Sorry to bother you again, this problem has occured recently, what should i do (linux host now)?

Error: Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory 'cache'.

Okeys, well still i was only wondering about the code at this point (it worked perf before) and thought there might be som IIS hosting problems?

det funkar att lägga till turn of maint... koden som finns under dokumentationen osså för loggin och admin.php (inte att rekomendera tongue

Okey, here is the deal, ive talked to my host and all (so im not blaming this on punbb) but is it possible that it can crash a windows IIS server just cause of the lines on my index.php file were i intigrate my ./forum/include/common.php file?

Currently my host is blaming me and my programing leetness for the problems that has arrisen:
1.

<?php
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
include 'include/login.inc.php'
?>

This text is at the top of my index.php ive included login and some stats. And the host says : the common.php aint there. Ive understood that he looked in my root folder for a include/ folder and there arent any there.

(just wanna check that the code is right with you)

2. I uploaded the file to my brand new include/ folder to big_smile (yeah that will generate problems) but anyways to shut up my host. So restart (without the php code though) and wee it works

3. Then i tested adding the "code" again and suddenly the server died... why o why is this happening it worked for like 2 months is this only the hosts fault or have ive done something???

Ask more if i were to dumb to miss anything...

yeah my folder structure looks like this:

ca tongue

| root
\
forums <- Got the common.php in the include folder
include <- Also got an common.php + some extra scripts (news in main and login)
img
style

adding my index code to

<?php

define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
include 'include/login.inc.php'

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv">

    <head>
    
        <title>B-landia :: Index</title>
        
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        
        <link href="./style/blandia.css" rel="stylesheet" type="text/css" />
        
        <?php include('include/google.php'); ?>
        
    </head>

<body onload="javascript:hasIE_hideAndShow();">

    <?php include('include/ie.php'); ?>
    
<div class="page">

    <!----Begin the LOGO/MENU area !---->

        <div class="header">
        
            <div id="logo">
                    
                <?php include('include/logo.php'); ?>
                
            </div>
            
            <div id="meny">
            
                <?php include('include/meny.php'); ?>
            
            </div>
        
        </div>
        
    <!----Begin the TEXT area !---->
    
        <div class="site">
        
            <div id="text">
            

                    
            </div>
        
        </div>
    
    <!----Begin the LOGIN/INFO area !---->
        
        <div class="middle">
            
            <div class="login">
                            
                <?php login_menu(); ?>
                
            </div>
            
            <div class="info">
             
                <?php include('http://b-landia.net/forum/extern.php?action=stats'); ?>
             
            </div>
             
        </div>
    <!----Begin the FOOTER area !---->        
    
        <div class="footer">
        
            <?php
    
            echo ("Det tog ");
            $execute = microtime();
            print (number_format($execute,4));
            echo (" sekunder att läsa sidan.");
            
            ?>
    
        </div>
    
</div>

<div class="add">

    
</div>

</body>

</html>

Im wondering where to find or how to show the logged in users avatar on frontpage?

I have tried in the faq about integration but it wont work, i also looked around in viewtopic but im not so good at php so i dont know
how to show the avatar, so please help me big_smile