Jump to content
  • Similar Content

    • By sbwebNUX
      Hi All,
      I am working on HTML5 and webAPI. I am trying to download a recording in a subfolder within my project directory. By default the download saves it to downloads folder. if I add path it adds it with an _.
       
      Is it possible at all to download my audio file to a specific folder.
      Please someone reply.
       
      Thanks, Sri
    • By GrahamUK33
      I have a boarder around an image, but when a caption is added underneath the image, I am after the boarder to encapsulate the caption.

      .php
      <div id="attachment_55" style="width: 810px" class="wp-caption aligncenter"><img class="wp-image-55 size-full" src="http://ithorizon.online/wp-content/uploads/britain-at-war.jpg" alt="britain at war" width="800" height="600" srcset="http://ithorizon.online/wp-content/uploads/britain-at-war.jpg 800w, http://ithorizon.online/wp-content/uploads/britain-at-war-300x225.jpg 300w, http://ithorizon.online/wp-content/uploads/britain-at-war-768x576.jpg 768w" sizes="(max-width: 800px) 100vw, 800px"><p class="wp-caption-text">Britain at War</p></div>
      .css
      /*-- image, video --*/ img, video {     height: auto; /* maintain scaled height. */     max-width: 100%; /* width of container. */ } img.alignleft, img.alignright {     float: none;     margin: 0; } img.size-full {   padding: .4rem .4rem .4rem .4rem;   background-color: #fdf8f1;   border: 1px solid #f8e4ca;   border-radius: 4px;   -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, .5);   box-shadow: 1px 2px 4px rgba(0, 0, 0, .5); } /*-- image, video caption --*/ .wp-caption, .gallery-caption {     color: #666;     font-style: italic;     margin-bottom: 1rem; /* margin before text */     max-width: 100%; } .wp-caption img[class*="wp-image-"] {     display: block;     margin-left: auto;     margin-right: auto; } .wp-caption .wp-caption-text {     margin: 0; /* text padding */ }  
      As you will notice, I am creating a WordPress theme. I am not sure if I have called up the all the right tags in CSS for the image and caption.
    • By jwbjnwolf
      Hi, I've got a PHP array menu of all folders of a directory which is ordered using the "Arraysortdate" value in each page folder's Json file instead of the folder names. 
      I've basically got everything sorted now, just this one last thing that I realise I like to have.
      A previous/next page button on each page that takes the current page, matches it with the value in the all folders array, and links to the next/previous page in that array which is sorted like previously mentioned using the "Arraysortdate".
      My json files are structuted as follows:
      {  "Arraysortdate": "2018-07-16-1",  "Month": ["July 2018"],  "Category": [    "testcat1",    "testcat2" ] } Here is the PHP I'm using for grabbing all folders and ordering them using the Arraysortdate value for each:
      <?php // initial array containing the dirs $dirs = glob('*/posts/*', GLOB_ONLYDIR); // new array with date as key $dirinfo_arr = []; foreach ($dirs as $cdir) { // get post info from file $dirinfo_str = file_get_contents("$cdir/includes/post-info.json"); $dirinfo = json_decode($dirinfo_str, TRUE); // add current directory to the info array $dirinfo['dir'] = $cdir; // add current dir to new array where date is the key $dirinfo_arr[$dirinfo['Arraysortdate']] = $dirinfo; } // sort new array krsort($dirinfo_arr); ?> Using print_r to dump the array contents, this will return for an item with say the json data as above:
      Array ( [0] => 2018-07-16-1 [1] => Array ( [0] => July 2018 ) [2] => Array ( [0] => testcat1 [1] => testcat ) [3] => blog/posts/test-blog-post ) I use this after sorting the array to output as just the folder path for using in html:
      <?php // get current dir from new array foreach($dirinfo_arr as $key=>$dir) { $dirpath = $dir['dir']; ?>    <!--HTML such as-->    <a href="<?=$dirpath?>">text</a> <?php } ?>  
    • By drkirkby
      My company (Kirkby Microwave) website was coded in XHTML, and had no errors on the W3C validator. It has been suggested that nobody uses XHTML, and I should switch to HTML 5. So I changed the bit at the top of the webpages to read
      <!DOCTYPE html >
       
      After making some minor changes, mainly removing the setting of the width inside the <img src> tag, I can get pages to almost validate. Some don't, but that is simply because I have not got around to fixing the errors. But the W3C validator is always complaining
      Warning: This document appears to be written in English. Consider adding lang="en" (or variant) to the html start tag.
      I can't seem to see how to fix this.  Despite reading the links on the W3C validator page, no matter what I try does not work! Feel free to look at the source of my homepage, and let me know how to fix this.
      I only speak English, so just want to leave it as English, and nothing else.
      I did not post the link to my homepage, as I'd be interested if anyone that Googles Kirkby Microwave finds a .com domain. There is a .com, but it should be hidden from Google, but anyone on the BT broadband network may be able to see it, as the IP address range is restricted to those that BT seems to serve me up.
      Dave
  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      58,574
    • Most Online
      4,970

    Newest Member
    David Rodriguez
    Joined
  • Forum Statistics

    • Total Topics
      65,793
    • Total Posts
      453,274
×