Everything posted by Roberto
-
Java Help
Hello Some stuff about passing arrays to a function: http://www.java2s.com/Tutorial/C/0140__Arr...tofunctions.htm When you pass an array to a function, it is done by reference - so any changes made in the function to the array, effect the original array that was passed into the function. I have'nt done any java for along while, I used an older version of this book http://www.amazon.co.uk/Introduction-Progr...5024&sr=8-1 its a bit expensive, but its huge and full of the good stuff. Rob
- php include question
-
php include question
Hello 'SCRIPT_NAME' is the array key that accesses the current scripts path. You just use 'SCRIPT_NAME' , its server created - so its already there. http://uk2.php.net/manual/en/reserved.variables.server.php has some other $_SERVER array keys. You can test what you get by - copy/paste the next bit and save as testing.php + test in brower. <?php echo "{$_SERVER['SCRIPT_NAME']}<br />"; $thisPage = basename($_SERVER['SCRIPT_NAME']); echo "{$thisPage}"; ?> Try replacing 'SCRIPT_NAME' with some of the other $_SERVER array key's + see what you get. Rob
-
php include question
Hello $_SERVER['SCRIPT_NAME'] holds the full path and filename of the current script eg /root/phpstuff/siteone/index.php. The values in the $_SERVER array are created by the server automatically. basename chops off the path + returns the page name - index.php so : $pageName = basename($_SERVER['SCRIPT_NAME']); - $pageName will now hold the name of the current page. You can use php if statements to show/hide html code eg <?php $pageName = basename($_SERVER['SCRIPT_NAME']); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Index</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Some heading or other</h1> <?php if($pageName == "index.php") { ?> <h2>This is index.php</h2> <?php } else { ?> <h2>This page is not index.php</h2> <?php } ?> </body> </html> You can use this with the id selector. If you have an id called highlight, which is used to highlight the current page : <p><a href="index.php" <?php if($pageName == "index.php"){echo 'id="highlight"';} ?> >Home </a></p> <p><a href="about.php" <?php if($pageName == "about.php"){echo 'id="highlight"';} ?> >About Us</a></p> Hope that helps Rob
-
php include question
Hello You can work out which page your on using: $pageName = basename($_SERVER['SCRIPT_NAME']); If your using <ul><li>'s you can try : <ul> <li><a href="index.php" <?php if($pageName == "index.php"){ echo 'id="pageselected"';} ?>>Welcome</a></li> ect...... </ul> Rob
-
How come WDF looks like this in Linux?
Hello Can you increase the text size in firefox? Its in the View menu when using it on BG's os. Rob
-
My flash intro covered my dropdown menu :(
Hello You have to make use of z-index because flash will always try to be on top + set the wmode to transparent in the embed code. A howto is here : http://www.flashdesignerzone.com/tutorials/t1026.php Rob
-
How to animate a sheet of paper "flying"?
Hello You could animate it in flash as a series of shape tweens(make use of the technique where you deselect the shape and bring the cursor towards the shape ( you will get either a semicirle or a right anlge appear under the cursor - click and drag to alter the shape)) , then File -> Export Movie -> PNG Sequence, then Open up fireworks + select File -> Open - browse to you sequence of png's + select all of them and make sure open as animation is selected -> click on Open. Then File -> Save as + make sure Animated gif is the file type before you save. You should be able to do this in photoshop as well. Rob
-
Happy Birthday Notbanksy!
Happy Birthday Notbanksy Might have to give the skinny dipping a miss, no one needs to see a wet yeti Hope you have a great year Rob
-
Horse has tried to attack me
Hello This works well - set and forget. Back up software comes on the disc itself. http://www.ebuyer.com/product/128601 - its quite big (+ brown) - just like a horse Leave the cows alone towny. Rob
-
WOTM: October 2008 Winner - Acuity
Top work vandal bloke
-
mac vs pc
Hello I like pc's - cheap + easy to upgrade. I've used linux a lot in the past(I will be dual booting it again when I get the time to install it), but I prefer using vista - it is reliable + stable + idiot friendly. I was tempted to get a mac mini, but I wouldn't buy a pc with that lower specs + for the same money you could build an impressive pc or get a windows/linux laptop. Rob
-
No more uni, a job, and other stories
Well done Eris I hope you enjoy your new job. Rob
-
what i've been up to
Hi Do you get time to sleep? Do Speedo do a headcoat? You weigh less than me - skinny bugger. Rob
-
ff3 flash
Hello It could be your virus checker stopping the installation. Download the firefox version from : https://addons.mozilla.org/en-US/firefox/browse/type:7 or http://www.adobe.com/shockwave/download/do...=ShockwaveFlash Then disconnect from the internet, turn off your virus checker + install flash player. Old version of flash player can sometimes cause problems. To get rid of all previous versions of flash player on your system, download this: http://kb.adobe.com/selfservice/viewConten...7&sliceId=2 Close all browsers + run the program - then you have to install flash player again. Rob
-
.swf background in php or html
Hello To stop flash grabbing the top layer, make use of div's - using z-index to set the layering order. Rob
-
.swf background in php or html
Hello There is a good as3 tutorial here : http://tush.wordpress.com/2007/06/25/actio...browser-resize/ Hope that helps Rob
-
Happy birthday (x3)
Hope you have a great birthday. Rob
-
How to click & zoom
Hello There are a few here : http://www.vivalogo.com/vl-resources/beaut...h-galleries.htm Rob
-
The bar
Lie down, get comfy - now picture yourself just after you've finished your dissertation, feel the happiness , the relief , the freedom </Mckenna> compare it to how your feeling now - be motivated or Stop sulking and get on with it you lazy *$!**£! student. or Go for a walk, get the blood pumping + come back focused and ready to do good work + start the rest of your life. Rob
-
The bar
What would Samantha Carter do?
-
Scariest movie...?
Hello When I was much younger, I watched the poltergeist episode of the Waltons and it freaked me out for years Rob
-
WOTM: September 2008 Winner - Wizely
Well done Wizely - a well deserved first place.
-
Dripbook
Hello I thought dripbook was another term for grotmag. Very slick site for the young and trendy. Rob
-
Problem with flash positioning Firefox and Safari
Hello I think the general response from the web standards nazi's is that tables should be only used for tabular data. Tables make things complicated + you can achieve the same results using floats. You can try adjusting the padding/border for your table with a bit of css. This should make it fit better. Rob EDIT : You could also set its display property to block : display: block; The padding options are : padding-top, padding-bottom, padding-right, padding-left, padding.