Update Help wiki with purchase ad help, a=chris

Chris Pollett [2015-08-06 20:Aug:th]
Update Help wiki with purchase ad help, a=chris
Filename
src/configs/PublicHelpPages.php
src/data/default.db
src/models/PhraseModel.php
diff --git a/src/configs/PublicHelpPages.php b/src/configs/PublicHelpPages.php
index d371c8f00..6f2e7a284 100644
--- a/src/configs/PublicHelpPages.php
+++ b/src/configs/PublicHelpPages.php
@@ -74,6 +74,8 @@ page_header=
 page_footer=

 END_HEAD_VARS
+
+
 EOD;
 $public_pages["en-US"]["Syntax"] = <<< 'EOD'
 page_type=standard
@@ -529,6 +531,39 @@ END_HEAD_VARS
 A large number of captcha refreshes or recover password requests
 have been made from this IP address. Please wait until
 %s to try again.
+EOD;
+$public_pages["en-US"]["presentation"] = <<< 'EOD'
+page_type=presentation
+
+page_alias=
+
+page_border=solid-border
+
+toc=true
+
+title=Test Presentation
+
+author=
+
+robots=
+
+description=
+
+page_header=
+
+page_footer=
+
+END_HEAD_VARS=Title=
+* Slide Item
+* Slide Item
+* Slide Item
+....
+=Title=
+* Slide Item
+* Slide Item
+* Slide Item
+....
+
 EOD;
 $public_pages["en-US"]["privacy"] = <<< 'EOD'
 title=Privacy Policy
@@ -1369,7 +1404,24 @@ page_header=

 page_footer=

-END_HEAD_VARSThis page is used for the creation of advertisements
+END_HEAD_VARSThe &#039;&#039;&#039;Advertisement Name&#039;&#039;&#039;, &#039;&#039;&#039;Text Description&#039;&#039;&#039;, &#039;&#039;&#039;Destination URL&#039;&#039;&#039; fields can be used to create a text-based advertisement. What this ad will look like appears in the &#039;&#039;&#039;Preview&#039;&#039;&#039; area.
+&lt;br /&gt;
+
+The &#039;&#039;&#039;Duration&#039;&#039;&#039; dropdown controls how many days the ad campaign will run for. The campaign starts on the date of purchase and this first day till midnight Pacific Time counts as one day of duration.
+&lt;br /&gt;
+
+&#039;&#039;&#039;Keywords&#039;&#039;&#039; should consist of a comma separated list of words or phrases. Each word or phrase has a minimum bid for each day based on demand for that keyword. If no one so far has purchased an ad for any of the keywords, then this minimum is $1/day/word or phrase. Otherwise, it is calculated using the total of the bids so far.
+&lt;br /&gt;
+
+The &#039;&#039;&#039;Calculate Bid&#039;&#039;&#039; button computes the minimum cost for the campaign you have chosen, add presents a form to receive your credit card information.
+
+On this form the static field &#039;&#039;&#039;Minimum Bid Required&#039;&#039;&#039; field gives the minimum amount required to pay for the advertisement campaign in question. The &#039;&#039;&#039;Expensive word&#039;&#039;&#039; static field says for your campaign which term contributes the most to this minimum bid cost. The Budget fields allows you to enter an amount greater than or equal to the minimum bid that you are willing to pay your ad campaign. If there have been no other bids on your keywords then the minimum bid will show you ad 100% of the time any of your keywords are search for. If, however, there have been other bids, your bid amount as a fraction of the total bid amount for that day for the search keyword is used to select a frequency with which your ad is displayed, so it can make sense to bid more than the minimum required amount.
+&lt;br /&gt;
+
+The &#039;&#039;&#039;Card Number&#039;&#039;&#039; field should be filled in with a valid credit card, in the &#039;&#039;&#039;CVC&#039;&#039;&#039; field you should put the three or four digit card verification number for your card, finally,  the &#039;&#039;&#039;Expiration&#039;&#039;&#039; dropdown is used to set your cards expiration date. If you need to edit the keywords or other details of your ad before purchasing it, you can click the &#039;&#039;&#039;Edit Ad&#039;&#039;&#039; button; otherwise, clicking the &#039;&#039;&#039;Purchase&#039;&#039;&#039; button completes the purchase of your Ad campaign.
+&lt;br /&gt;
+
+The &#039;&#039;&#039;Advertisement List&#039;&#039;&#039; beneath the form lists details for all of the ads you have created from most recent to least recent as well as impression and click information. You can edit the text of your ad (but not the keywords) by clicking an ad&#039;s edit column. You can also Deactivate a campaign to stop it from displaying. This does not refund your money.
 EOD;
 $help_pages["en-US"]["Manage_Machines"] = <<< EOD
 page_type=standard
diff --git a/src/data/default.db b/src/data/default.db
index d4f17a593..d0adff168 100644
Binary files a/src/data/default.db and b/src/data/default.db differ
diff --git a/src/models/PhraseModel.php b/src/models/PhraseModel.php
index 299d4ee92..77f17f4eb 100755
--- a/src/models/PhraseModel.php
+++ b/src/models/PhraseModel.php
@@ -781,8 +781,10 @@ class PhraseModel extends ParallelModel
         }
         $found_metas = array_unique($found_metas);
         $found_materialized_metas = array_unique($found_materialized_metas);
-        if(count($found_metas) == 2 && in_array("site:doc", $found_metas)) {
-            //site:doc doesn't work with materialized metas by itself
+        if(count($found_metas) == 2 && (in_array("site:doc", $found_metas)
+            || in_array("site:any", $found_metas))) {
+            /*site:doc and site:any doesn't work with materialized metas by
+              themselves */
             array_pop($found_materialized_metas);
         }
         $disallow_phrases = array_unique($disallow_phrases);
ViewGit