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.

chorleyprint

Privileged
  • Joined

  • Last visited

Everything posted by chorleyprint

  1. I see a lot of web development companies doing this, using paid for templates and selling them as their work, which is largely why I left the industry. It's a huge shame.
  2. Not sure why you've resurrected an anciant thread just to post that, but, you are kidding right?
  3. Funny how almost all questions asking for advice on computers end up in a Mac vs PC debate.....personally, I'd go with a Mac every time
  4. I am working on a script to scan an ecommerce site for unused images. The script searches the 'images' folder and its sub-folders for files then creates a list of any images it finds in the following format: image.jpg product_images/2000/image.jpg The script then scans pre-defined tables in the database to check for references to images, however, the images are stored in the database by filename only (i.e. 'image.jpg') and not by a full file path, so even if an image path is 'product_images/2000/image.jpg', it's stored in the database as 'image.jpg' and the front-end code works out the rest of the file structure depending on the product code of the current product. This is causing me issues because the database scan is finding 'image.jpg' but the server file scan is finding 'product_images/2000/image.jpg'. Can anyone please tell me how I can edit the code below to remove the 'sub-directory/' part of what the server file scan is finding? <?php /* AZER: (This is an option to set n the code below) commented out gif and png reports since it give a lot of infos on image type few people use for products photos */ require('includes/application_top.php'); set_time_limit (0); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_REMOVE_IMAGES); // azer modifid to read from configure.php : $root_dir = 'v:/easyphp/www/ms2fr/shop'; $root_dir = DIR_FS_CATALOG ;// look in this root // azer modifid, to read from configure.php : $base_dir = 'http://localhost/ms2fr/shop'; $base_dir = HTTP_SERVER . DIR_WS_CATALOG ; // for links /////////////////////////////////////////////////////////////////////////////////// // ADDITIONAL OPTIONS AND SETTINGS BELOW // if script timesout you may elect to turn off the displays for the list of images // in the DB and the server, this will free up server resources, // the lists are for infomational purposes only anyway. // /////////////////////////////////////////////////////////////////////////////////// //TURN OFF DB DISPLAY $turn_off_db_display = 0; // 0 means it is on, 1 means it is off //TURN OFF SERVER DISPLAY $turn_off_server_display = 0; // 0 means it is on, 1 means it is off // look in this images folder - do not add more folders here - just the main one $images_dir = DIR_WS_IMAGES; // set to catalog images folder ie 'images'; // Check product descriptions for images (set to false to disable) $descip_check = true; // Remove images matching pattern from the check, ie put 'thumb' to exclude all images with 'thumb' as part of the name (or directory). $pattern = ''; // Add links to product images with missing files, only applies to product images (not description) (set to true to enable) $product_links = true; // check sub-folders within the 'images' directory (will only go 'one deep') (set to true to enable) $check_folders = true; // exclude the following folders from the check, format must be EX: $exclude_folders = array("banners","default","icons","mail","infobox","pr","links"); // Compare with (if you have it): Select Product Image Directory & Instant Update - Multilanguage V1.15 // catalog/images subfolders to exclude from adding new images // $exclude_folders = array( "UHtmlEmails","banners","default","icons","mail","buttons","infobox","js"); $exclude_folders = array("UHtmlEmails","UNUSED","banners","default","mail","icons","infobox","thumbs","AboutGeyser","Payment_and_Delivery","ProductGuides","Showroom","Contact-us","account_page","Checkout","Returns","Vacancies","brands"); // to add more tables use do it like so: $table_array = array("products_image","products_image_med"); // see below for possible image names $table_array = array("products_image"); /* Additional possible image names ,"products_image_med","products_image_lrg","products_image_sm_1","products_image_xl_1","products_image_sm_2","products_image_xl_2","products_image_sm_3","products_image_xl_3","products_image_sm_4","products_image_xl_4","products_image_sm_5", "products_image_xl_5","products_image_sm_6","products_image_xl_6" */ // name of this script $script_name = "remove_unused_images.php"; /* ADVANCED OPTION for SQL query - DEFAULT SETTING: get all products even if status is off and there is no quantity $optional_sql = "" get image info if the product status is on or if the product has a qty greater than 0 example query: $optional_sql = " where p.products_status = '1' or p.products_quantity >= '0'"; get image info if the product status is on only example query: $optional_sql = " where p.products_status = '1'"; */ $optional_sql = ""; // Additional tables to be checked ie TABLE_LINKS $dbase_tables = array(TABLE_CATEGORIES, TABLE_MANUFACTURERS, 'products_images_gallery', 'products_images_gallery'); // Image Field names within above tables (THESE MUST MATCH) ie 'links_image_url' $image_array = array('categories_image', 'manufacturers_image', 'large', 'small'); ///////////////////////////////////////////////////// // // // Do not edit below // // // ///////////////////////////////////////////////////// // AZERISH ***** //original: AZER removed the extra slash : $root_images_dir = $root_dir . '/' . $images_dir;// look in this main images folder $sess_id = (tep_not_null(SID)); if (substr($images_dir, -1) != '/') $images_dir .= '/'; //add trailing slash to images dir if none.. $exclude_folders[] = "UNUSED"; $root_images_dir = $root_dir . $images_dir;// look in this main images folder if (!file_exists($root_images_dir)) die('<center><br><br><b>'.TEXT_LINE_96_1.' ('.$root_images_dir.') '.TEXT_LINE_96_2.'</b></center><br><br>'); // Read the database, then put all existing db images into an array called $full_image_list[] $sql = "select "; $numb_tables = count($table_array); for ($i = 0; $i < $numb_tables; ++$i) { $sql .= ' p.' . $table_array[$i] . ($i == ($numb_tables-1) ? ' ' : ', '); } if ($product_links) { $sql .= ', p.products_id '; $id_array = array(); } $sql .= "from " . TABLE_PRODUCTS . " p "; $sql .= $optional_sql; if (require ('includes/configure.php')){}else{echo '<center><br><br>'.TEXT_LINE_110.'</center><br><br>';break;}// login info $conn = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die("<center><br><br>".TEXT_LINE_112."</center><br><br>" . mysql_error());// connect to db $select_db = mysql_select_db(DB_DATABASE, $conn) or die("<center><br><br>".TEXT_LINE_114."</center><br><br>" . mysql_error()); //select the right db $image_info_query = mysql_query($sql, $conn) or die("<center><br><br>".TEXT_LINE_116."</center><br><br>" . mysql_error()); $numb_tables = count($table_array); // put the images in an array while ($image_info = mysql_fetch_array($image_info_query)) { for ($i = 0; $i < $numb_tables; ++$i) { // ***azerish: *If only jpg format is used* if (strpos($image_info[$table_array[$i]], 'jpg')) if( strpos(strtolower($image_info[$table_array[$i]]), 'jpg') || strpos(strtolower($image_info[$table_array[$i]]), 'gif') || strpos(strtolower($image_info[$table_array[$i]]), 'png')) { $full_image_list[] = strip_tags($image_info[$table_array[$i]]); //put all db images into 1 array if ($product_links) $id_array[$image_info[$table_array[$i]]] = $image_info['products_id']; } // store product id for image } } // Place images from additional tables into the same array if (count($dbase_tables) != count($image_array)) die("<center><br><br>".TEXT_LINE_135."</center><br><br>"); for ($i = 0; $i < count($dbase_tables); ++$i) { $image_query = tep_db_query("select " . $image_array[$i] . " as image from " . $dbase_tables[$i]); while ($image = tep_db_fetch_array($image_query)){ if (strpos(strtolower($image['image']), 'jpg') || strpos(strtolower($image['image']), 'gif') || strpos(strtolower($image['image']), 'png')) $full_image_list[] = strip_tags(str_replace($images_dir, '', $image['image'])); } } // end reading the database for installed images // get the server images/ $serverfiles = array(); GetImageListFromServer($root_images_dir,$serverfiles); // get all sub-directories of images directory, exlude any in exclude list if ($check_folders) { function expandDirectories($base_dir) { global $exclude_folders; $directories = array(); foreach(scandir($base_dir) as $file) { if($file == '.' || $file == '..') continue; $dir = $base_dir.DIRECTORY_SEPARATOR.$file; if(is_dir($dir) && !in_array($file,$exclude_folders)) { $directories []= $dir; $directories = array_merge($directories, expandDirectories($dir)); } } return $directories; } $dir_array = expandDirectories(rtrim($root_images_dir,"/")); // get images in sub-directories foreach ($dir_array as $key => $value) //echo $value."<br>"; GetImageListFromServer($value,$serverfiles); } if (tep_not_null($pattern)) { sort($serverfiles);// server file list for ($i = 0; $i < count($serverfiles); ++$i) // remove any pattern matched images from the server list { if (strpos(strtolower($serverfiles[$i]),strtolower($pattern))) { unset($serverfiles[$i]); } } } $serverfiles = array_unique($serverfiles); //remove duplicates sort($serverfiles);// server file list for ($i = 0; $i < count($serverfiles); ++$i) { $serverfiles[$i] = trim(str_replace( array($root_images_dir,) , "", $serverfiles[$i]),"/");// remove the root part of the image name } if ($descip_check) { // check if any server images are used within product description & add to db list if so. $image_desc_query = mysql_query('select p.products_description as products_description from ' . TABLE_PRODUCTS_DESCRIPTION . ' p ', $conn) or die(TEXT_LINE_188 . mysql_error()); while ($image_desc = mysql_fetch_array($image_desc_query)) { for ($i = 0; $i < count($serverfiles); ++$i) { if (strpos($image_desc['products_description'], $serverfiles[$i])) $full_image_list[] = $serverfiles[$i]; } } } // check for images in specific files, ie header.php, index.php etc add to db list if so. $check1 = file_get_contents (DIR_FS_CATALOG.DIR_WS_INCLUDES . 'header.php'); $check2 = file_get_contents (DIR_FS_CATALOG.FILENAME_DEFAULT); $check3 = file_get_contents (DIR_FS_CATALOG.'stylesheet.css'); $check4 = file_get_contents (DIR_FS_CATALOG.DIR_WS_FUNCTIONS . 'html_output.php'); $check5 = file_get_contents (DIR_FS_CATALOG.'skin/css/geyser.css'); for ($i = 0; $i < count($serverfiles); ++$i) { if (strpos($check1, $serverfiles[$i])) { $full_image_list[] = $serverfiles[$i]; continue; } if (strpos($check2, $serverfiles[$i])) { $full_image_list[] = $serverfiles[$i]; continue; } if (strpos($check3, $serverfiles[$i])) { $full_image_list[] = $serverfiles[$i]; continue; } if (strpos($check4, $serverfiles[$i])) { $full_image_list[] = $serverfiles[$i]; continue; } if (strpos($check5, $serverfiles[$i])) $full_image_list[] = $serverfiles[$i]; } $full_image_list = array_unique($full_image_list); //remove duplicates sort($full_image_list); $count_db_list = count($full_image_list);//number of images installed in the database $count_server_list = count($serverfiles);//number of files on the server // start the html listing page
  5. Thanks guys - I really like the idea of a subscription to a 3rd party service. That's something I don't think many hosting companies do. It would just be a matter of securing good pricing from those providers, so that may be one for the future. Yeah, a free domain name is all too common really. Maybe we could do a combination, but we'll see.
  6. Thanks for all the ideas so far...some great ideas. Last year we ran with a free domain on any package and that one worked quite well.
  7. It's that time of year where we need to start thinking about what offers we can bring for Christmas 2013, so it would really help us out if you guys n gals could post ideas about what sort of special offer would make you seriously consider switching hosting providers, or give another hosting company a chance with one of your clients websites. We've been around for a while now and we are now really looking to take on the competition big time. We've booked up advertising space in the Web Designer magazine, we've got a new website launching at the end of this month, and we will be taking on new staff to offer as close to 24/7 UK based support as possible, so this will be a great time to come on board and help us to provide our current and new customers with the best service possible.
  8. I have made a Javascript slideshow using the files here: http://msdn.microsoft.com/en-us/library/hh920769(v=vs.85).aspx It works in IE9/Chrome/Safari/Firefox, etc, but does not work in IE9 with compatibility mode on. It just jumps straight to the last image and stays there. Can anyone please recommend what I can do to get it working?
  9. We have been approached by a customer that would like an eCommerce store developing where customers can either order to collect or order to have delivered, however, the customer would like each of their depots to be able to set their prices independently. I was just wondering if there is an open source eCommerce solution that is capable of this sort of site or would it have to be something that's completely bespoke?
  10. The trouble with outsourcing your link building is that you have no real way of keeping tabs on how they achieve what they're doing. They could be using automated software to post links in to generic website directories, etc. We started working with a company post penguin because before they were penguin slapped they had tens of thousands of links (majority of which were spam links in the likes of Last.fm comments). When pengiun happened, their valid links dropped to a couple of hundred (if that) and they got us in to start repairing the damage. The damage being seeing a website at number 2 of page 1 for a fairly broad keyword drop to half way down page 2.
  11. And where exactly does the OP say it's a Windows server?? All he says is he wants a Windows program - presumably for his PC, not the server!
  12. Thanks for all the replies. I couldn't bring myself to buy the 21.5" iMac's knowing that I'd probably regret it at some point down the line so I ended up ordering 2 new 27" iMacs and I absolutely couldn't be happier. I would definitely echo the advice that I received though and anyone in the same boat should definitely go to an Apple Store to compare the two. If you go when it's a bit quieter, you can spend quite a while playing with them without feeling too conscious about people watching
  13. A bit of a brain picking post really. We've got a couple of ideas with regards to expanding our working capacity and one of these is to hire freelancers on a 'per project' basis, but I have a few questions and who better to ask than a bunch of freelancers on a web design forum eh? 1. My first thought is, as a freelancer, would you give better rates to a web design company than you would to the end customer, or would your rates be the same for everyone? 2. As a freelancer, would you like the idea of a close working relationship with a web design company who you would do regular work with? 3. As a freelancer, would you have an issue with working from your clients premises? I'm just throwing thoughts out there because we're putting a lot of effort into local marketing at the moment and want to have facilities in place should we end up with a fair amount of extra work so need to start thinking about these sorts of things
  14. Update: After informing this client that we would be sending out a letter before action today to start legal proceeding, we have now received part payment (equaling 35% of the outstanding balance). When we informed the client that the letter before action was being sent, I said the only thing that would prevent this would be receiving payment by a set time. I was just wondering if anyone could recommend what our next steps should be to recover the remaining 65% of the balance. Should we still send the letter before action? Thanks
  15. I will echo what everyone else has said. Unfortunately, with free web hosting, you are in a tricky position. If you think about it, you're getting a free service and when there are problems, you have no right to complain, no right to expect a fast resolution and there's no incentive for the web host to sort the problems promptly. If you're with a paid host, even if you're only paying £10 a year, you'll find that the host has more of an interest in you. For example, our cheapest package is £10.99/yr but we treat every customer the same and if there are any problems with our customers accounts, we're on it straight away as our intention is to keep customers long term...free hosts are no better off for you hosting your site on their servers.
  16. I'm not trying to shoot you down so sincere apologies if that's the way it came across. I'm just concerned that you may end up struggling to cope with clients expectations if you're offering SEO services whilst you know very little about it and in my experience that makes life stressful and the whole idea of freelancing is to do something you love right? As I said, I am in no way trying to shoot you down but just trying to offer helpful advice.
  17. It's a bit concerning that you're offering SEO services on your website but asking on here if you have used your title tags etc correctly....also could do with proof reading your site content for errors.
  18. I've tried playing with the two iMacs in PC World but it's very difficult to determine for real world use because you can't really open photoshop, etc and start playing round much in a shop As we're thinking of leasing, it's only going to be a few pound a month more for a 27" iMac so might just go with that.
  19. I must admit the grey and green mix doesn't do it for me...it just looks a bit dated (the green in particular reminds me of a Windows 95 desktop). I would maybe a lighter shade of grey (almost white) for the main background and maybe a darker background for the footer
  20. I was recently toying with the idea of replacing my ageing Core 2 Duo 3.16GHz PC with a new Core i3 machine and even got as far as ordering the processor, ram and power supply which they were on offer. However, I'm now looking at the possibility of leasing a couple of iMacs for our office instead. We do web hosting (which is mostly admin/support) and web design but I'm just wondering whether a 21.5" iMac would be big enough for web design or would I be better off getting 27" iMacs? Is there anyone here that does web design on 21.5" iMacs? How do you find it?
  21. The Microservers are brilliant for the price and are also extremely quiet. We started off with one of these and then upgraded to a HP ML110 G6 Quad Core Xeon for our office requirements. In terms of OS, I would highly recommend taking a look at FreeNas. We used this on our Microserver and was excellent. It has all sorts of built in 'server' functions such as FTP, iTunes, SMB, Bittorrent, etc and is....FREE. Out of interest, what cloud service do you use?
  22. No problem at all. As I said, I'll dig out the info I collected when I researched it a while ago and will send you a quick email with it.
  23. I did some research into this sort of thing for a client a couple of months ago. Basically, the only way you would be able to get the domain name from the clients competitor is if the companies name is a registered trademark. I'll try and dig out the notes I made when I did the research if that'd help but I'm just thinking that you may have some weight in the fact that the domain name owner has no rights or legitimate interests in the domain name AND the domain name has been registered and is being used in bad faith. (which are two of ICANN's criteria).

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.