The online racing simulator
Searching in All forums
(363 results)
T3charmy
S3 licensed
Coming soon: UK Based LFS servers

Thanks to one of my new good friends, we will now be setting up servers based in London
T3charmy
S3 licensed
Here it is: ... a better readme is coming... but this should do for now

http://dl.dropbox.com/u/10898783/PRISM-Cruise/index.html
T3charmy
S3 licensed
Expect some down time tomorrow, not that really anyone goes on our server as we will be upgrading our server to a quad core CPU

Seems like our web server is experiencing some problems, should be fixed by tonight
Last edited by T3charmy, .
T3charmy
S3 licensed
i was still sick for the past 2 days, so i haven't had time to fix the bug, so i will try finish it up tomorrow :P
T3charmy
S3 licensed
Its not done(never will be) but it has all of the basic functions to be called cruise

I still have to add:
  • Cop system
  • Road Names
  • Bank
  • PM system
  • Fix some small issues
I will be releasing this by the end of tomorrow... i just have to fix some small bugs with !cruise buy
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from cargame.nl :I downloaded PRISM again in a clean directory just to be sure and even tried older versions like 0.3.2 but no go

I visited two servers of you yesterday to triple check but no PRISM seemed to be running at that time.

ye, my team, is changing yet again, and the dedi has been restarting a lot(were changing the data center it is hosted at... my friend who owns the server is starting to piss me off... it is off every hour or so now... and i traced the server back, and the server was hosted at his house (facepalm) so i don't know if he went to Chicago and took his servers back or what... I just want the dang server to be on long enough so i can test everything(then again i do have PHP installed on this computer...)
T3charmy
S3 licensed
Quote from Dygear :I have no idea, I'll look into it.

It works for me... only thing i changed on it was the change in time format(which was pushed into one update)

@cargame, Try this...


<?php 
php
class table extends Plugins
{
    const 
NAME 'Table Plugin Example';
    const 
AUTHOR 'misiek08';
    const 
VERSION PHPInSimMod::VERSION;
    const 
DESCRIPTION 'Plugin to generate button table. Can be used for showing results or other info.';

    private 
$data = array(array('test''test2''test3'),array('teste''teste2''teste3'),array('tester''tester2''tester3'));
    private 
$header = array('1st''2nd''3rd');
    private 
$width 10;
    private 
$height 8;
    private 
$x 50;
    private 
$y 50;

    
/* Remember about this:
        define('IS_X_MIN',    0);
        define('IS_X_MAX',    110);
        define('IS_Y_MIN',    30);
        define('IS_Y_MAX',    170);
    */

    
public function __construct()
    {
        
$this->registerSayCommand('prism table''cmdTable'"Shows defined in code table for used.");
        
$this->registerSayCommand('prism deltable''deltable''test');
    }
    public function 
cmdTable($cmd$UCID)
    {
        
$cols count($this->header);
        
$rows count($this->data);
        
$id 70;
        for(
$i 0$i $rows$i++){
            for(
$j 0$j $cols$j++){
                
$this->createButton($UCID,
                
$id,
                 ((
$j 1) * $this->width) + $this->x,
                 ((
$i 1) * $this->height) + $this->y,
                  
$this->width,
                   
$this->height,
                   
$this->data[$i][$j]);
                   
$id ++;
                   echo ((
$i 1) * $this->height) + $this->PHP_EOL;
            }
        }

        return 
PLUGIN_HANDLED;
    }

    private function 
createButton($UCID$id$x$y$w$h$text){
        
$btn = new IS_BTN();
        
$btn->UCID($UCID)
            ->
L($x)
            ->
T($y)
            ->
ClickID($id)
            ->
W($w)
            ->
H($h)
            ->
Text($text)
            ->
Send();
    }

    public function 
deltable($cmd$UCID)
    {
        
$MSX = new IS_MSX;
    
$MSX->Msg('test, '.$UCID)->Send();

        
$btnrem = new IS_BFN();
        
$btnrem->UCID($UCID)
               ->
SubT(BFN_CLEAR)
               ->
Send();

    return 
PLUGIN_STOP;
    }
}
?>

Last edited by T3charmy, .
T3charmy
S3 licensed
i will post it asap... i am really sick so... not sure when i will be able to post it
T3charmy
S3 licensed
Quote from Dygear :
@T3, I hope all of the work you have done is in a new branch, so that I can download it and start giving you patches for the things you need for the web interface to work better. You should upload what you have to github, and send me a pull request for your branch so that I download it and start submitting patches to you.

i wish i had an idea how to add files to github :P
T3charmy
S3 licensed
Quote from Dygear :That would not crash the server tho, and I don't think that is what he described.

Quote from cargame.nl :LFS clients

I think he means the users not the server :P
T3charmy
S3 licensed
Quote from Dygear :That's interesting, but I do not think it's a PRISM bug. It sounds more like a LFS bug within the InSim system. Report it as a bug to Scawen.

ahh, could it be a problem with the buttons trying to appear on the screen too fast causing the user to lag out?
T3charmy
S3 licensed
Quote from Dygear :That's my point, I'm quite alarmed because the only reason I left PRISM alone for so long is because all of the devs have worked very hard to make sure it's as stable as a rock. So I could trust that I could leave it and not have it crashing on peoples servers.

not sure... like i said, i haven't had a single crash that was because of prism it self... so i see no problem with it... and i have used it since 1.5 or so...
T3charmy
S3 licensed
Quote :This message has been deleted by Bob Smith. Reason: no referals, thanks

why he didn't just edit it and post his own referral i don't know 0

anywho... i have to agree with all of the people saying drop box... I love dropbox
T3charmy
S3 licensed
what does this have to do with TEAMS?
T3charmy
S3 licensed
Quote from Dygear :PRISM is unstable? I must admit, I've yet to hear this complaint. If your having crashes, please do submit a bug report. Some details on what was going on in the server, or better if you could submit the mpr, and then the let us know what plugins you have running with what versions so that I can try to reproduce.

I run Prism 24/7 with 4 servers, i haven't had a single crash since i used it (aside from coding errors I have made)
T3charmy
S3 licensed
Quote from GreyBull [CHA] :http://www.lfsforum.net/showthread.php?t=72779

One thread not enough?

I was thinking the same thing... and i own the team
T3charmy
S3 licensed
Quote from Dygear :So, $PRISM->plugins->getPlugins() always returns false?

In_array does... i tried it another way but it didn't work either
T3charmy
S3 licensed
Quote from Dygear :

<?php 
foreach ($PRISM->plugins->getPlugins() as $plugin)
{
    
var_dump($plugin::NAME);
}
?>


what i need it to do is, this...


<?php 
php
$NavLinks 
= array(
                            array(
'File' => 'cruise.php''LinkText' => 'Cruise''Plugin' => 'Cruise')
                        );

?>


<?php 
        php
        
Foreach($NavLinks as $info){
        if(
in_array($info['Plugin'], $PRISM->plugins->getPlugins()) ){
        echo(
"<li".(( basename($SERVER["SCRIPT_NAME"]) == $info["File"] ) ? ' id="menu-active"' '')."><a href=\"{$info["File"]}\"><span>{$info["LinkText"]}</span></a></li>");
        }}
        
?>

but it ALWAYS returns false :/
T3charmy
S3 licensed
Quote from Victor :Ok, found the problem.
Chrome doesn't seem to like it when it receives a localised timestamp (ie. with PST like you had) in a cookie header. I think it just read it like it was GMT, so on every page load, the cookie would have expired immediately. Resulted in not being able to stay logged in.

Can you try this fix please :

Open the prism module file "prism_http.php", go to line 1727 and change

<?php 
date
('l, d-M-y H:i:s T', (int) $v[1])
?>

to

<?php 
gmdate
('l, d-M-y H:i:s T', (int) $v[1])
?>

Then try to login with chrome again. In my test it seemed to fix the problem.

That indeed fixed it! Thanks!!, now onto the rest of the site

this really isn't a high priority, but i still can't seem to get this to work... (all its gonna be used for is to see if it needs to be displayed in the menu)

Quote from Dygear :

<?php 
in_array
('pluginname'$PRISM->plugins->getPlugins());
?>


Edit: at the latest i should have the site up on git... but i have a question... how do I add files?
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Victor :thanks - i'm just having dinner now but will continue to look after that.

ok, sounds fine
T3charmy
S3 licensed
Quote from Victor :Would it also be possible for me/us to get a test account, to try logging in?
You can pm me the details if you don't want to create a public account.

sure can,

URL: http://just4fun.servequake.com:8888
User: Victor
Pass: Test123
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Victor :I'll ask one more time : show us your sessions code, so that we may be able to help. Otherwise you're going to have to figure it out yourself.
I've tested everything on all browsers and everything works fine. But you're not giving us any information to debug your problem, so we can't help you. I'm not going to guess all the time about what the problem might be, when you could show us the code and have the problem fixed in 5 minutes probably.

login.php

<?php 
php
if (!isset($_SESSION['user'])){
if (isset(
$_POST['login'])){


$adminUser = isset($_POST['loginUser']) ? $_POST['loginUser'] : '';
$adminPass = isset($_POST['loginPass']) ? $_POST['loginPass'] : '';

if (
$adminUser && $adminPass){
    if (
$PRISM->admins->isPasswordCorrect($adminUser$adminPass)){

        if (!isset(
$_SESSION)){
            
$_SESSION = array('counter' => 1'staticvar' => 'mooh''lasttime' => time());
        }
        
$_SESSION['user'] = $adminUser;

<
class="msg info">You are now logged in!</p>
php
    
}

}

}else{


        <
h3 class="tit">Login</h3>
        <
form method="post" action="login.php">
        <
label for="username">Username: </label> <input type="text" name="loginUser" size="20" class="input-text">
        <
label for="password">Password: </label><input type="password" name="loginPass" size="20" class="input-text"><br><br
        <
label for="autologin">Remember Me?: </label><input type="checkbox" name="autologin"
        <
input type="submit" value="Log In" name="login">
        </
form>
php
}}else{

<
class="msg info">Your Already logged in.</p>
php
}

?>

sessions.php

<?php 
php
    
if (isset($SERVER['PHP_AUTH_USER']))
    {
        if (!isset(
$_SESSION))
            
$_SESSION = array('user' => $SERVER['PHP_AUTH_USER'], 'counter' => 0);
        else
            
$_SESSION['user'] = $SERVER['PHP_AUTH_USER'];
        
$_SESSION['autoLogin'] = TRUE;
    }
    else
    {
        if (isset(
$_SESSION['autoLogin'])) unset($_SESSION['autoLogin']);
    }

?>

Cookie settings for all other pages?

<?php 
php
if (isset($_SESSION))
{
    
$_SESSION['counter']++;
    
$_SESSION['lasttime'] = time();
}
else
{
    
$_SESSION = array
    (
        
'counter' => 1
        
'staticvar' => 'mooh'
        
'lasttime' => time()
    );
}

?>

T3charmy
S3 licensed
Quote from Dygear :If chrome is the issue, I would think that you should really check that the domain is correct and that the path is correct for the cookie.


<?php 
in_array
('pluginname'$PRISM->plugins->getPlugins());
?>

You can also just foreach $PRISM->plugins->getPlugins(); and it will give you the list of plugins loaded. It will not tell you the servers the plugins are active on, but it will give you a list of the loaded plugins.

i looked, and it seems that its not even saving the cookie...

and it also seems that in_array always returns false... worse comes to worse i will make my own
Last edited by T3charmy, .
T3charmy
S3 licensed
I just tried it with IE, firefox it works... but it doesn't work with chrome, any idea?

also, how do i check if a plugin is used? For the menu of the new web front end i want to have it check if PRISM uses a specific plugin
Last edited by T3charmy, .
T3charmy
S3 licensed
i read that, i am slowly getting it to work, but i still cant get it to display the username in the header

Edit: seems like the sessions arn't being transfered between pages...

I even reverted back to the default one and it still had a problem with storing session data
Last edited by T3charmy, .
FGED GREDG RDFGDR GSFDG