Everything posted by AlexsDesign
-
Selecting the right reseller
I've used Heart for the last 5 years and honestly.... they are brilliant! Highly recommend them. Easy to use software and implementation...
-
Find all CSS classes in Stylesheet Using PHP
Hey guys, Seriously hope someone can help me out here. I'm tearing my hair out! So I'm trying to create a dynamic page which creates "squares" and applies a CSS class to them based on what is in a stylesheet. Sounds simple... however the page needs to auto update when it's loaded and finds a new CSS class within the said stylesheet. Said example can be found here: http://staff.djep.co/styleguide.php In essense, I need to find a way to use PHP to read through a CSS file and create the boxes in a "for each" loop. I'm able to write the for each loop...blah blah blah... but I'm stuck when I get to this sort of CSS in the stylesheet: .metro-block-plum-faded, .metro-button-plum-faded { background-color: #AC859A !important; color: white !important; } .metro-button-plum-faded:hover { background-color: #7F566D !important; color: white !important; } .metro-block-mocha, .metro-button-mocha { background-color: #564D41 !important; color: white !important; } .metro-block-statspurple { background-color: #6E36CF !important; color: white !important; } To start with ... I only need to get the "metro-block" bits .... so the CSS class could be called "metro-block-plum-faded" or it could be "metro-block-mocha".... however they ALWAYS start metro-block ..... I don't need the bit after (metro-button) or the hover CSS. Can anyone tell me how I do this... I'm going insane! PS: I borrowed some code I found from Stackoverflow but I can't quite get it to work how I want, this is what I'm currently using: <?php $css = file_get_contents('http://www.djep2.com/includes/style.css'); preg_match_all( '/(?ims)([a-z0-9\s\,\.\:#_\-@]+)\{([^\}]*)\}/', $css, $arr); $result = array(); foreach ($arr[0] as $i => $x) { $selector = trim($arr[1][$i]); $rules = explode(';', trim($arr[2][$i])); $result[$selector] = array(); foreach ($rules as $strRule) { if (!empty($strRule)) { $rule = explode(":", $strRule); $result[$selector][][trim($rule[0])] = trim($rule[1]); } } } ?> <div class="col-xs-6"> <div class="padding-all-10"> <?php foreach ($result as $key => $value) { if(".metro-block-" == substr($key,0,13)){ $number = substr($key,strrpos($key,'-')); // do whatever you need to with $number.. echo '<div class="col-xs-4"><div class="margin-all-10 padding-all-10 metro-block-lightgray" style="border:1px solid #555;"><div class="block metro-block metro-block'.$number.' margin-all-5">'; echo 'metro-block'.$number; echo '</div></div></div>'; } } ?> </div> </div>
-
Competitor Comparisons - Are they still required in 2014/2015
Hey guys, So I've been rebuilding and rebranding a business I've been running for a few years now.... it's a web hosting / web design business BTW. I've started work on the final few pages and one of them is a "competitor comparison" page. One of my reasoning's against them is, it alerts your customer to potential competitors they may not have known about. However they can show how much better you are, or show the customer how much more value for money they get with yourself. So...I guess my question is... are these types of pages really needed anymore?
-
Desk in Shared Office... your views
Hey guys, So I currently work from home for all of my businesses. But I'm starting to go crazy being all alone here... been working at home for almost 5 years! I've been thinking of getting a desk in a Shared Office based in my hometown of Portsmouth / Southsea They want £200 a month to rent it : http://www.port57.com/pricing/ Just wondering what everyones views on this were? Do you think working in a shared office area is a good idea? Is this expensive? Do you currently work in a shared office area??
-
HeartCon - Heart Internet
Anyone been invited to HeartCon on the 11th September?
-
Portsmouth Freelance Meetup
Hey guys, Anyone in Portsmouth or surrounding areas fancy going to this? http://www.eventbrite.co.uk/e/portsmouth-freelancers-meet-summer-party-2014-tickets-11752188111 Keep thinking about booking a ticket but never been to something like this! LOL
-
Exclude from Jquery Contains Search
Hey guys, I'm stuck and I need some help! LOL How can I make this search function ... exclude content in span tags with the class "excludethis" (<span class="excludethis">Label Title Here</span>) Here is the Javascript: $(".refineSearchInputTextField").keyup(function () { var searchTerm = $(this).val(); var searchItem = $(this).parent().children($("[id^=link_]")); //extends the default :contains functionality to be case insensitive $.extend($.expr[':'], { 'containsi': function(elem, i, match, array) { return (elem.textContent || elem.innerText || '').toLowerCase() .indexOf((match[3] || "").toLowerCase()) >= 0; } }); var searchSplit = searchTerm.replace(/ /g, "'):containsi('") //end of case insensitive chunk //here is the meat. We are searching the list based on the search terms $('[id^=link_]').not(":containsi('" + searchSplit + "')").each(function(e) { //add a "hidden" class that will remove the item from the list $(this).fadeOut( "slow", function() { }); }); //this does the opposite -- brings items back into view $("[id^=link_]:containsi('" + searchSplit + "')").each(function(e) { //remove the hidden class (reintroduce the item to the list) $(this).fadeIn( "fast", function() { }); }); }); Here is the HTML for one of the "Cards" we are iterating through (I've not included the html for the search box as I didn't think it was relavent but it's simply a standard HTML text input with the class of "refineSearchInputTextField". There could be MULTIPLES of these cards showing ... as each card represents an employee in the system. <div class="col-xs-12" id="link_18371"> <div class="metro-block metro-block-atlasblue margin-all-2"> <div class="toolboxtitletext margin-all-8" style="font-size: 25px;"> <p class="toolboxtitletext" >FirstName LastName </p> </div> </div> <div class="metro-block metro-block-lightgray margin-all-2"> <div class="col-xs-12 col-sm-7"> <p class="toolboxtitletext" > <span class="excludethis">Email:</span>info@domain.com </p> <p class="toolboxtitletext" > <span class="excludethis">Category:</span>Owner <span class="excludethis">Employment Type:</span>Employee <span class="excludethis">ID Number:</span>123456 </p> </div> <div class="col-xs-12 col-sm-5"> <a href="xxx" class="excludethis btn btn-large">View</a> </div> </div> </div> So to round up .... I need the Search feature to exclude the information within the spans with the class "excludethis"... so if someone types "Cat" for example it wont show every card because every card has the word "CATagory" ... hope that makes sense
-
Response.Write vs HTML
hey guys, So here is a little background first.... I work with a guy in the states who has been building a piece of software over the last 10 years. When he started he used Classic ASP as he was a microsoft boy ... also PHP wasn't too popular back then, Unfortunately due to the complexity of the software (plus there are only two developers ... him and now me... ) it's NOT feasible to recode it to a different format He's progressed with some modern stuff but still uses "Old school" methods if you ask me ... so my question is which of these scenarios is the better option and WHY!?? Method One: <% Response.Write "<script src=""linktoscripthere""></script>" Response.Write "<div class=""myclassname myclass2"">" Response.Write "<p>Hello world, it's nice to meet you</p>" Response.Write "<p>Lets print out your name: " & name & "</p>" Response.Write "</div>" %> Method Two: <script src=""linktoscripthere""></script> <div class="myclassname myclass2"> <p>Hello world, it's nice to meet you</p> <p>Lets print out your name: <%= name %></p> </div> I personally think method two ... it's much cleaner to read, however sometimes it can get hard reading the logic. But personally two for me! I also feel it puts marginally slightly less strain on the server so quicker load times as it uses the browser more. Whats your views on the methods... which would you use? ( If you are a PHP guy like me and know NOTHING about ASP... imagine the "Response.Write" calls are "echos")
-
@font-face & IE8+
Jaythomas, I can't help with the webfont issue per say... I generally use google fonts as my goto for online "fontage" ( is that a word? LOL ) But this is something that might help for IE testing: https://www.virtualbox.org/ I run it here and it's fantastic. You can then download the "Virtual machines" direct from microsoft here: http://modern.ie/en-us/virtualization-tools#downloads (In the first drop down select windows ... second dropdown select virtualbox) It might help you test for other IE versions.
-
Hello
There are two that I'm aware of so far ... http://phphants.co.uk/meetups and also http://www.pfmeet.co.uk/ Heard some good things about the "PFMEET" one but not been yet as I can be a little shy LOL
-
Hello
Hey Ashley, welcome to the forum! The guys here are really nice! I'm also based in Pompey ( Southsea ... Albert Road area ) Do you attend any of the meet ups in town?
-
Bitcoin as payment .... do you accept it yet?
Hey guys, Are any of you guys accepting Bitcoins as payment yet? I don't think I've seen any designers or web host providers offering it...
- Hi I'm an IP lawyer
- Organising User Uploads
-
Organising User Uploads
Hey guys, I'm create a new feature for a web based software in the states. The feature allows users to upload images and video. My question is ... what is the best way to organise the files on the server? All images are given an ID in a database and can be pulled from this ID. I have two ideas on structure which were : IDEA 1 ================================== -upload folder ---- user1 --------------> images --------------> video ---- user2 --------------> images --------------> video ---- user3 --------------> images --------------> video So basically sub-folder images and videos on a per user basis ( so each user has their own subfolder ) IDEA 2 =================================== -upload folder ----------> Images ----------> Video Everything is store in a single folder ... so images in one folder, videos in the other. No seperation between users. Just thought I'd get your opinions on which solution is the better one... and how you would organise the files Look forward to seeing what you guys think.
-
How to change this old CMS?
Berch, A quick google search shows that it's a defunct CMS.... Looking at the images you've supplied, it was able to ascertain it was developed by sferasoft ... their website is sferasoft.ru A search on Linkedin brings up a few developers for this CMS but none that show as still active. I would HIGHLY recommend moving over to Joomla CMS if you want your clients to be able to modify their websites or if you want extensiblity (is that a word?) ! Joomla are making MASSIVE strides at the moment. Version 3.0 is out at the moment, I would advise starting there.... that way you are ready for when 3.5 comes out later this year. With regards to moving the data, you will NOT be able to simply "dump" the database into Joomla or Wordpress... or any CMS for that matter. You will need to rebuild the site. One thing you can do, is copy and paste the page text into joomla " articles " .... ( thats the word for pages in joomla )... and rebuilding that way.... but other than that, it's a rebuild completely I'm afraid.
-
Web designer in Bournemouth, UK
Dimson, from what I know about the forum ... there are "post restrictions" on where you can post ( and what you can post ) until you reach certain post amounts or reputation ( I could be wrong )
-
Stuck on CSS code..... HELP!
Agree with Alluziion ... If you can give it a class... assign a CSS value. If you can't touch the HTML... then drill down with the CSS. You MIGHT need to use "child and sibling" selectors though. More info about these can be found here: http://css-tricks.com/child-and-sibling-selectors/
-
Special Characters and PHP Variables
Never mind.... Remembers a quick way to do it For anyone else who finds this thread... I've used: $welcomeText = htmlspecialchars ($_POST['welcomeText'], ENT_QUOTES, ENT_HTML401);
-
Special Characters and PHP Variables
hey guys, I hope someone can help me out ... I have a standard HTML form which includes a TEXTFIELD where users can type what they want. I then pass the details to a php variable on post ( which in turn passes it to an XML file for storage ) I've hit a snag and I can't remember how to deal with it... Basically, if the user types in the word .... " can't " .... it doesn't store the ' correctly. How do I convert the text field into a via string to store in the php variable? I'm currently using a very basic: $welcomeText = $_POST['welcomeText'];
-
Site has malware how to fix
What code is being put into the header?
-
Web hosting price
It depends on what their website requirements are... If it's a simple website, I bundle in my middle package for 1 year free* of charge (from the date of website completion / going live ) If it's been a larger than usual website where traffic is anticipated, I put them on my unlimited package for 1 year for free.* If they need more than shared hosting ... then I put them on a VPS to start with ( but the price for the build includes this ) * basically... the price is bundled into the total fee
-
How to make a thumbnail of an image appear with the whole image in a different larger frame
Do you mean a "lightbox" effect? If so there are tons of jquery plugins that can achieve this: http://leandrovieira.com/projects/jquery/lightbox/ and here are tons more https://www.google.co.uk/search?q=jquery+lightbox
-
Get external file....
Thanks for confirming my thoughts
-
Dreamweaver and Jpegs
A few things to try: Capitalisation of the file name ... SmallBanner.jpg Make sure the file name matches the upper and lower case you have in the code above! This could be causing issues Another thing is... and I know you probably already know this, but clear your cache!! Also try loading the file in the browser. If you get a 404 not found, try a ctrl+F5 reload! If it still isn't showing... FTP into the folder and check the file actually exists. Dreamweaver has a habit of not actually uploading additional files such as images.