diff --git a/docs/upgrades/upgrade_5.4.0-5.4.1.sql b/docs/upgrades/upgrade_5.4.0-5.4.1.sql index ca86c9e73..4af919b5b 100644 --- a/docs/upgrades/upgrade_5.4.0-5.4.1.sql +++ b/docs/upgrades/upgrade_5.4.0-5.4.1.sql @@ -456,5 +456,9 @@ insert into international (internationalId,languageId,namespace,message,lastUpda delete from international where languageId=12 and namespace='WebGUI' and internationalId=971; insert into international (internationalId,languageId,namespace,message,lastUpdated) values (971,12,'WebGUI','Klokken', 1054580202); delete from international where languageId=12 and namespace='WebGUI' and internationalId=970; +delete from international where languageId=1 and namespace='WobjectProxy' and internationalId=6; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (6,1,'WobjectProxy','With the Wobject Proxy (aka Shortcut) you can mirror a wobject from another page to any other page. This is useful if you want to reuse the same content in multiple sections of your site.\r\n
\r\n\r\nNOTE: The wobject proxy is not available through the Add Content menu, but instead through the shortcut icon on each wobject\'s toolbar.\r\n
\r\n\r\nWobject To Proxy
\r\nProvides a link to the orignal wobject being proxied.\r\n
\r\n\r\nOverride title?
\r\nSet to "yes" to use the title of the wobject proxy instead of the original title of the wobject.\r\n
\r\n\r\nOverride description?
\r\nSet to "yes" to use the description of the wobject proxy instead of the original description of the wobject.\r\n
\r\n\r\nOverride display title?
\r\nSet to "yes" to use the display title setting of the wobject proxy instead of the original display title setting of the wobject.\r\n
\r\n\r\nOverride template?
\r\nSet to "yes" to use the template of the wobject proxy instead of the original template of the wobject.\r\n
\r\n', 1057091098,NULL); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=840; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (840,1,'WebGUI','These macros are designed to provide programming-like functionality. They are powerful when used appropriately, and dangerous when used carelessly. Take care when using these macros.\r\n\r\n
\r\nNOTE: These macros are included in WebGUI in order to provide very powerful display mechanisms. Though they could be used to write simple web applications, this is not their intended use, nor is it supported or condoned by Plain Black. If you find yourself trying to do something like that, just write a macro. =) By default these macros are disabled to protect the security of your site and server, and only your administrator can enable them.\r\n\r\n
\r\n\r\n^D; or ^D(); - Date\r\n\r\nYou can configure the date by using date formatting symbols. For instance, if you created a macro like this ^D("%c %D, %y"); it would output September 26, 2001. The following are the available date formatting symbols:\r\n
\r\n\r\n
| %% | % |
| %y | 4 digit year |
| %Y | 2 digit year |
| %m | 2 digit month |
| %M | variable digit month |
| %c | month name |
| %d | 2 digit day of month |
| %D | variable digit day of month |
| %w | day of week name |
| %h | 2 digit base 12 hour |
| %H | variable digit base 12 hour |
| %j | 2 digit base 24 hour |
| %J | variable digit base 24 hour |
| %p | lower case am/pm |
| %P | upper case AM/PM |
| %z | user preference date format |
| %Z | user preference time format |
\r\n\r\n^Env()
\r\nCan be used to display a web server environment variable on a page. The environment variables available on each server are different, but you can find out which ones your web server has by going to: http://www.yourwebguisite.com/env.pl\r\n
\r\n\r\nThe macro should be specified like this ^Env("REMOTE_ADDR");\r\n
\r\n\r\n^Execute();
\r\nAllows a content manager or administrator to execute an external program. Takes the format of ^Execute("/this/file.sh");.\r\n
\r\n\r\n\r\n^FormParam();
\r\nThis macro is mainly used in generating dynamic queries in SQL Reports. Using this macro you can pull the value of any form field simply by specifing the name of the form field, like this: ^FormParam("phoneNumber");\r\n
\r\n\r\n\r\n^If();
\r\nA simple conditional statement (IF/THEN/ELSE) to control layout and messages.\r\n
\r\nExamples:
\r\nDisplay Happy New Year on 1st January:\r\n ^If(\'^D("%m%d");\' eq \'0101\' , Happy New Year);\r\n
\r\nDisplay a message to people on your subnet (192.168.1.*):
\r\n^If(\'^Env("REMOTE_ADDR");\' =~ /^192.168.1/,"Hi co-worker","Hi Stranger");\r\n
\r\nDisplay a message to Windows users:
\r\n ^If(\'^Env("HTTP_USER_AGENT");\' =~ /windows/i,"Hey... Linux is free !");\r\n
\r\nDisplay a message if a user is behind a proxy:
\r\n ^If(\'^Env("HTTP_VIA");\' ne "", You\'re behind a proxy !, Proxy-free is the best...);\r\n
\r\nDisplay Good Morning/Afternoon/Evening:
\r\n ^If(^D("%J");<=12,Good Morning,^If(^D("%J");<=18,Good Afternoon,Good evening););\r\n
\r\n\r\n^Include();
\r\nAllows a content manager or administrator to include a file from the local filesystem. \r\n
\r\n\r\n^International();
\r\nPull a translated message from the internationalization system.\r\n
\r\n\r\n\r\n^Page();
\r\nThis can be used to retrieve information about the current page. For instance it could be used to get the page URL like this ^Page("urlizedTitle"); or to get the menu title like this ^Page("menuTitle");.\r\n
\r\n\r\n^SQL();
\r\nA one line SQL report. Sometimes you just need to pull something back from the database quickly. This macro is also useful in extending the SQL Report wobject. It uses the numeric macros (^0; ^1; ^2; etc) to position data and can also use the ^rownum; macro just like the SQL Report wobject. Examples:
\r\n ^SQL("select count(*) from users","There are ^0; users on this system.");\r\n
\r\n^SQL("select userId,username from users order by username","<a href=\'^/;?op=viewProfile&uid=^0;\'>^1;</a><br>");\r\n
\r\n^URLEncode();
\r\nThis macro is mainly useful in SQL reports, but it could be useful elsewhere as well. It takes the input of a string and URL Encodes it so that the string can be passed through a URL. It\'s syntax looks like this: ^URLEncode("Is this my string?");\r\n
\r\n\r\n\r\n^User();
\r\nThis macro will allow you to display any information from a user\'s account or profile. For instance, if you wanted to display a user\'s email address you\'d create this macro: ^User("email");\r\n
\r\n\r\n^*; or ^*(); - Random Number
\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache. In addition, you may configure this macro like this ^*(100); to create a random number between 0 and 100.\r\n
\r\n\r\n^-;,^0;,^1;,^2;,^3;, etc.
\r\nThese macros are reserved for system/wobject-specific functions as in the SQL Report wobject and the Body in the Style Manager.\r\n
\r\n', 1057090848,NULL);