Jump to content

turkspartan

Members
  • Posts

    62
  • Joined

  • Last visited

turkspartan's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. So if all my websites are effected, does this mean I have to clean all websites? Or something is in the server root somewhere, where if I just remove that, it will fix all?
  2. I had the same site running for a long time and it was fine. From what I can tell someone is doing something to it. Plus like I said it is effecting all of my sites, so something is in the root.....
  3. Hey guys. My website is labeled as a reported attack site. I got sitelock to clean it but it cant. It is effecting all of my websites in my godaddy hosting. I need this fixed soon and I have no idea how to. Any ideas would be GREATLY appreciated.... www.restonwebdesign.com www.ottomankitchen.us
  4. Thanks guys, but the developer of the code got in touch with me and fixed it.
  5. I got rid of the right and left id tags, but that wasn't interfering. I also did the other changes you wanted and still no result on mobile. I think the problem starts after this line "// get the makes and models for a year in one go... " It gets makes and models at the same time, when it would be better to get it one after another. BUT again, I have no idea why this works on desktop but not mobile
  6. What I don't get it why it works on desktop, but not mobile...
  7. Oh god, I don't even know how I am going to make that happen, but I'll try. Thanks. If you or anyone else has other suggestions in the mean time, don't hesitate to let me know
  8. Hello guys. I have been stuck on this over 2 weeks. If you go to my site at http://abautoglass.net/contact-us/ there is a form. On PC, I can select year, make, model, and trim just fine. IF I try this on mobile device, I select year, then make. BUT when it comes to selecting model, it starts to show models for ALL cars and not the one I specified.... Please please please help if you can :'( Here is the javascript that goes with it in the footer. PS: I think its because it gets make and model at the same time. <script> var protoCall = "https://"; var host = "api.edmunds.com"; // Make sure to change the API KEY var apiKey = "kdrpch68q5kmjrb42nmne562"; var fmt = "json"; var standardParams = "&fmt=" + fmt + "&api_key=" + apiKey + "&callback=?"; var $yearSelect = jQuery('#ajYears'); var $makeSelect = jQuery('#ajMakes'); var $modelSelect = jQuery('#ajModels'); var $styleSelect = jQuery('#ajStyles'); // lets bind some events on document.ready. jQuery(function(){ $yearSelect.on('change', function() { getMakeModelsByYear()}); $makeSelect.on('change', function() { enableModelDropdown() }); $modelSelect.on('change', function() { getStyles() }); // lets build the year drop down. ajEdmundsBuildYear(); }); // method to build the year drop down. function ajEdmundsBuildYear() { var baseYear = 1990, endYear = new Date().getFullYear(); $yearSelect.empty(); $yearSelect.append('<option value="-1">Select Year</option>'); for(var yyyy=baseYear; yyyy<=endYear; yyyy++) { $yearSelect.append('<option value="' + yyyy + '">' + yyyy +'</option>'); } } // get the makes and models for a year in one go... function getMakeModelsByYear() { var year = $yearSelect.val(), endPoint = "/api/vehicle/v2/makes", view = "basic", options = "year=" + year + "&view=" + view + standardParams, postURL = protoCall + host + endPoint + "?" + options; jQuery.getJSON(postURL, function(data) { // clear the make drop down... re add the first option... remove dsiabled attr. $makeSelect.empty(); $makeSelect.append('<option value="-1">Select Make</option>'); $makeSelect.removeAttr('disabled'); $modelSelect.empty(); $modelSelect.append('<option value="-1">Select Model</option>'); // loop the makes... each make contains model... add the make in make drop down and models in model dd jQuery.each(data.makes, function(i, val) { make = data.makes[i]; $makeSelect.append('<option value="' + make.niceName + '">' + make.name + '</option>'); jQuery.each(make.models, function(x, val){ model = make.models[x]; $modelSelect.append('<option make="' + make.niceName +'" value="' + model.niceName + '">' + model.name + '</option>'); }); }); }); } // since we already grabed the models... // now just matter of showing only the matching models for a make. function enableModelDropdown() { var make = $makeSelect.val(); $modelSelect.removeAttr('disabled'); $modelSelect.find('option').not('[value="-1"]').hide(); $modelSelect.find('option[make=' + make + ']').show(); } // grab the styles... pretty much same as // getMakeModelsByYear() function getStyles() { var year = $yearSelect.val(), make = $makeSelect.val(), model = $modelSelect.val(), endPoint = "/api/vehicle/v2/" + make + "/" + model + "/" + year + "/styles", view = "basic", options = "view=" + view + standardParams, postURL = protoCall + host + endPoint + "?" + options; jQuery.getJSON(postURL, function(data) { $styleSelect.empty(); $styleSelect.removeAttr('disabled'); $styleSelect.append('<option value="-1">Select Style</option>'); jQuery.each(data.styles, function(i, val) { style = data.styles[i]; $styleSelect.append("<option value='" + style.id + "'>" + style.name + "</option>"); }); }); } </script>
  9. God bless you brother. I appreciate your help. Apparently the plugin itself was f'ed up to begin with. I deactivated it, ripped the code apart and imported the code in outside of the plugin. Thanks! I even wrote a guide in the plugins support section, since the maker of the plugin wont fix it
  10. I will figure out the child theme stuff soon. Thanks much for helping, but I am super close to dying from stress like a fish!!! Worked 11 hours yesterday alone on this. Here is what I did so far. in the functions.php file I inserted: wp_enqueue_script( 'customcarquery', get_template_directory_uri() . '/customcarquery.js', array ( 'jquery' ), 1.1, false); wp_enqueue_script( 'customcarquerycode', get_template_directory_uri() . '/customcarquerycode.js', array ( 'jquery' ), 1.1, false); in customcarquerycode I took out the scripts and have $(document).ready( function() { //Create a variable for the CarQuery object. You can call it whatever you like. var carquery = new CarQuery(); //Run the carquery init function to get things started: carquery.init(); //Optionally, you can pre-select a vehicle by passing year / make / model / trim to the init function: //carquery.init('2000', 'dodge', 'Viper', 11636); //Optional: Pass sold_in_us:true to the setFilters method to show only US models. carquery.setFilters( {sold_in_us:true} ); //Optional: initialize the year, make, model, and trim drop downs by providing their element IDs carquery.initYearMakeModelTrim('car-years', 'car-makes', 'car-models', 'car-model-trims'); //Optional: set the onclick event for a button to show car data. $('#cq-show-data').click( function(){ carquery.populateCarData('car-model-data'); } ); //Optional: initialize the make, model, trim lists by providing their element IDs. carquery.initMakeModelTrimList('make-list', 'model-list', 'trim-list', 'trim-data-list'); //Optional: set minimum and/or maximum year options. carquery.year_select_min=1990; carquery.year_select_max=1999; //Optional: initialize search interface elements. //The IDs provided below are the IDs of the text and select inputs that will be used to set the search criteria. //All values are optional, and will be set to the default values provided below if not specified. var searchArgs = ({ body_id: "cq-body" ,default_search_text: "Keyword Search" ,doors_id: "cq-doors" ,drive_id: "cq-drive" ,engine_position_id: "cq-engine-position" ,engine_type_id: "cq-engine-type" ,fuel_type_id: "cq-fuel-type" ,min_cylinders_id: "cq-min-cylinders" ,min_mpg_hwy_id: "cq-min-mpg-hwy" ,min_power_id: "cq-min-power" ,min_top_speed_id: "cq-min-top-speed" ,min_torque_id: "cq-min-torque" ,min_weight_id: "cq-min-weight" ,min_year_id: "cq-min-year" ,max_cylinders_id: "cq-max-cylinders" ,max_mpg_hwy_id: "cq-max-mpg-hwy" ,max_power_id: "cq-max-power" ,max_top_speed_id: "cq-max-top-speed" ,max_weight_id: "cq-max-weight" ,max_year_id: "cq-max-year" ,search_controls_id: "cq-search-controls" ,search_input_id: "cq-search-input" ,search_results_id: "cq-search-results" ,search_result_id: "cq-search-result" ,seats_id: "cq-seats" ,sold_in_us_id: "cq-sold-in-us" }); carquery.initSearchInterface(searchArgs); //If creating a search interface, set onclick event for the search button. Make sure the ID used matches your search button ID. $('#cq-search-btn').click( function(){ carquery.search(); } ); }); The year dropdown in http://abautoglass.net/contact-us/ wont detect any java. its showing empty... BUT I see that the enqueue stuff put the 2 files in the header. WHat am I doing wrong? Is there more to it or something?
  11. I got the first shorter code working with CSS & Javascript Toolbox plugin. But I have no idea what to do about the longer one. Could you show me pleeease I have no idea how that much long code goes in with the link you provided.
  12. I looked at this before and again now, but I cant make any sense of it...
  13. Hello, I need to add these two codes. I used the plugin CSS & Javascript Toolbox, but it wont work. <script type="text/javascript" src="http://abautoglass.net/wp-content/customcarquery.js"></script> <script type="text/javascript"> $(document).ready( function() { //Create a variable for the CarQuery object. You can call it whatever you like. var carquery = new CarQuery(); //Run the carquery init function to get things started: carquery.init(); //Optionally, you can pre-select a vehicle by passing year / make / model / trim to the init function: //carquery.init('2000', 'dodge', 'Viper', 11636); //Optional: Pass sold_in_us:true to the setFilters method to show only US models. carquery.setFilters( {sold_in_us:true} ); //Optional: initialize the year, make, model, and trim drop downs by providing their element IDs carquery.initYearMakeModelTrim('car-years', 'car-makes', 'car-models', 'car-model-trims'); //Optional: set the onclick event for a button to show car data. $('#cq-show-data').click( function(){ carquery.populateCarData('car-model-data'); } ); //Optional: initialize the make, model, trim lists by providing their element IDs. carquery.initMakeModelTrimList('make-list', 'model-list', 'trim-list', 'trim-data-list'); //Optional: set minimum and/or maximum year options. carquery.year_select_min=1990; carquery.year_select_max=1999; //Optional: initialize search interface elements. //The IDs provided below are the IDs of the text and select inputs that will be used to set the search criteria. //All values are optional, and will be set to the default values provided below if not specified. var searchArgs = ({ body_id: "cq-body" ,default_search_text: "Keyword Search" ,doors_id: "cq-doors" ,drive_id: "cq-drive" ,engine_position_id: "cq-engine-position" ,engine_type_id: "cq-engine-type" ,fuel_type_id: "cq-fuel-type" ,min_cylinders_id: "cq-min-cylinders" ,min_mpg_hwy_id: "cq-min-mpg-hwy" ,min_power_id: "cq-min-power" ,min_top_speed_id: "cq-min-top-speed" ,min_torque_id: "cq-min-torque" ,min_weight_id: "cq-min-weight" ,min_year_id: "cq-min-year" ,max_cylinders_id: "cq-max-cylinders" ,max_mpg_hwy_id: "cq-max-mpg-hwy" ,max_power_id: "cq-max-power" ,max_top_speed_id: "cq-max-top-speed" ,max_weight_id: "cq-max-weight" ,max_year_id: "cq-max-year" ,search_controls_id: "cq-search-controls" ,search_input_id: "cq-search-input" ,search_results_id: "cq-search-results" ,search_result_id: "cq-search-result" ,seats_id: "cq-seats" ,sold_in_us_id: "cq-sold-in-us" }); carquery.initSearchInterface(searchArgs); //If creating a search interface, set onclick event for the search button. Make sure the ID used matches your search button ID. $('#cq-search-btn').click( function(){ carquery.search(); } ); }); </script> Thanks!
  14. Okay thanks for all the help guys. I downloaded the script I was using to put all of the data into the SELECT field. Than I switched the line of code from this: options += '<option value="' + trims.model_id + '" '+s+'>' + trim_display + '</option>'; to this: options += '<option value="' + trim_display + '" '+s+'>' + trim_display + '</option>'; So now both the text and value are set to the Trim names. Thanks guys!
×
×
  • Create New...