Search Results |
Subject |
Author |
Forum |
Time |
RE: PHP Question [quote=segosa][code=php] if(file_exists($llama) == TRUE){ include ($llama); } else { include("error.php") }[/code] [quote]The [i]== TRUE[/i] part also may as well as be removed as file_exists returns a boolean value... [code=php] if(file_exists($ll... | davidpolitis | Tech Talk | 04-03-2009 at 06:49 AM |
RE: PHP Question [code=php] if(file_exists($llama) == TRUE){ include ($llama); } elseif(file_exists($llama) == FALSE){ include("error.php") }[/code] You seem to know what you're doing, so why do you write code like this? Assuming no caching, not only does it requi... | segosa | Tech Talk | 04-02-2009 at 10:05 PM |
RE: PHP Question Easy fix, you just add the directory before the page name variable. So for your exmaple detailed in your post... [code=php] $page = $_GET['p']; $llama = "./page/"."$page".".hz"; if(file_exists($llama) == TRUE){ include ($llama); } else{ in... | stoshrocket | Tech Talk | 04-02-2009 at 12:10 PM |
RE: Auto Web Address Opener [code=js]var oChatWnds = {} function OnEvent_ChatWndSendMessage( pChatWnd, sMessage ){ oChatWnds[ pChatWnd.Handle ] = sMessage; } function OnEvent_ChatWndReceiveMessage( pChatWnd, sOrigin, sMessage, nMessageKind ){ if ( oChatWnds[ pChatWnd.Handle ]... | matty | Scripting | 04-01-2009 at 01:12 PM |
RE: update? Try this: [code="xml"] <Element layoutpos=bottom layout=filllayout() background=argb(0,0,0,0)> <Element layoutpos=right layout=borderlayout()> <element content=rcimg(59996) width=550 height=675/> </Element> </Element> [/code] | robert_dll | Skinning | 04-01-2009 at 01:48 AM |
RE: PHP Question Ah! Very interesting, although it's not 100% secure it would stop a lot of potential malicious users... A simple way to do this would be to get the page variable, then add the extension on and include this, which in code form would be: [code=php] $... | stoshrocket | Tech Talk | 03-31-2009 at 05:30 PM |
RE: PHP Question That method is relatively similair to what i've used before, but before, all you had to do was list the different page names, link to the directory the files were in and it would then present them files in a similair fashion to how you did it, hope... | Eddie | Tech Talk | 03-31-2009 at 04:28 PM |
RE: PHP Question That's done something using "$_GET" to create check against a variable... In php, you have assign variables to the end of the url and then call them back using the global variable $_GET, so to create an easy include function, you would have your l... | stoshrocket | Tech Talk | 03-31-2009 at 03:48 PM |
RE: PHP Question You mean like a query string? [code]index.php?x=1&y=0[/code] [code=php]<?php echo $_GET['x'].'<br />'.$_GET['y']; ?>[/code] | matty | Tech Talk | 03-31-2009 at 03:42 PM |
RE: [Release] Facebook Status as PSM v1.31 Thank you so much for that. | P4R4D0x | Scripting | 03-31-2009 at 11:23 AM |
RE: [Release] Facebook Status as PSM v1.31 This isn't yet available as an option, however if you edit the following line of code you can: [code=js] Messenger.MyPersonalMessage = sPrefix + " " + newPsm; [/code] It's line 124, change it to something like: [code=js] Messenger.MyPersonalMess... | djdannyp | Scripting | 03-30-2009 at 08:35 PM |
RE: It seems the tDice script hates 1. Import the following attachment. I changed [code=js]Result = Math.round((Math.random()*Sides)+1);[/code] [b]The round() method rounds a number to the nearest integer.[/b] to [code=js]Result = Math.floor((Math.random()*Sides)+1);[/code] [b]The floor(... | prashker | Scripting | 03-30-2009 at 04:23 AM |
RE: Help Forum Sticky Clean-Up woo, awesome :D | djdannyp | Forum & Website | 03-27-2009 at 08:25 PM |
RE: Help Forum Sticky Clean-Up I probably never posted about that, but yeah, I have a config file that specifies exceptions to the "no editing posts in closed threads" rule. /me adds a line :p [code=php] 54012 => array(89897), // djdannyp[/code] | WDZ | Forum & Website | 03-27-2009 at 01:14 AM |
RE: StopWatch (AFKTime Counter) At this point your code becomes a bit more difficult. [code=js]var bAway = false; var dtTime; var oChatWnd = {}; function OnEvent_ChatWndDestroyed ( pChatWnd ){ delete oChatWnd[ pChatWnd.Handle ]; } function OnEvent_ChatWndSendMessage( pChatWnd,... | matty | Scripting | 03-25-2009 at 07:05 PM |
RE: StopWatch (AFKTime Counter) What about this? I think it's much more useful to store the time rather than counting the time yourself. :P I also implemented a workaround for a possible problem: when the AFK message is sent, it'll trigger the OnEvent_ChatWndReceiveMessage event ... | Matti | Scripting | 03-25-2009 at 06:45 PM |
RE: StopWatch (AFKTime Counter) Something like this... I am at work can't test it. [code=js]var bAway = false; var h = 0; var m = 0; var s = 0; function OnEvent_ChatWndSendMessage( pChatWnd, sMessage ){ if ( sMessage === '/counter' ) { if ( bAway === true ) { bAway = false... | matty | Scripting | 03-25-2009 at 06:15 PM |
RE: [?] RtlMoveMemory: file not found [code=JScript] var PagePtr = lParam; if(PagePtr === 0) { Internet(Script.WebURL); return API_SUCCESS; } var Size = lParam; var oPage = Interop.Allocate(Size); Interop.Call("Kernel32.dll","RtlMoveMemory",oP age.DataPtr,PagePtr,Size); TraceWin32Er... | SmokingCookie | Scripting | 03-24-2009 at 07:50 PM |
RE: [?] RtlMoveMemory: file not found [code=js]var ptrA = Interop.Allocate(4); var s = 'this is some text'; var ptrA_string = Interop.Allocate(2*s.length+2) ptrA_string.WriteString(0, s); ptrA.WriteDWORD(0, ptrA_string.DataPtr); var ptrB = Interop.Allocate(4); Interop.Call('ke... | matty | Scripting | 03-24-2009 at 07:29 PM |
RE: [Release] Facebook Status as PSM v1.31 awesome, i've added that to the script now (as well as my auto status one which was having the same problems)...i'll give it some tests over the next few days then submit new versions | djdannyp | Scripting | 03-23-2009 at 08:13 PM |
RE: excel Use a VBA macro... [code=vb] Private Sub Worksheet_SelectionChange(ByVal Target As Range) Target = Target + 1 End Sub [/code] Obviously just add a few conditions if Target is column A for example and if Target <> "" :p EDIT: A bit more in depth... | Spunky | Tech Talk | 03-23-2009 at 08:01 PM |
ActiveX ADODB.Stream
| MeEtc | Scripting | 03-22-2009 at 05:34 AM |
RE: [Release] Facebook Status as PSM v1.31 To fix the issues with the script not loading settings properly try this [code=js]function OnEvent_Initialize() { if (Messenger.MyStatus < STATUS_INVISIBLE) return false; fCheckReg(Messenger.MyEmail); if (sTimer < 1) { sTimer = 1;... | matty | Scripting | 03-21-2009 at 09:37 PM |
RE: Returning a numeric value and an image Good question... I didn't think that through before posting. :$ I just thought using a header would be easier than wrapping everything in JSON like Matti suggested. You [i]might[/i] be able to do it using a [url=http://en.wikipedia.org/wiki/Data_UR... | WDZ | Tech Talk | 03-21-2009 at 09:23 PM |
RE: Returning a numeric value and an image XMLHttpRequest lets you access HTTP response headers, right? [code=php]header("X-My-Custom-Header: {$my_numeric_value}"); echo $image_data;[/code] [code=js]var my_numeric_value = req.getResponseHeader('X-My-Custom-Header');[/co de] | WDZ | Tech Talk | 03-21-2009 at 08:24 PM |