Jump to content

TomBullock

Members
  • Posts

    35
  • Joined

  • Last visited

About TomBullock

  • Birthday 04/27/1992

Profile Information

  • Gender
    Male
  • Location
    Burnley, Lancashire, UK

TomBullock's Achievements

Member

Member (2/5)

0

Reputation

  1. As a follow up to this, I tried to use the same code method on another site but the class="current" won't work. Here is the code: <body> <html> <?php $page = basename($_SERVER['PHP_SELF']);?> <div class="menu_nav"> <ul> <?php $class = ($page == 'index.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="index.php">Home</a></li> <?php $class = ($page == 'facilities.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="facilities.php">Facilities</a></li> <?php $class = ($page == 'activities.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="activities.php">Activities</a></li> <?php $class = ($page == 'ssp.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="ssp.php">SSP</a></li> <?php $class = ($page == 'bookings.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="bookings.php">Bookings</a></li> <?php $class = ($page == 'contacts.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="contacts.php">Contacts</a></li> </ul> One thing I did notice is that before adding the inlcude to where the menu would go, the class was set to class="active". I did try changing the all the "current" in the code to "active" but with no joy?
  2. Hi, Is it possible to add PHP code into a TPL file? Ive tried adding my code in as standard PHP and also tried it with the {php}.....{/php} tags but it still doesnt work. Any help appreciated! Thanks Tom
  3. Awesome! Ill keep a note of that site! Thanks! Ill give it a go
  4. Another issue that has arrised (nothing to do with the above code) is with a footer include. The include code is: <body> <html> <p> Copyright © 2010 <a href="http://www.company.co.uk">Company</a> · Design by <a href="http://www.designer.co.uk">Designer</a></p> When I view this in a browser, it gives me: Copyright © 2010 Company · Design by Designer I remember reading before that I need to put something before the © and the - but Im not sure if thats the correct way?
  5. Ahh, thank you! Worked a treat!
  6. Hi Ive only just started using PHP so go easy I have a PHP include for a menu on a site I run. <body> <html> <ul class="avmenu"> <li><a class="current" href="index.php">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="services.php">Services</a></li> <li><a href="projects.php">Projects</a> <ul> <li><a href="highcroft_house.php">Highcroft House</a></li> <li><a href="barn_conversion.php">Barn Conversion</a></li> <li><a href="sunroom_extension.php">Sunroom Extension</a></li> <li><a href="dance_school.php">Dance School</a></li> </ul> </li> <li><a href="testimonials.php">Testimonials</a></li> <li><a href="offers.php">Special Offers</a></li> <li><a href="links.php">Links</a></li> <li><a href="contact.php">Contact</a></li> </ul> As you can see, on the first link, the index link, it has the class="current" property which displays a little tab next to the menu to show what link is currently selected. With using the include, obviously the class="current" is passed on to every page. Is there a way that I can tell the include file to change according to what page its on? Any help appreciated! Thanks Tom
  7. Hello Ive created a little code thats logs you into the site an external page. Is there a way I can make it submit to more than one php login form? So for example, I could login to 2 forums with 1 form? My code so far is here: http://sackthis.co.uk/test/autoproxy.php Would appreciate any help Thanks Thomas
  8. Hello I have this script, but i only want it to be able to upload music files, such as mp3, wma and wav. <?php //set where you want to store files //in this example we keep files in folder upload //$HTTP_POST_FILES['ufile']['name']; = upload file name //for example uploads file name cartoon.gif . $path will be uploads/cartoon.gif $path= "uploads/".$HTTP_POST_FILES['ufile']['name']; if($ufile !=none) { if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path)) { echo "Successful<BR/>"; //$HTTP_POST_FILES['ufile']['name'] = file name //$HTTP_POST_FILES['ufile']['size'] = file size //$HTTP_POST_FILES['ufile']['type'] = type of file echo "File Name :".$HTTP_POST_FILES['ufile']['name']."<BR/>"; echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>"; echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>"; echo "<img src=\"$path\" width=\"150\" height=\"150\">"; } else { echo "Error"; } } ?> Can anyone help me so if they try to upload anything apart from the music files i mentioned, they get an error. Thanks Tom Bullock
  9. Can i put that code on the same page under the current script?
  10. Hello This is part of my script: { echo "online"; } else { echo "offline"; } As you can see, there is the word 'online' and 'offline'. How do i make the word 'online' green and the word 'offline' red? Thanks
  11. Haha, what a poor insult. You tell me whats so hard about this: $server = "000.000.000.000"; // IP Address Of Shoutcast Server. $port = "000"; // Shoutcast Port $online = "/images/online.gif"; // Online Image $offline = "/images/offline.gif"; // Offline Image Maybe your the big idiot.
  12. Well if you had a brain, thats what ive come to ask you. ^^^ I think that means ive found my answer. Theres no need to cry bud
  13. Can anyone help me change this script from images to text? $server = "212.72.165.23"; // IP address to your shoutcast server. $port = "8681"; // port of your shoutcast server $online = "http://www.streamsolutions.co.uk/scripts/status_img/online.gif"; // Online Gif image $offline = "http://www.streamsolutions.co.uk//scripts/status_img/offline.gif"; // offline gif image
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.