Jump to content

Search the Community

Showing results for tags 'Code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 34 results

  1. Woocommerce took out the option for enabling a lightbox feature for your image gallery earlier this year. They have in their documentation to add code if you want to enable the gallery features but don’t actually say where. https://woocommerce.wordpress.com/2017/02/28/adding-support-for-woocommerce-2-7s-new-gallery-feature-to-your-theme/ This is a significant frontend change that can be broken down in to three separate new features; Image zoom / magnification Lightbox Slider To enable each of these features in your theme you must declare support using add_theme_support() like so; 1 2 3 4 5 6 7 add_action( 'after_setup_theme', 'yourtheme_setup' ); function yourtheme_setup() { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } This allows you the flexibility to pick and choose exactly which features you want to include/exclude in your theme or at your store. I am not a developer, I don’t have a developer (and shame on WC for not making this an option that end users can opt for or not without having to add code!) I need to know where to put this code. I am using a child theme called mystile1. I have files called “Theme Functions (function.php)” and one called “custom.css” that’s says it is specifically for adding code to modify my child theme styles. I don’t know which file I should put the above coding in and where. Nowhere does each of these files have a line called “after_setup_theme” So would I be safe in just adding the code as follows in one of those files (which one?) replacing “yourtheme” with the name of my theme: add_action( 'after_setup_theme', 'mystile1_setup' ); function mystile1_setup() { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } Or any other suggestions are greatly appreciated. Thank you.
  2. Encoding PHP code

    Hello guys I need a software or a site that is free or cheap not like Zend guard and stuff it is about 600$ but I need something free or till 50$. I want to encode my PHP codes in a good way and it will be hard to encode it actually 99% of people should could't decode it. Thanks
  3. Code sample license

    Hi! What is the license for the code samples on w3schools.com? Do they require any credit/attribution? I'm just asking because if you are allowed to follow it/use it as a guide for how to do something when working on a project (commercial, personal). Thanks!
  4. login dosent work, code correct?

    Hi W3S I am trying to make a login PHP code with MySQLI and it won't work for some reason, not sure what i have done wrong, can someone see what i did wrong? This is the code: //////////////////////////////////////////////////////////////////////////////////////////////////////// // Login //////////////////////////////////////////////////////////////////////////////////////////////////////// $SUBMIT_FORM_ACTION___TakeLoginForm = (isset($_GET["SUBMIT_FORM_ACTION"]) ? $_GET["SUBMIT_FORM_ACTION"] : ""); if( $SUBMIT_FORM_ACTION___TakeLoginForm == "TakeLogin" ) { $query_1 = "SELECT u_id, u_username, u_password, u_email FROM users WHERE u_email=? AND u_password=?"; if ( $stmt = $mysqli->prepare($query_1) ) { $FORM_email = $_POST['email']; $FORM_password = $_POST['password']; $stmt->bind_param('ss', $FORM_email, $FORM_password); $stmt->execute(); $stmt->bind_result($id, $username, $password, $email); $stmt->fetch(); // SECURITY! CHECK & COMPARE! if($FORM_password !== $password) { die(" <center><b>(Form) Login ErrMSG #1</b></center> <br /> <center>Password incorrect/wrong! Try again!</center> "); } // Make Sessions Needed! $_SESSION['user'] = array(); $_SESSION['user']['id'] = $id; $_SESSION['user']['username'] = $username; $_SESSION['user']['password'] = $password; $_SESSION['user']['email'] = $email; $stmt->close(); //header("location: index.php"); } } okay so lets see if i get this straight. In the bind_result part, this does not matter what kind of variable it is right? In the naming part... or does the names actual HAS to be like the ones in the Database Columns? I somehow think its the part there but correct me if i am wrong... Hoping someone can help me a little bit. Thanks in advance
  5. Fixing my code?!?

    Hi guys, PROBLEM SOLVED (You Can lock this post)
  6. Email html

    Hi Guys, I have a slight problem with some of my code. I have a series of tables running down a page with each table containing different data. All looks fine when I look at it as a HTML page but when I use it as an Email 2/3 elements move for some reason, is there a way I can make sure these elements won't move? The code is in the backend of a program I use and gets called as Emails are generated for different subjects. Thanks in advance, Craig.
  7. console script error

    I found a code to automatically connect people on linkedin, but it is not working. It says, illegal character. Found it here http://www.iftiseo.com/2015/02/code-to-increase-linkedin-connections.html What is wrong?
  8. opencart admin php problem

    hello, Maby you can help me make somthing I have done things myself but i am a litle stuck it has somthing to do with my admin of product list like you can see in the picture i have done alot but now i want to ad a percentage i know that it has somthing to do with taking the result out of the column named (winstverlies) and devide that trough the purchese price and multiply this by 100 but i can not implement this in my code. the code is PHP so who can help me? so i want it to look like on the picture. is this posible? picture is in the file named percentage.jpg So i would be verry pleasd if you could help me?
  9. Learning code (php/sql/etc) part time

    Hi, Can anyone recommend anywhere that I can learn code part time in the United Kingdom? I have been teaching myself html, css, etc on a basic level & now venturing into php, mysql, js, etc & think that having a tutor or guidance would really help speed up my learning process. Any companies or colleges offering part time courses in these area's will hopefully fill in the holes in my knowledge & help me progress. I'm not really concerned about qualification certificates, the knowledge is more important to me. Thanks for any advice. Old Guy.
  10. if statements + document.getElememtById()

    So, I have a code that asks a question, and if the answer in correct, it says correct in the div. If incorrect, it says incorrect. For some reason it always says incorrect even if my answer is correct. Please help, is there anything wrong with this code? //*If players 1 turn if (player == "1"){ //*Asks question var trivia = prompt(questions_obj.question); //*If answer is corerct do stuff if (trivia === questions_obj.answer){ document.getElementById('correctincorrect').innerHTML = "Correct"; $('#character1').animate({left: "+=75px"}, 500, function(){ //*If player gets to finish they win if (player1total == "8"){ var winner1 = alert("Player 1 is the winner!"); $('#character1').remove(); $('#character2').remove(); $('#character3').remove(); $('#player1score').remove(); $('#player2score').remove(); $('#player3score').remove(); $('#player1header').remove(); $('#player2header').remove(); $('#player3header').remove(); $('#player1board').remove(); $('#player2board').remove(); $('#player3board').remove(); } }); //*Adds up players score player1total = player1total + 1; document.getElementById("player1score").innerHTML = player1total; } if (trivia === questions_obj.answer2){ document.getElementById('correctincorrect').innerHTML = "Correct"; $('#character1').animate({left: "+=75px"}, 500, function(){ //*If player gets to finish they win if (player1total == "8"){ document.getElementById('correctincorrect').innerHTML = "Player 1 is the winner!"; $('#character1').remove(); $('#character2').remove(); $('#character3').remove(); $('#player1score').remove(); $('#player2score').remove(); $('#player3score').remove(); $('#player1header').remove(); $('#player2header').remove(); $('#player3header').remove(); $('#player1board').remove(); $('#player2board').remove(); $('#player3board').remove(); } }); //*Adds up players score player1total = player1total + 1; document.getElementById("player1score").innerHTML = player1total; } if (trivia != questions_obj.answer || trivia != questions_obj.answer2){ document.getElementById('correctincorrect').innerHTML = "Incorrect"; }}
  11. Hello, I have recently been working on a HTML form to submit new results into a search engine. However I have ran into a problem that I cant seem to get past. I have one page where the info from the form can be properly submitted, however it requires a password to get into. (its the admin panel) located at index.php?a=admin However when a user tries to insert a new site to the form the just are denied access because they cant log into the admin panel, even though the form itself is not actually in the admin panel... The HTML form looks like this and is located in a page called /AddSite.html however its trying to submit the info to /index.php?a=admin how can I use JavaScript to possibly bypass needing the password? and not redirecting to the admin panel when you click submit? (Also, not as important as the above issue... but as you can see I tried to add a capatcha, but I cant get it to be required, users can press submit without even using the capatcha... if anyone could tell me what I did wrong that would be helpful ) my current code: <form action="/index.php?a=admin" method="post"><div class=""> Site Title: <input type="text" name="addtitle" value="" required/><br /> Site URL: <input type="url" name="addurl" value="http://" required/><br /> Site Description: <br /><textarea lass="ads" name="adddesc" required></textarea><div align="center" class="g-recaptcha" data-sitekey="6LfDoAYTAAAAAOUmPcjfwv3I84xYqFBV5tyQMPJu"></div></div><br /><input type="submit" value="Add new result"/></form> Any help works!!!
  12. how to set a login page

    hello so i created a registration page in html and a php code to connect to a database and enter the information to the database that all works. Now i want to ask if the user wants to log in would they need a separate php code to have a sort of certification that the account is valid? i made a html page for login but i need it to look back to the database to see if the user is registered so they can log in, not just anyone can log in...any ideas? or advice where i can find information about this? i see a lot of tutorials for making a log in page, making a registration page but how about when someone registers and wants to log in but to make sure the database can also check to see if the user is registered.
  13. registration php

    hello so i am making a registration page using html and php, i need to make the information send to mysql that i made with table but i never made select statements..i am not sure on how to make it i need help i am new to this so please bare with me. So I this code to connect to mysql none I am not sure how to fix it i know there must be a problem with the code for the submit line and with the isset. I got them from another user but made minor changes to fit my database. My database has 2 tables one named UserAccount with the information listed in the registration page and then another table named Cart for purchases to be made. Please if you can help me with my code or if you see other errors i think i might have an error with my php where i put firstName, and etc. and if you know any other material or links that would help me for making product information and a cart send to a database if you can share it, im trying but having many issues
  14. Run a HTML on a server

    Hello so i have a problem if you can help teach me please so I need to run a HTML file that i created on a server, it can be local i need to do it for a school project take a html file and make it run on a server, I will be using my computer but i don't know how it can work on a server. Also I have a mac if you can help on how I can run a html file on my computer onto a server
  15. HTML

    Hello i have a problem with my HTML code I have a link to a file that is on my computer but everytime i click the link it leads to an error. I am not sure why because the both files are in the same folder and i have done it before, I put in a website and it does work so I am not sure why my HTML wont open the link when at the home page. This is my code <a href=“Login.html”>Log In</a> Did i do something wrong? the file is named Login.html just like in the quotations
  16. Coding Search Box with a arrow

    I am getting problem with a search box when I coding it. My requirements are it should be pixel perfect. There are three elements, text-box, arrow, border. Please see My attachment. and send me the code what will help me to lot. FYI: I am new in web designing.. Thank you @khalil5172
  17. border coding example

    Hi all,Where can I find coding examples on border for video?Example: <div style="padding:10px;background:#000;webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;width:560px;margin:0 auto;overflow:hidden;"> <iframe src="http://www.youtube.com/embed/MOVIEID?fs=1&autoplay=1&loop=1&rel=0&border=0&modestbranding=1" width="560" height="315" frameborder="0"></iframe></div> in respect of color and style?ThanksRegardssatimis
  18. Looking for a code that's uninfected, preferably code that you can post using the Facebook script code tags. Does anyone have a script code for tagging all frinds in a post, if not then .... Just like all the rest of the auto tag scripts for Facebook on youtube they are not working. I have found one script that works but I can't post what I want, I am not allowed to tag the post that I want. I am only allowed to post what the creator wants me to tag. Make sense? Can you edit the script to allow me to post what I want then tag all my friends?
  19. Hi! My site's navigation looks and works pretty clean for computer use and viewing but when I pull it up on my iphone it's pretty sloppy.. I am looking for a way to code it for mobile devices so its a clean responsive look and user functionality isn't difficult to figure out.. Here is the site.. www.asamusic.us Thanks!!
  20. Currency converter

    Please help me I am building a web-site for sending and receiving money and need to add a currency converter not the ones available on the Internet, how do I do the code?
  21. Hello! I am currently in the progress of building a map, using GPS data points. I have been gathering information about each specific point I plot using the GPS Device. When I export my work into Google Earth, I can click on a point and see a pop-up menu that displays the information gathered about that specific point. I am looking at possibly writing my own XSLT/XSL Template in order to display the information properly. Aside from internet research (Mostly here at W3 Schools), I have no training on XSL and XSLT. I've played around with it, hoping for blind luck, but to no avail. Does anyone have suggestions as far as learning tools, or where to get a solid understanding of what I need to know in order to convert database information into a formatted html table? Also, I need to incorporate thumbnail images in this pop-up menu, generally from the same file path, just different end folders. Any advice or suggestions would be much appreciated. Thank you!
  22. Own Page in Wordpress

    I want to make a page where on each **tags** :My page should look alike : http://www.missmalini.com/aamir-khan-2/Above page is coming from http://www.missmalini.com/celebrity-fan-pages/this are categories with **Tags** :I also know that the patten is likeBig Image is First ( **First** latest Post of resp. tag )... then 4 image with title are from **Second** post )and then only title after **sixth** post .. its means they have **divide latest 10-12 post** with this structure..2 } if u see on top ( above Ten Latest Aamir Khan Updates ) there is "**Aamir Khan Full Bio** " which is ***different*** for resp. **tags**.3 } If Scroll Down there is Photos and Videos of resp. celeb ( which is tags or may be category wise )Hence how i can do this ( means how i can make such Own Custom Page code ) can any one let me know.
  23. Is there anyone that write me a javascript code that will display a certain message based on what time of day it is and what day of the week it is. I run a radio stations website and they want to put up a schedule of their on-air staff and shows on their website.Here is a code i found that worked, but it's just time in general, not what day of the week. Also, how can I make it to get the time in a certain time zone? No message at the present timefunction show() {var nowhrs = new Date().getHours();var nowmins = new Date().getMinutes();var hrsmins = nowhrs + (nowmins/60); // decimals of an hourvar schedule = [['Message 1',[9],[18]], // times are expressed as hours + decimals of an hour, e.g. 30 minutes is .5 hours.['Message 2',[18],[21.5]],['Message 3',[19.5],[20.25]]]var themessage = "";for (var i =0; i = schedule[i][1]) && (hrsmins < schedule[i][2])) {themessage += schedule[i][0] + "";document.getElementById("mymessage").innerHTML = themessage;}}}
  24. Hello all,I have tried so many things to get this to work but to no avail, can someon eplease help me out here with a simple script for n XML steam feed.http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=221380&format=xml OK NOW THE ISSUE IS:I have a blank webpage which I have placed the above link into, I simply want the contents of the XML feed from the link to appear in mypage.......How do I make the contents of that url appear on the same page??SO I NEED THE SMALL SCRIPT OR HTML CODE TO DO THISAlso I would like to have the background a certain colour and use a certain font like 12point arial with bold headings and lower case text.Can someone please provide me with the html to allow this XML feed to appear on my webpage with a different colour background, arial 12pt font inbold and lowercase____________________________________________________________________________I RECEIVED A REPLY TO THIS POST AND THEY ADDED THIS:It's a little hard to tell from what you wrote. But, I think what you are looking for is an AJAX script to pull in the XML,then CSS can take care of the formatting.Look up how to process a XMLHttpRequest in javascript (or another scripting language). That will let you put the XML file into an array. Then,you can use (javascript) document.write() to put the pieces on your page.______________________________________________________________________________SO this being said do I need a javascript code in the page to show the XML Feed with formatting, what would this code be, this is the magicalquestion :)Could someone please please help me..........With regardsMathew
  25. Dynamic XML to updatable HTML

    HiI'm kinda new to XML and coding so I dont know if this is possible...I have this XML made with Processing what it does is: It takes the feed from the webcam and when I press Space it samples color from 2 pixels in different possitions. It writes the XML like this: <?xml version="1.0" encoding="ISO-8859-1"?><COLORS><SHIRT>#959789</SHIRT><PANTS>#19100F</PANTS><SHIRT>#999486</SHIRT><PANTS>#19110D</PANTS><SHIRT>#939791</SHIRT><PANTS>#1D120F</PANTS></COLORS> So everytime I press Space it adds the Tags <SHIRT> and <PANTS>, this means that the XML is always updating What i need now is a HTML that reads the XML and puts colors in cells of a table and everytime there is a new color, it adds it to the table... Is there a way to do that? Please I've been trying this for the last 3 days with no success... Thank you
×