Jump to content

White_Lily

Members
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by White_Lily

  1. Slight design flaw: On the home page, at the bottom row of games you hover over them and a description for each game appears, however if you hover over the last one in the row you may notice (depending on screen size) that it gets partially cut off. my current screen size is 1366px in width and 768px in height.
  2. I wondered this to, what fixed it for me though was that I hadn't set the text to be a specific size. for example: the browser default for p tags is 12px, taking this i could just write my css like this p{ display: block; color: #333333; text-align: left; font-weight: normal; margin: 0; padding: 5px 0 0; } pc browser will render this as its default of 12px. whereas mobile will render it as its default of 19px. to stop this, simply specify the font-size. eg: p{ font-size: 12px; } However when
  3. Hey, I have been asked to write 301 redirects for a website we have built recently. i wrote the 301 redirect out as follows: Redirect 301 /page/Video-Marketing http://www.live-preview12.co.uk/page/video-marketing which worked as far as it redirected to the correct page, but when you look at the url it shows this: http://www.live-preview12.co.uk/page/video-marketing?page=Video-Marketing and we have been told that we cannot have the trailing "?page=Video-Marketing". any ideas?
  4. you could do an active system, when a user logs in, get the script to change the users status in the database to "Active" when they log in. This way, when they try to log in from another window, browser, computer, etc... all you have to do is check if a cell in that users row is "active" if it is, then the user is already logged, if it isn't active, then obviously allow the user to log in.
  5. I have managed to get the RSS Feed running... just need to get it on my website. This question probably isn't really for this section, but I am now stuck with how it is formatting the feeds, like, its striped out all the html, and now its just solid text. Is there a way around that? I am now using FeedBurner as it was suggested by a friend of mine.
  6. Hey. I have been asked to add RSS Feeds to a website blog, but im not sure how to go about this. I am not even sure PHP can even be used for this. Any help is much appreciated.
  7. Hey, I have a database full of "Depots" and basically instead of just one straight contact form on this clients website, they want a list of each of their depots on the contact page instead with individual phone numbers and locations, etc. What I was wondering is, is there a way with php where I can basically say: "For every 4 entries listed, put one large div around them"? So far there are 13 depots listed, but there are 4 depots for every row on their website. any ideas?
  8. Hi, I have written an ajax csv creation code that when a button on the cms is pressed, then calls a php script to create and fill the csv and return the file name for a download link. However I am getting an error returned by the aJax saying that: "object #filename.csv# has no method 'val'" here is the aJax: <script type="text/javascript"> $(function(){ $("#create_csv_cms-btn").click(function(){ $(this).html("Creating...").attr("disabled", "disabled"); $.ajax({ url: "<?=$GLOBALS['siteUrl']?>/SE/includes/validators/create_csv.php", cache: false, success: function(result){ if(result.val().length > 0){ $("#create_csv_cms-btn").fadeOut("slow",function(){ var download = 'Your mailing list is ready to download.<br><a href="<?=$GLOBALS["csvCreation_url"]?>'+ result +'">Download it here</a>.'; $("#resultOutput").fadeIn("slow").html(download).click(function(){ $(this).fadeOut("slow",function(){ $("#create_csv_cms-btn").html("Create CSV").fadeIn("slow") }); }); }); }else{ $("#create_csv_cms-btn").removeAttr("disabled"); $("#create_csv_cms-btn").html("Re-Create CSV"); $("#resultOutput").html(result).fadeIn("slow"); } } }); return false; }); }); </script>
  9. Still nothing appears to work in ie7. I'm wondering if it would have anything to do with the DOCTYPE? the doctype im using is transitional. (the reason for this suggestion is that ive seen many problems solved just by changing the doctype).
  10. Hey, tried it and its skipping the initial if statement completely and going straight to the elseif. This is only happening in ie7. $(".accordionButton").click(function(){ console.log("BUtton Clicked"); if($(this).next().is(":hidden") == true){ $(".accordionContent").slideUp("slow", function(){ console.log("Slide Up 1"); }); $(this).next().slideDown("slow", function(){ console.log("Slide Down"); }); }else if($(this).next().is(":hidden") == false){ $(".accordionContent").slideUp("slow", function(){ console.log("Slide Up 2"); }); } });
  11. I have tried various things such as chnaging the css and jquery to use animate({}), overflow, and height adjustments but nothing seems to be working.
  12. the line under the elseif statement should be slideUp not slideDown - sorry, its not letting me edit the post.
  13. Hey, I have chosen to have the menu on a CMS im building have an accordion effect. I have it working in all browsers except IE7, now I know this browser is fairly old, but since a lot of people still use it fairly regularly my company has made it mandatory to make sure it functions correctly in IE7 to. Here is the jQuery: $(function(){ $(".accordionButton").on("click", function(){ if($(this).next().is(":hidden") == true){ $(".accordionContent").slideUp("slow"); $(this).next().slideDown("slow"); }else if($(this).next().is(":hidden") == false) $(".accordionContent").slideUp("slow"); }); }); I found out the .on("click") part works, it's when it comes to the conditions that it then decides to do nothing. Any ideas? - Lily P.S: I have look on google for function compatibility issues regarding next() and is() and cant seem to find any on these. SlideUp/Down() I know work since I have used them in the past for banners and other client requirements.
  14. haha oh yeah :S fixed it! thanks Barand x
  15. Okay Barand thank you, I have read up on variable scopes and declared the $connections variable to be global within the connect() function, and it all works now EDIT: or I thought it had... it now says that mysqli_query expects parameter 1 to be mysqli, boolean given on line 28 of functions.php
  16. Hey. I am trying to start using mysqli and once I get used to using it and can pretty much be able to code with it without asking for too much help then I shall also start converting pre-existing sites over to mysqli to. However, I have this problem where my connect() function can't actually connect. Here is the config.php file that is (and will be) included on every single page: <?php $connections = array( "siteHost" => "localhost", "username" => "root", "password" => "", "database" => "ajax_website" ); $site = array( "siteUrl" => "http://".$_SERVER["HTTP_HOST"]."/Projects/aJax Driven Website" ); $fileSys = array( "maxSize" => 1048576, "acceptedFiles" => "jpeg,jpg,png,bmp,gif,tiff,tif,svg", "uploadPath" => $_SERVER["DOCUMENT_ROOT"]."/Projects/aJax%20Driven%20Website" ); ?> and here is the functions.php file that is (and will) also be included on every single page: <?php function connect() { $connect = mysqli_connect($connections["siteHost"], $connections["username"], $connections["password"], $connections["database"]); if($connect) return true; else return false; } function select($table, $columns = "*", $where = NULL, $order = NULL, $limit = NULL) { $query = "SELECT ".$columns." FROM ".$table; if($where != NULL) $query.= " WHERE ".$where; if($order != NULL) $query.= " ORDER BY ".$order; if($limit != NULL) $query.= " LIMIT ".$limit; if(!empty($query)) return mysqli_query(connect(), $query); } ?> this is how I am including them onto all my pages: <?php include "cms/inc/config.php"; include "cms/inc/functions.php"; $page = "Home"; include "inc/pageInc.php"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>...</html> the errors I am receiving are: Notice: Undefined variable: connections in C:\xampp\htdocs\Projects\aJax Driven Website\cms\inc\functions.php on line 5 Notice: Undefined variable: connections in C:\xampp\htdocs\Projects\aJax Driven Website\cms\inc\functions.php on line 5 Notice: Undefined variable: connections in C:\xampp\htdocs\Projects\aJax Driven Website\cms\inc\functions.php on line 5 Notice: Undefined variable: connections in C:\xampp\htdocs\Projects\aJax Driven Website\cms\inc\functions.php on line 5 Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\xampp\htdocs\Projects\aJax Driven Website\cms\inc\functions.php on line 25 Any ideas?
  17. at the end of all your queries within your code, put: or die(mysql_error()); Also try this: print_r($queryVariable); EDIT: make sure the values of this output are what you expect, if not then there is a problem with your query. PS: Something that MIGHT also create this error "illegal characters" for MySQL, so you could try escaping all inputs with: mysql_real_escape_string();
  18. Can you post the code associated with the forgotten password.
  19. You cannot use session_register(). Instead use this: session_start(); $_SESSION["admin"]; require_once "index.php";
  20. you could make the box the background image sits in the same size as the image you want to show, then say: #box id/class { background: url("../filepath/filename") center no-repeat; }
  21. I have also made a CMS for my company, and I did a file-manager type page, where someone would upload the file, but the file would get rename, with a unique id. (to stop files being overwritten). this is the code I used for it: <?php if(!empty($_POST["upload_file"])){ $file = explode(".", $_FILES["file_upload"]["name"]); $extension = strtolower($file[1]); if(!empty($file[1])){ if(in_array($extension, array('jpg','jpeg', 'gif', 'png', 'bmp', 'doc', 'pdf', 'docx', 'mp4', 'zip', 'mov', 'mpg', 'wmv', '3gp'))){ $filepath = $_FILES["file_upload"]["tmp_name"]; $filename = uniqid().".".$file[1]; //THIS IS WHERE THE FILE IS RENAMED $target = $_SERVER["DOCUMENT_ROOT"]."template/uploads/".$filename; if(move_uploaded_file($filepath, $target)){ $document = str_replace("_", " ", $file[0]); $document = str_replace("-", " ", $document); $url = $GLOBALS["siteUrl"]."uploads/".$filename; $putFileInfo = insert("files", "file_name, file_url, file_original, new_file", "'$document', '$url', '".$_FILES["file_upload"]["name"]."', '$filename'"); if($putFileInfo){ $filePass = "File was successfully uploaded."; }else{ $fileErr = "File could not be uploaded: ".mysql_error(); } }else{ $fileErr .= "Could not move file."; } }else{ $fileErr .= "That is not an accepted file extension for the $page."; } }elseif(empty($file[1])){ $fileErr = "No file selected."; } } ?>
  22. Actually - you can scale backgrounds using CSS3, however most (if not all) browsers are not supporting this method.
  23. I see a problem! Look at the second warning he posted and you will see he is moving a file to an image, rather than a directory.
  24. the submit button code should look something like this: <input type="submit" name="login" value="Sign In" id="login" onclick="validLogin()" /> or: <button type="submit" name="login" id="login" onclick="validLogin()">Sign In</button>
  25. if theres anything missing or your having problems with implementation, just pm me
×
×
  • 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.