{"id":4805,"date":"2016-06-28T11:46:00","date_gmt":"2016-06-28T09:46:00","guid":{"rendered":"http:\/\/wppa.nl\/?page_id=4805"},"modified":"2021-09-01T13:47:36","modified_gmt":"2021-09-01T11:47:36","slug":"custom-data","status":"publish","type":"page","link":"https:\/\/wppa.nl\/fr\/docs-by-subject\/custom-data\/","title":{"rendered":"Custom data"},"content":{"rendered":"<h3>How it works<\/h3>\n<p>In <strong>Basic settings -> I -> Items 11 and 12<\/strong> of the <em>Photo Albums -&gt; Settings<\/em> admin page, you can activate the use of Custom Datafields. Each album and each photo (or video or photo with audio) can have up to 10 customized data fields stored with the album \/ photo info. As soon as you define the Title (= caption) of the field, it exists. You can also decide if a field may be visible, and if a field may be editable at the front-end of the website. The checkboxes on every line in the tables in <strong>Advanced settings -> Custom data<\/strong> define if the item may be seen \/ edited at front-end. <\/p>\n <div id=\"wppa-container-wrapper-1\" class=\"aligncenter wppa-container-wrapper \" style=\"width:100%;clear:both;display:block;margin-left:auto;margin-right:auto;padding:0;position:relative;\"><div id=\"wppa-container-1\" style=\"width:100%;\" class=\"wppa-container aligncenter wp-caption\"><div style=\"font-size:0;line-height:0\"><img id=\"ph-3796-1\" title=\"Custom-0.JPG\" style=\"width:100%;margin:0;padding:5px;border:1px solid #c0c0c0;box-sizing:border-box;background-color:#f0f0f0;border-radius:6px;\" alt=\"3796\" class=\"size-medium wppa-sphoto\" onload=\"wppaLazyLoaded++;wppaMakeLazyVisible(&#039;onload&#039;);\" onerror=\"wppaLazyLoaded++;\" decoding=\"async\" data-src=\"https:\/\/wppa.nl\/wp-content\/uploads\/wppa\/3796.jpg?ver=689\" data-stack=\"picture:296:functions:4225\"><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-1\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 135 135\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#404040; background-color:transparent; border-radius:12px;\"><path d=\"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"-360 67 67\" dur=\"2.5s\" repeatCount=\"indefinite\" ><\/path><path d=\"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"360 67 67\" dur=\"8s\" repeatCount=\"indefinite\" ><\/path><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"3796\" align=\"center\"] \/fr\/wp-json\/wp\/v2\/pages\/4805 oc 1 17 queries in 21.3 ms. at 10:50. Max mem: 62.50 Mb. -->\n<p>On the Photo Albums -&gt; Album admin -&gt; Edit Album information -&gt; Manage Photos admin page, you will see the input fields for the custom data right below the <strong>Description<\/strong> input area.<\/p>\n <div id=\"wppa-container-wrapper-2\" class=\"aligncenter wppa-container-wrapper \" style=\"width:100%;clear:both;display:block;margin-left:auto;margin-right:auto;padding:0;position:relative;\"><div id=\"wppa-container-2\" style=\"width:100%;\" class=\"wppa-container aligncenter wp-caption\"><div style=\"font-size:0;line-height:0\"><img id=\"ph-3797-2\" title=\"Custom-1.JPG\" style=\"width:100%;margin:0;padding:5px;border:1px solid #c0c0c0;box-sizing:border-box;background-color:#f0f0f0;border-radius:6px;\" alt=\"3797\" class=\"size-medium wppa-sphoto\" onload=\"wppaLazyLoaded++;wppaMakeLazyVisible(&#039;onload&#039;);\" onerror=\"wppaLazyLoaded++;\" decoding=\"async\" data-src=\"https:\/\/wppa.nl\/wp-content\/uploads\/wppa\/3797.jpg?ver=689\" data-stack=\"picture:296:functions:4225\"><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-2\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 135 135\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#404040; background-color:transparent; border-radius:12px;\"><path d=\"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"-360 67 67\" dur=\"2.5s\" repeatCount=\"indefinite\" ><\/path><path d=\"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"360 67 67\" dur=\"8s\" repeatCount=\"indefinite\" ><\/path><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"3797\" align=\"center\"] \/fr\/wp-json\/wp\/v2\/pages\/4805 oc 2 11 queries in 9.3 ms. at 10:50. Max mem: 62.50 Mb. -->\n<p>The photo description may contain wppa keywords <strong>w#cc0 .. w#cc9<\/strong> to display the captions of the custom data fields, <strong>w#cd0 .. w#cd9<\/strong> to display the data of the respective fields. In this example the description reads as follows:<\/p>\n<pre>&lt;table&gt;&lt;tbody&gt;\r\n&lt;tr&gt;&lt;td&gt;w#cc0&lt;\/td&gt;&lt;td&gt;w#cd0&lt;\/td&gt;&lt;\/tr&gt;\r\n&lt;tr&gt;&lt;td&gt;w#cc1&lt;\/td&gt;&lt;td&gt;w#cd1&lt;\/td&gt;&lt;\/tr&gt;\r\n&lt;tr&gt;&lt;td&gt;w#cc2&lt;\/td&gt;&lt;td&gt;w#cd2&lt;\/td&gt;&lt;\/tr&gt;\r\n&lt;tr&gt;&lt;td&gt;w#cc4&lt;\/td&gt;&lt;td&gt;w#cd4&lt;\/td&gt;&lt;\/tr&gt;\r\n&lt;\/tbody&gt;&lt;\/table&gt;\r\nUploaded: w#timestamp<\/pre>\n<p>Resulting in this output:  <div id=\"wppa-container-wrapper-3\" class=\"alignnone wppa-container-wrapper \" style=\"width:100%;clear:both;padding:0;position:relative;\"><div id=\"wppa-container-3\" style=\"width:100%;\" class=\"wppa-container wp-caption\"><div style=\"font-size:0;line-height:0\"><img id=\"ph-3798-3\" title=\"Custom-2.JPG\" style=\"width:100%;margin:0;padding:5px;border:1px solid #c0c0c0;box-sizing:border-box;background-color:#f0f0f0;border-radius:6px;\" alt=\"3798\" class=\"size-medium wppa-sphoto\" onload=\"wppaLazyLoaded++;wppaMakeLazyVisible(&#039;onload&#039;);\" onerror=\"wppaLazyLoaded++;\" decoding=\"async\" data-src=\"https:\/\/wppa.nl\/wp-content\/uploads\/wppa\/3798.jpg?ver=689\" data-stack=\"picture:296:functions:4225\"><\/div><div class=\"wp-caption-text\"><\/div><svg id=\"wppa-ajax-spin-3\" class=\"wppa-ajax-spin uil-default\" width=\"120px\" height=\"120px\" viewBox=\"0 0 135 135\" preserveAspectRatio=\"xMidYMid\" stroke=\"\" style=\"width:120px; height:120px; position:fixed; top:50%; margin-top:-60px; left:50%; margin-left:-60px; opacity:1; display:none; fill:#404040; background-color:transparent; border-radius:12px;\"><path d=\"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"-360 67 67\" dur=\"2.5s\" repeatCount=\"indefinite\" ><\/path><path d=\"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 67 67\" to=\"360 67 67\" dur=\"8s\" repeatCount=\"indefinite\" ><\/path><\/svg><\/div><\/div>\n<!-- End [wppa type=\"photo\" photo=\"3798\"] \/fr\/wp-json\/wp\/v2\/pages\/4805 oc 3 11 queries in 12.4 ms. at 10:50. Max mem: 62.50 Mb. --><\/p>\n<p>As you can see, the line with the telephon number (w#cc3 and w#cd3) is left out, because the corresponding box is not chekced so it will not display anyway.<\/p>\n<p>The captions as well as the data itsself may be plain text only, without html tags. Any formatting should be done in the description field.<\/p>\n<p>qTranslate shortcodes are supported, e.g.: <b>[<\/b><b>:en]Name[<\/b><b>:nl]Naam[<\/b><b>:fr]Nom[<\/b><b>:]<\/b> can be a Caption, <b>[<\/b><b>:en]Yellow[<\/b><b>:nl]Geel[<\/b><b>:fr]Jaune[<\/b><b>:]<\/b> can be a custom field content, supporting English, Dutch and France languages.<\/p>\n<h3>Bulk input of custom data<\/h3>\n<p>You can bulk input custom data from a .csv (comma separated values) file.<br \/>\nThe file must have the following format:<br \/>\nLine 1 contains a <em>search indicator<\/em>, either <strong>name<\/strong>, <strong>photoname<\/strong> or <strong>filename<\/strong> followed by the <em>captions<\/em> of the custom datafields. The case of the characters ( upper -lowercase ) of the <em>search indicator<\/em> is not important, the <em>captions<\/em> must exactly meet the existing captions as defined in <strong>Advanced settings -> Custom data -> I: Photo custom data fields configuration<\/strong> if they are already defined. If they are not yet defined, they will be created. Note that there is a maximum of 10 fields, supplying more data will fail.<\/p>\n<p>The second and subsequent lines contain the <em>search value<\/em> and the <em>custom data values<\/em> that correspond with the <em>captions<\/em>.<\/p>\n<p>If the <em>search indicator<\/em> is <strong>photoname<\/strong>, all the photos with that name will get the supplied data in the custom data fields.<br \/>\nIf the <em>search indicator<\/em> is <strong>filename<\/strong>, the photos will be searched by their filename.<br \/>\nIf the <em>search indicator<\/em> is <strong>name<\/strong>, the photos will be searched by their name and filename.<\/p>\n<p>Note that multiple photos can get the same custom data this way.<\/p>\n<p>Example file:<\/p>\n<pre>\r\nPhotoname,Sponsored By,Message,Email,Age,City,Major\r\nEvie Leiby,Gold's Gym,Get well.,evie@xxx.com,6,Buffalo,Math\r\nKhalil Golden,ABC Company,It's going to be ok.,gold@yyy.com,,Fredonia,Electronics\r\nAlaeya Martin,Reeds Gems,Wishing you well.,martina@zzz.org,7,Williamsville,Nursing\r\nShamari Bolton,Pet Emporium,\"Hold on, it will all work out.\",,12,Buffalo,Sociology\r\n<\/pre>\n<p>If you have the csv file ready, ftp it to your depot directory (You can find it on the <strong>Photo Albums -> Import Photos<\/strong> admin page usually ...\/wp-content\/wppa-depot\/[loginname]\/). The file MUST have the extension <strong>.csv<\/strong> to be recognized.<\/p>\n<p>After ftp-ing the file, open the Import screen. If there are more files in your depot, you may see the white <strong>Start Ajax<\/strong> button adjacent to the blue <strong>Import<\/strong> button. Use the Import button, the Ajax button will not work for this operation.<\/p>\n<p>If it takes more time than 30 seconds, the procedure will auto restart. During processing, the datalines of which the corresponding photo(s) is\/are found will be removed from the file. If the procedure comes to an end and the file is still there, it will contain the data lines of photos that were not found. The size in kb of the file will be updated every 30 seconds, so you can see the progression. (In my test 10.000 lines were processed within 30 seconds, but it can vary depending on the speed of the database. 2 queries per line are required).<br \/>\n<a id=\"systemdata\" ><\/a><\/p>\n<h3>Bulk input of system data<\/h3>\n<p>The possible items to import using this procedure has been extended to some <strong>system<\/strong> data fields, that may be combined in the same .csv file for the custom data fields.<br \/>\nThe folowing fields are importable:<\/p>\n<pre>\r\n'album',\t\t\/\/ bigint(20) NOT NULL,\r\n'name',\t\t\t\/\/ text NOT NULL,\r\n'description',\t\t\/\/ longtext NOT NULL,\r\n'p_order',\t\t\/\/ smallint(5) NOT NULL,\r\n'linkurl',\t\t\/\/ text NOT NULL,\r\n'linktitle',\t\t\/\/ text NOT NULL,\r\n'linktarget', \t\t\/\/ tinytext NOT NULL,\r\n'owner', \t\t\/\/ text NOT NULL,\r\n'timestamp', \t\t\/\/ tinytext NOT NULL,\r\n'status', \t\t\/\/ tinytext NOT NULL,\r\n'tags',\t\t\t\/\/ text NOT NULL,\r\n'alt',\t\t\t\/\/ tinytext NOT NULL,\r\n'modified',\t\t\/\/ tinytext NOT NULL,\r\n'location',\t\t\/\/ tinytext NOT NULL,\r\n'views',\t\t\/\/ bigint(20) NOT NULL default '0',\r\n'clicks',\t\t\/\/ bigint(20) NOT NULL default '0',\r\n'exifdtm', \t\t\/\/ tinytext NOT NULL,\r\n<\/pre>\n<p>Make sure the values have the right format! Note that the formats, like <code>\/\/ tinytext NOT NULL,<\/code> as listed above, are for your reference only, do not include them in your .csv file!<br \/>\nThe first item on the headerline (the <em>search indicator<\/em>) MUST be <strong>filename<\/strong> when you bulk import system fields.<br \/>\nIt simply works now as follows: If a 'system' datafieldname is found in the .csv headerline, it is assumed to be the system data field, else it is assumed to be a custom data field.<br \/>\nThere is no way to import a .csv file for album custom fields.<br \/>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How it works In Basic settings -> I -> Items 11 and 12 of the Photo Albums -&gt; Settings admin page, you can activate the use of Custom Datafields. Each album and each photo (or video or photo with audio) can have up to 10 customized data fields stored with the album \/ photo info. <a href='https:\/\/wppa.nl\/fr\/docs-by-subject\/custom-data\/' class='excerpt-more'>[...]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":4738,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4805","page","type-page","status-publish","hentry","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/pages\/4805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/comments?post=4805"}],"version-history":[{"count":3,"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/pages\/4805\/revisions"}],"predecessor-version":[{"id":6706,"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/pages\/4805\/revisions\/6706"}],"up":[{"embeddable":true,"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/pages\/4738"}],"wp:attachment":[{"href":"https:\/\/wppa.nl\/fr\/wp-json\/wp\/v2\/media?parent=4805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}