{"id":1796,"date":"2018-11-06T16:00:26","date_gmt":"2018-11-06T21:00:26","guid":{"rendered":"https:\/\/xlinesoft.com\/blog\/?p=1796"},"modified":"2018-11-06T16:06:29","modified_gmt":"2018-11-06T21:06:29","slug":"customizing-project-logo","status":"publish","type":"post","link":"https:\/\/xlinesoft.com\/blog\/2018\/11\/06\/customizing-project-logo\/","title":{"rendered":"Customizing project logo"},"content":{"rendered":"<p>Project logo (by default a project name) appears in the top left corner of the menu and points to the welcome page. In this article we&#8217;ll show you ways to customize this project logo.<\/p>\n<p>By default project logo is nothing but project name. Kind of looks boring.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_0-300x124.png\" alt=\"\" width=\"300\" height=\"124\" class=\"alignnone size-medium wp-image-1846\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_0-300x124.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_0-150x62.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_0-400x166.png 400w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_0.png 480w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\n<!--more--><\/p>\n<h3>1. Change project name<\/h3>\n<p>In version 10 proceed to &#8220;Editor&#8221; screen, double-click on Project Logo and edit it. Looks a little better.<\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1-300x213.png\" alt=\"\" width=\"300\" height=\"213\" class=\"alignnone size-medium wp-image-1847\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1-300x213.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1-768x546.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1-150x107.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1-400x284.png 400w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_1.png 788w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>2. Add an image<\/h3>\n<p>Double-click Project Logo again and insert image HTML code. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_2.png\" alt=\"\" width=\"731\" height=\"530\" class=\"alignnone size-full wp-image-1843\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_2.png 731w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_2-300x218.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_2-150x109.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_2-400x290.png 400w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>And here is how it looks in generated application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_3.png\" alt=\"\" width=\"409\" height=\"197\" class=\"alignnone size-full wp-image-1844\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_3.png 409w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_3-300x144.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_3-150x72.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_3-400x193.png 400w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/p>\n<p>HTML code for this:<\/p>\n<pre name=\"code\" class=\"php:nocontrols\">&lt;img src='https:\/\/yourwebsite.com\/images\/balloons.png'>Arizona Dreams<\/pre>\n<h3>3. Changes via code<\/h3>\n<p>Project logo doesn&#8217;t need to be static, you can display bit of useful info from the database there. For this purpose we can use Labels API. Code can be added to AfterAppInit event. This code shows today&#8217;s sales. <\/p>\n<p>PHPRunner:<\/p>\n<pre name=\"code\" class=\"php:nocontrols\">$sales=DBLookup(\"select sum(UnitPrice*Quantity) from `Order details` od  \r\ninner join Orders o where o.OrderID=od.OrderID and DATE(OrderDate) = CURDATE()\");\r\nLabels::setProjectLogo(\"Sales today: $\".number_format($sales, 2, \".\", \",\"));<\/pre>\n<p>ASPRunner.NET:<\/p>\n<pre  name=\"code\" class=\"csharp:nocontrols\">dynamic sales = tDAL.DBLookup(@\"select sum(UnitPrice*Quantity) from `Order details` od \r\ninner join Orders o where o.OrderID=od.OrderID and DATE(OrderDate) = CURDATE()\");\r\nLabels.setProjectLogo(String.Format(\"Sales today: {0:c}\", sales));<\/pre>\n<p>Generated application:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_4.png\" alt=\"\" width=\"439\" height=\"194\" class=\"alignnone size-full wp-image-1845\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_4.png 439w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_4-300x133.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_4-150x66.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2018\/11\/project_logo_4-400x177.png 400w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/p>\n<p>More info on setProjectLogo() function:<\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/phprunner\/docs\/setprojectlogo.htm\">PHPRunner<\/a><\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/asprunnernet\/docs\/setprojectlogo.htm\">ASPRunner.NET<\/a><\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/asprunnerpro\/docs\/setprojectlogo.htm\">ASPRunnerPro<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project logo (by default a project name) appears in the top left corner of the menu and points to the welcome page. In this article we&#8217;ll show you ways to customize this project logo. By default project logo is nothing but project name. Kind of looks boring.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,1,8],"tags":[],"class_list":["post-1796","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-php-category","category-tutorials"],"_links":{"self":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=1796"}],"version-history":[{"count":7,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1796\/revisions"}],"predecessor-version":[{"id":1853,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1796\/revisions\/1853"}],"wp:attachment":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=1796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=1796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=1796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}