Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Lee Boyce

Members
  • Joined

  • Last visited

Everything posted by Lee Boyce

  1. The best way to do this, that i know of, is to make use of the custom fields. If you open your single.php page, or post.php page in an editor you will be able to find the line: <?php get_sidebar(); ?> You want to be able to edit this so that it can acquire the information needed to display the correct sidebar. So replace with: <?php $sidebar = get_post_meta($post->ID, "sidebar", true); get_sidebar($sidebar); ?> Now, to display a custom sidebar in a post or page; add the custom field “sidebar” and include the name of the sidebar file. E.g. if you insert “test”, it will display sidebar-test.php as your sidebar. I hope that makes sense, however, i just realised... you will need to have the ability to enable widgets in more than one sidebar. Check out this tutorial on how to do so: Multiple Sidebars Wordpress
  2. Nice work. I can think of quite a few good uses for it...will have a mess around when i've got some time.
  3. I'll probably give the background some texture in order to dampen the space a little. But i'm trying to keep the site a little more minimal this time around, as i want people to focus on the work i'm showcasing, and not so much the site itself. As for the logo, i agree, could do with a bit of work, at least you noticed it was aiming to be an LB haha. Rosie, i get what you mean, will have a play around and see if i can come up with something that will work well. Thanks folks, appreciated.
  4. I'll probably give the background some texture in order to dampen the space a little. But i'm trying to keep the site a little more minimal this time around, as i want people to focus on the work i'm showcasing, and not so much the site itself. As for the logo, i agree, could do with a bit of work, at least you noticed it was aiming to be an LB haha. Rosie, i get what you mean, will have a play around and see if i can come up with something that will work well. Thanks folks, appreciated.
  5. OOPS!!! Just realised i posted the wrong link. Thanks though Guezala as i will be working on the design in the first link too at some point.
  6. I quite like the design. Some suggestions: Drop the height of the black area and get rid of the piece of text that appears when you click a link...i don't think it is needed, looks like it is there just now simply to fill some of the extra black space. #content is 703px...i think the end of the #top-menu (end of the contact button) should line up with the right hand edge of #contact Other than that, i think the design is pretty nice!
  7. Hi folks. Just wondering if you could have a little look at the VERY ROUGH idea i've got for my new portfolio site. There isn't any content yet, just looking on feedback/suggestions on Layout, Interaction, Colour, Logo etc. The link iswww.leeboyce.co.uk/test/indexb.html SORRY, THIS IS THE ACTUAL LINK http://leeboyce.co.uk/test/theindexb.html I never have a problem doing work for clients, but i'm like an estate agent with a messy house, can never do work for myself! Thanks in advance...
  8. I've tried it. It is very bare bones at the moment, and slightly unstable, but thats expected. Honestly, i can't wait until it kicks off, its going to be so useful for project management. I really hope it does't kill Gmail though and instead they integrate them with each other.
  9. I think you might be best using an e-commerce program such as Zen-Cart or OsCommerce. These have plenty of built in features which would likely come in handy. e.g. if the takeaway sells pizza, it is easy enough to set up additional fields (such as choice of toppings) on products and have the price adjust accordingly.
  10. Lee Boyce posted a topic in Server Side
    Hi. Just wondering if anyone can help me out a little... I'm making a site for a company which sells maps and i'm using zen cart for it. The problem is, there are in excess of 3,000 products and some of them have duplicate titles. Is there a way i can amend the Order Confirmation E-mail to include, either the product descriptions or the category/subcategory the product is contained in. Thanks.
  11. AAaach, thanks adam. I did try that earlier, but never took out the position:absolute 's so it stayed the same. [slaps head] Thanks.
  12. Hi folks. I've came across a little problem on with a site i've been working on, infact, the same problem on a couple of sites and i'm just wondering if there is a way around it. I've used the, pretty common method of centering my site by using position:absolute; left:50%; margin-left:'minus half the width of the div' The problem is...if the windows width is reduced to anything below 'width of the div' the left hand side of the page begins to cut off, and because you can only scroll right, the content is essentially useless. Is there a way i can fix this. Maybe using javascript or something (my knowledge of javascript is limited, but i thought something like this might be along the lines of what i need? lets say the width of the div needing centered is 1000px <script> function setMargin() var width =document.documentElement.­clientHeight/Width; var difference = 1000 - document.documentElement.­clientHeight/Width; if (width < 1000) { document.getElementById('the_div').object.style.marginLeft = difference;} else {document.getElementById('the_div').object.style.marginLeft="-500";} </script> The site i'm working on just now can be viewed At this location Reduce the window size and you will see my problem. Maybe javascript isnt the way to fix it, so any suggestions would be much appreciated. Thanks.
  13. i've got a dedicated server so thats all good. cheers! =)
  14. Hopefully this will help you....i used it for a site i finished recently. Not sure how efficient it is and i'm sure there are better methods but it suited me at the time. Hope it helps. The Form Page. <?php include("your config"); // initialization $photo_upload_fields = "10"; $counter = 1; // default number of fields $number_of_fields = "10"; // If you want more fields, then the call to this page should be like, // preupload.php?number_of_fields=20 if( $_GET['number_of_fields'] ) $number_of_fields = (int)($_GET['number_of_fields']); // Lets build the Photo Uploading fields while( $counter <= $number_of_fields ) { $photo_upload_fields .=<<<__HTML_END Image {$counter}: <input name=' photo_filename[]' type='file' /> <input type='hidden' name='photo_caption[]' value='$_GET[propid]' /> __HTML_END; $counter++; } // Final Output echo <<<__HTML_END <form enctype='multipart/form-data' action='includes/properties/uploadimg.php' method='post' name='upload_form'> <div id="col1"> <!-Insert the photo fields here --> $photo_upload_fields <input type='submit' name='submit' value='Add Photos' /> </div> </form> __HTML_END; ?> The Processing Page <?php include("your config"); // initialization $result_final = ""; $counter = 0; // List of our known photo types $known_photo_types = array( 'image/pjpeg' => 'jpg', 'image/jpeg' => 'jpg', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/x-png' => 'png' ); // GD Function List $gd_function_suffix = array( 'image/pjpeg' => 'JPEG', 'image/jpeg' => 'JPEG', 'image/gif' => 'GIF', 'image/bmp' => 'WBMP', 'image/x-png' => 'PNG' ); // Fetch the photo array sent by preupload.php $photos_uploaded = $_FILES['photo_filename']; // Fetch the photo caption array $photo_caption = $_POST['photo_caption']; while( $counter <= '20' ) { if($photos_uploaded['size'][$counter] > 0) { if(!array_key_exists($photos_uploaded['type'][$counter], $known_photo_types)) { $result_final .= "File ".($counter+1)." is not a photo<br />"; } else { mysql_query( "INSERT INTO properties_pics(`photo_filename`, `photo_caption`) VALUES('0', '".addslashes($photo_caption[$counter])."')" ); $new_id = mysql_insert_id(); $filetype = $photos_uploaded['type'][$counter]; $extention = $known_photo_types[$filetype]; $filename = $new_id.".".$extention; mysql_query( "UPDATE properties_pics SET photo_filename='".addslashes($filename)."' WHERE photo_id='".addslashes($new_id)."'" ); // Store the orignal file copy($photos_uploaded['tmp_name'][$counter], $images_dir."/".$filename); // Let's get the Thumbnail size $size = GetImageSize( $images_dir."/".$filename ); if($size[0] > $size[1]) { $thumbnail_width = 100; $thumbnail_height = (int)(100 * $size[1] / $size[0]); } else { $thumbnail_width = (int)(150 * $size[0] / $size[1]); $thumbnail_height = 150; } // Build Thumbnail with GD 1.x.x, you can use the other described methods too $function_suffix = $gd_function_suffix[$filetype]; $function_to_read = "ImageCreateFrom".$function_suffix; $function_to_write = "Image".$function_suffix; // Read the source file $source_handle = $function_to_read ( $images_dir."/".$filename ); if($source_handle) { // Let's create an blank image for the thumbnail $destination_handle = ImageCreate ( $thumbnail_width, $thumbnail_height ); // Now we resize it ImageCopyResized( $destination_handle, $source_handle, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $size[0], $size[1] ); } // Let's save the thumbnail $function_to_write( $destination_handle, $images_dir."/tb_".$filename ); ImageDestroy($destination_handle ); // $result_final .= "<img src='".$images_dir. "/tb_".$filename."' /> Column ".($counter+1)." Added<br />"; } } $counter++; } // Print Result echo <<<__HTML_END $result_final __HTML_END; ?> Oh, in the form page, i used the photo_caption for another purpose, but hopefully you get the general idea.
  15. Sorry for the delayed reply, got caught up with another site. Thanks for the advice, i found the examples and i think they will help alot. For anyone else who may need them, you will find them here: http://www.rbsworldpay.com/support/bg/index.php?page=development&sub=integration&subsub=examples#basic Thanks skidz!
  16. Hi folks. I have a new client lined up and they would like me to make a simple store for them. It will only have about 8-10 products on it (if that). They have said they would like me to use World Pay. I have never used this before, so just wondering if anyone could suggest the best ways for me to go about this site. Should i use something like osCommerce or Zen Cart, or are there tools provided by World Pay that will allow me just to fully code the site myself. Any help/suggestions would be much appreciated. Thanks, Lee
  17. Recently i've began to agree with SLGWN2P's response and say the price is the price, but if you insist on giving 'mates rates' then that's fair enough. I would advise, make them understand what work is involved with making a content managed site in comparison to the static sites, i done this with a couple of my clients, showed them the basic structure and some snippets of code and they instantly realized it isn't just a case of sticking in some text and pictures. Doing this will help them understand why you are charging more than you did for previous sites. Finally, i cant stress enough that, if you are charging 'mates rates', you get an exact spec of what is required and there is no farting about with 'oh, can you add this or that'...let them know that anything above the set spec will cost them. (learned that the hard way doing a site for a friends auntie) ha, i've ranted a little, don't think i've answered your question.... I'd charge about £350 if you are charging mates rates.
  18. it would pretty much just be a case of renaming the folder, but beware...after doing that, you might need to go through many files and change every occurrence of the /admin folder to /goo4 - depending on the cms and your how much coding you know, this could be a nuisance.
  19. Welcome to the site, i'm pretty sure you'll learn alot from the site!
  20. Simply, it was one of those mistakes that make you want to shoot yourself in the face. if ($propprice = 'pr0'){ $a = 0; $b = 9000000; } elseif ($propprice = 'pr1'){ $a = 0; $b = 150000; } elseif ($propprice = 'pr2'){ $a = 150000; $b = 250000; } elseif ($propprice = 'pr3'){ $a = 250000; $b = 350000; } elseif ($propprice = 'pr4'){ $a = 350000; $b = 9000000; } The 'pr0,1,2,3,4' should have been 'ps0,1,2,3,4' and i should also have used double = Solution: if ($propprice == 'ps0'){ $a = 0; $b = 9000000; } elseif ($propprice == 'ps1'){ $a = 0; $b = 150000; } elseif ($propprice == 'ps2'){ $a = 150000; $b = 250000; } elseif ($propprice == 'ps3'){ $a = 250000; $b = 350000; } elseif ($propprice == 'ps4'){ $a = 350000; $b = 9000000; }
  21. I got this problem sorted. All by myself for a change :-D
  22. I think you could get away with this.... $to = "alex@jumpcommunication.co.uk"; $to2 = "jim@jumpcommunication.co.uk"; $to3 = "john@jumpcommunication.co.uk"; $subject = "Web Enquiry"; $name_field = $_POST['name']; $company_field = $_POST['company']; $contact_tel_field = $_POST['contact_tel']; $email_field = $_POST['email']; $enquiry = $_POST['enquiry']; $dropdown = $_POST['drop_down']; $body = "From: $name_field\n Company: $company_field\n Contact-Tel: $contact_tel_field\n E-Mail: $email_field\n Branch: $dropdown\n Enquiry: $enquiry\n"; mail($to, $subject, $body); mail($to2, $subject, $body); mail($to3, $subject, $body);
  23. Hi people. Wondering if you can give me some advice on this piece of code please. It is a simple search facility i'm going to use on a site i've been working on. There are 3 fields, (Location, Price Range and Bedrooms) I pretty much have the code working...apart from the price section, if for example i searched for "random town" between "150,000 and 250,000" with "3 bedrooms" . It seems to only display the results of searching for property in "random town" with "3 bedrooms" . i.e. it is ignoring the price range part. Any help would be much appreciated, thanks in advance! <?php $proploc= $_POST['location']; $proploc = strtolower($proploc); $propprice = $_POST['price']; $propbeds = $_POST['bedrooms']; if ($propprice = 'pr0'){ $a = 0; $b = 9000000; } elseif ($propprice = 'pr1'){ $a = 0; $b = 150000; } elseif ($propprice = 'pr2'){ $a = 150000; $b = 250000; } elseif ($propprice = 'pr3'){ $a = 250000; $b = 350000; } elseif ($propprice = 'pr4'){ $a = 350000; $b = 9000000; } if ($proploc == "") { $query = "SELECT * FROM properties_text WHERE `prop_price` >= '$a' AND `prop_price` <= '$b' AND `prop_beds` = '$propbeds' ORDER BY `prop_id` DESC LIMIT $cur, $max"; } else { $query = "SELECT * FROM properties_text WHERE `prop_price` >= '$a' AND `prop_price` <= '$b' AND `prop_beds` = '$propbeds' AND (LOWER(`prop_street`) LIKE '%$proploc%' OR LOWER(`prop_town`) LIKE '%$proploc%' OR LOWER(`prop_name`) LIKE '%$proploc%' OR LOWER(`prop_postcode`) LIKE '%$proploc%') ORDER BY `prop_id` DESC LIMIT $cur, $max"; } ?>
  24. Yea, that would probably be a more efficient way of doing it :-D
  25. Thanks very much folks. The solution was pretty much a combination of each. $number = $row[10]; $pr = number_format($number); echo " £ ".$pr." "; (and i also set row 10 , Decimal to 10,2) Thanks again! :-D

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.