Jump to content

deansaddigh

Members
  • Posts

    440
  • Joined

  • Last visited

    Never

Everything posted by deansaddigh

  1. Sorry to post again, do you mean i cant specify a 404.php file in the htacess file? or that it wont redirect pagfes that are php on the site?
  2. Ahhh i see, thanks alot man, atleast i nkow now ill have to go and speak to them. Weird. Thanks again
  3. the page goes blank, unless i do it on the link i showed you.
  4. erm well thats a good question. if you go here http://www.languageschoolsuk.com/school_details and forget the trailing slash it works heres my htacess file RewriteEngine on #change mask php files RewriteRule ^(.*)\.htm$ $1.php [NC,L] #seo friendly url RewriteRule ^school_details/([a-zA-Z_|.-]+)/? school_details.php?id=$1 [L] #prevent hotlinking RewriteCond %{HTTP_REFERER} !^http://(.+\.)?languageschoolsuk\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://img251.imageshack.us/img251/4224/logovg.png [L] #compress php files to save bandwidth <ifModule mod_php4.c> php_value zlib.output_compression 16386 </ifModule> ErrorDocument 404 /404.php
  5. ok so i have a 404 error redirect which works well. my question is if you got to here the page displays http://www.languageschoolsuk.com/student_photos.htm but say you miss spell it like this http://www.languageschoolsuk.com/stuent_photos.htm it takes me to a blank page. why doesnt the 404 error come up. Kind regards Dean
  6. Ahh i see, ive done it, thanks very much boss
  7. i cant get anything to take on css link style sheets differnet to what has been set here a { text-decoration: none; color: #2277BB; } a:hover { text-decoration: underline; } h2 a { text-decoration: none; } i want a different set of links properties for any links that are h2 a in this div <div id="featurecontent"> any help guys? Kind regards Dean
  8. Its ok i have done it Kind regards Dean
  9. Hey thanks for the reply, i have done all that, as thats what i thought i was meant to do , it still doesnt work at all. this tells you how to implement it. http://www.eyecon.ro/spacegallery/#implement And i have done exactly that to no avail what so ever heres my sections of code. <link href="/style.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" media="screen" type="text/css" href="/css/spacegallery.css" /> <link rel="stylesheet" media="screen" type="text/css" href="/css/custom.css" /> <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/eye.js"></script> <script type="text/javascript" src="/js/utils.js"></script> <script type="text/javascript" src="/js/spacegallery.js"></script> <script type="text/javascript" src="/js/layout.js"></script> <script type="text/javascript"> $(function(){ $('#myGallery').spacegallery({loadingClass: 'loading'}); } </script> echo '<div id="myGallery" class="spacegallery">'; while($copiedrow = mysql_fetch_array($copiedresult)) { $imagename = $copiedrow ['image_name']; $image = '/admin/'.$copiedrow['path'] . '/' . $copiedrow ['image_name']; // echo '<a href="'.$image.'" rel="shadowbox" title="'.$imagename.'" class="floatright"><img src="'.$image.'" width="150" height="150"/></a>'; echo '<img src="'.$image.'" alt="" />'; } echo '</div>'; Any help would be brilliant because i have been trying to implement this since 8 oclock last night Kind regards Oh also heres the link to my page where its supposed to work. http://www.languageschoolsuk.com/school_details/Kings_Colleges_Bournemouth Dean
  10. I need to invoc the code below but have no idea on how to it. Can anyone help Invocation code Prepare a block level element with some images inside. All you have to do is to select the elements in a jQuery way and call the plugin. $('#myGallery').spacegallery({loadingClass: 'loading'});
  11. hi i want to implement this gallery, but its just not working even though ive followed everything. This is the gallery http://eyecon.ro/spacegallery/#about heres the code to implement Implement Attach the Javascript and CSS files to your document. Edit CSS file and fix the paths to images and change colors to fit your site theme. Important: be sure to include Javascript files in the specific order as in the example below. <link rel="stylesheet" media="screen" type="text/css" href="css/spacegallery.css" /> <script type="text/javascript" src="js/eye.js"></script> <script type="text/javascript" src="js/utils.js"></script> <script type="text/javascript" src="js/spacegallery.js"></script> Invocation code Prepare a block level element with some images inside. All you have to do is to select the elements in a jQuery way and call the plugin. $('#myGallery').spacegallery({loadingClass: 'loading'}); And heres my code <link rel="stylesheet" media="screen" type="text/css" href="/css/spacegallery.css" /> <script type="text/javascript" src="/js/eye.js"></script> <script type="text/javascript" src="/js/utils.js"></script> <script type="text/javascript" src="/js/spacegallery.js"></script> <script> $('#myGallery').spacegallery({loadingClass: 'loading'}); </script> while($copiedrow = mysql_fetch_array($copiedresult)) { $imagename = $copiedrow ['image_name']; $image = '/admin/'.$copiedrow['path'] . '/' . $copiedrow ['image_name']; //echo '<a href="'.$image.'" rel="shadowbox" title="'.$imagename.'" class="floatright"><img src="'.$image.'" width="150" height="150"/></a>'; echo '<p>Again another image gallery. Click on the images bellow to see it in action.</p>'; echo '<div id="myGallery" class="spacegallery">'; echo '<img src="'.$image.'" alt="" />'; echo '<img src="/images/lights3.jpg" alt="" />'; echo '<img src="/images/bw2.jpg" alt="" />'; echo '<img src="/images/lights2.jpg" alt="" />'; echo '<img src="/images/bw1.jpg" alt=""/>'; echo '<img src="/images/lights1.jpg" />'; echo '<img src="/images/mag.png"/>'; echo '</div>'; Any help would be amazing. Kind Regards Dean
  12. While im learing htacess etc, i thought what a good idea to not allow acess to the admin folder unless your from an ipdress i i allow, as im on a static ipdress, this could illiminate possible hacks. Im i write in my thinking is this a good idea?
  13. Ok ive done that, and theres one last problem, my image for the school isnt displaying and i cant figure out where to put the / heres the bit of code. while($copiedrow = mysql_fetch_array($copiedresult)) { $imagename = $copiedrow ['image_name']; $image = 'admin/'.$copiedrow['path'] . '/' . $copiedrow ['image_name']; echo '<li><img ref="'.$image.'" src="thumb-circle-active.png"/><span><a href="http://www.pikachoose.com">'.$imagename.'</a></span></li>';
  14. So every image and every link on the whole site?
  15. Ahhh i see, so what would i do with my links, along the top because they are doing the same thing and they are on an include file
  16. Woo hoo ive done it. Ok so last last quiestion. why is none of my styling working. Can anyone shed some light please
  17. Ok so ive got the whole name now i slightly altered my htacess file by adding an _ on ([a-zA-Z_]+) RewriteRule ^school_details/([a-zA-Z_]+)/? school_details.php?id=$1 [L]
  18. Sorry to be a pin, again been trying to fix something. Basically say i select bath acadamy from the view all schools page, Well the variable only comes through as bah and it forgets the acadamy part, i assume because my htacess files needs tweaking to look for a space. So obviously my sql query doesnt find anything and the variable doesnt match anythingi n the db. you can check this by going here. http://www.languageschoolsuk.com/view_all_schools.htm select bath acadamy. Now on the next page half way down you can see i have echoed out the variable and only bath is in it. So i assume my htacess file is slightly off. #seo friendly url RewriteRule ^school_details/([A-Z][a-z]+)/? school_details.php?id=$1 [L] Can anyone show me whats im doing wrong? Kind regards Dean
  19. Firstly , thanks for how much help you have given i know i keep saying it, but its invaluable. I understand everything you are saying. with regards to what you just wrote. Its nearly there now. If you could kindly check http://www.languageschoolsuk.com/view_all_schools.htm then click a school name youll be taken to the page and the url is perfect. woop woop however, a couple of things one the details are being populated for the school and 2 it looks like the style sheet is missing. On a quick note ,in the db the school names have spaces in them e.g Kings Colleges Bournemouth Is this one of the problems.
  20. Ok, so now im getting a page not found error. Ive done abit of reading and am getting to grips more with htaccess. Soooo. im getting an error Not Found The requested URL /school_details/Bath Academy was not found on this server. Im gonna list my code on pages to see if anyone can just point me in the right direction. first the htacess file. ive added a couple of things that stop hotlinking and compress php files so just ignore them. RewriteEngine on #change mask php files RewriteRule ^(.*)\.htm$ $1.php [NC,L] #seo friendly url RewriteRule ^school_details/([a-z_-]+)/? school_details.php?id=$1 [L] #prevent hotlinking RewriteCond %{HTTP_REFERER} !^http://(.+\.)?languageschoolsuk\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://img251.imageshack.us/img251/4224/logovg.png [L] #compress php files to save bandwidth <ifModule mod_php4.c> php_value zlib.output_compression 16386 </ifModule> view all school.php which passes the name of the school through the url as appose to the id like suggested. $school_id = $row['school_id']; $name = $row['name']; echo '<h2 class ="schoolname"><a href="school_details/'.$name.'">'.$row['name'].' (click for details)</h2></a>'; Which passes the name to the school_details.php And the school_details page. //get the school id $school_id = $_GET['id']; // select school details based on school id $query = "SELECT image_school.image_id, image_school.school_id, school.name AS school_name, school.street, school.town, school.city, school.county, school.region, school.school_facts, school.general_info, school.accreditations, school.garden, school.computer_lab, school.language_lab, school.internet_access, school.self_study_center, school.student_lounge, school.disabled_access, school.bookshop , school.disabled_access_ac , school.library , school.cafecanteen, school.video, image.image_id, image.path, image.name AS image_name FROM image_school JOIN school ON image_school.school_id = school.school_id JOIN image ON image_school.image_id = image.image_id WHERE school.school_id =" .$school_id;
  21. Thank you very much, im reading as we speak. My lord its a tad confusing, Thanks again
  22. I think i figured it out, i beleive the problem was [NC, L] ive just changed it to [L] Also i have put ^ on this line RewriteRule ^school_details/([a-z_-]+)/? school_details.php?id=$1 [L] I think you may have just forgot it, after reading a tutorial, can you clarify if this is correct. Kind regards Dean
  23. Wow, very very very helpful thank you very much. its nice of you to take time out to help me. Kind regards Dean Im getting an internal server error with this RewriteEngine on RewriteRule ^(.*)\.htm$ $1.php [NC, L] RewriteRule school_details/([a-z_-]+)/? school_details.php?id=$1 [L] Do you know why at all
×
×
  • 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.