diff --git a/mozilla/webtools/addons/public/htdocs/faq.php b/mozilla/webtools/addons/public/htdocs/faq.php index c84c5f56e6e..d635c355b95 100644 --- a/mozilla/webtools/addons/public/htdocs/faq.php +++ b/mozilla/webtools/addons/public/htdocs/faq.php @@ -11,6 +11,47 @@ startProcessing('faq.tpl','faq',$compileId); require_once('includes.php'); +/** + * Form a properly formatted string for comparison based on applications table + * data. + * @param string $major + * @param string $minor + * @param string $release + * @param string $subver + * @return string $version + */ +function buildAppVersion ($major,$minor,$release,$subver) { + + // This is our final version string. + $version = ''; + + // By default, we cat major and minor versions, because we assume they + // exist and are always numeric. And they typically are, for now... :\ + $version = $major.'.'.$minor; + + // If we have a release and it's not a final version, add the release. + if (isset($release) && (empty($subver) || isset($subver) && $subver != 'final' && $subver != '+')) { + + // Only add the '.' if it's numeric. + if (preg_match('/^\*|\w+$/',$release)) { + $version = $version.'.'.$release; + } else { + $version = $version.$release; + } + } + + // If we have a subversion and it's not 'final', append it depending on its type. + if (!empty($subver) && $subver != 'final') { + if (preg_match('/^\*|\w+$/',$subver)) { + $version = $version.'.'.$subver; + } else { + $version = $version.$subver; + } + } + + return $version; +} + $db->query(" SELECT `title`, @@ -26,6 +67,36 @@ $db->query(" $faq = $db->record; +$sql = " + SELECT + `AppName`, + `GUID`, + `Version`, + `major`, + `minor`, + `release`, + `SubVer` + FROM + `applications` + WHERE + `public_ver`='YES' + ORDER BY + Appname, Version +"; + +$db->query($sql,SQL_ALL,SQL_ASSOC); + +if (is_array($db->record)) { + foreach ($db->record as $row) { + $appVersions[] = array( + 'displayVersion' => $row['Version'], + 'versionNumber' => buildAppVersion($row['major'],$row['minor'],$row['release'],$row['SubVer']), + 'appName' => $row['AppName'], + 'guid' => $row['GUID'] + ); + } +} + $links = array( array( 'href' => './faq.php', 'title' => 'Frequently Asked Questions', @@ -42,6 +113,7 @@ $tpl->assign( 'links' => $links, 'sidebar' => 'inc/nav.tpl', 'content' => 'faq.tpl', - 'title' => 'Frequently Asked Questions') + 'title' => 'Frequently Asked Questions', + 'appVersions' => $appVersions ) ); ?> diff --git a/mozilla/webtools/addons/public/tpl/addon.tpl b/mozilla/webtools/addons/public/tpl/addon.tpl index c47d4443958..edaad26b530 100644 --- a/mozilla/webtools/addons/public/tpl/addon.tpl +++ b/mozilla/webtools/addons/public/tpl/addon.tpl @@ -16,7 +16,7 @@ released on {$addon->VersionDateAdded|date_format}
-{$addon->Description}
+{$addon->Description|nl2br}
Works with: @@ -84,6 +84,9 @@ Works with: Other Versions +
{$addon->devomments|nl2br}
+Mozilla Update is the place to get updates and extras for +your Mozilla products. This service +has undergone several changes that we hope +will make the site better. We have re-enabled access to the developers area +and look forward to serving the extension and theme developer community in the +future! We will be posting frequent +status updates as to our progress with the +UMO service. The best is yet to come!
+ +We are looking for volunteers to help us with UMO. We are in need of PHP +developers to help with redesigning the site, and people to review extensions +and themes that get submitted to UMO. We especially need Mac and Thunderbird +users. If you are interested in being a part of this exciting project, please +join us in #umo on irc.mozilla.org to start getting a feeling for what's up or for a more informal chat. +
+ +| Application Name | +Display Version | +install.rdf Version | +GUID | +
|---|---|---|---|
| {$app.appName} | +{$app.displayVersion} | +{$app.versionNumber} | +{$app.guid} |
This is typically caused by mismatching GUIDs or a duplicate record. If there is a duplicate record, chances are you should submit an update instead of trying to create a new extension or theme. If you cannot see the existing record, then it is owned by another author, and you should consider renaming your extension/theme.
+ +Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
-Stuff goes here.
+For more on the AMO policy, see our draft policy or contact us. + +
To sum it up in once sentence: do what is right for the web. The rest is details. Seriously.
diff --git a/mozilla/webtools/addons/public/tpl/search.tpl b/mozilla/webtools/addons/public/tpl/search.tpl index e2ec6371f26..4ff8b97622d 100644 --- a/mozilla/webtools/addons/public/tpl/search.tpl +++ b/mozilla/webtools/addons/public/tpl/search.tpl @@ -122,7 +122,7 @@ Next Page » {/if} -{$results[r]->Description}
+{$results[r]->Description|nl2br}