From fcd649015317616cfbdb07c9aa38b262689dfd30 Mon Sep 17 00:00:00 2001
From: "mike.morgan%oregonstate.edu"
Date: Wed, 5 Apr 2006 01:53:30 +0000
Subject: [PATCH] Updated faq page to include v1 data. App list is cheesy, but
it works. Updateded policy placeholder (had hoped there would be one by now,
but instead I had to point to a fricking draft that I wrote...........
not happy about that
...
git-svn-id: svn://10.0.0.236/trunk@193577 18797224-902f-48f8-a5cc-f745e15eee43
---
mozilla/webtools/addons/public/htdocs/faq.php | 74 ++++++++++++++++++-
mozilla/webtools/addons/public/tpl/addon.tpl | 5 +-
mozilla/webtools/addons/public/tpl/faq.tpl | 71 ++++++++++++++++++
mozilla/webtools/addons/public/tpl/policy.tpl | 20 +----
mozilla/webtools/addons/public/tpl/search.tpl | 2 +-
5 files changed, 152 insertions(+), 20 deletions(-)
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
+
Developer Comments
+{$addon->devomments|nl2br}
+
Add your own comment »
diff --git a/mozilla/webtools/addons/public/tpl/faq.tpl b/mozilla/webtools/addons/public/tpl/faq.tpl
index 034f3f0bc13..658b62588d3 100644
--- a/mozilla/webtools/addons/public/tpl/faq.tpl
+++ b/mozilla/webtools/addons/public/tpl/faq.tpl
@@ -1,6 +1,53 @@
+
Frequently Asked Questions
+
What is Mozilla Update?
+
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!
+
+
How do I get involved?
+
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.
+
+
+
What can I find here?
+
+- Extensions
+- Extensions are small add-ons that add new functionality to your Firefox
+web browser or Thunderbird email client. They can add anything from
+toolbars to completely new features. Browse extensions for:
+Firefox,
+Thunderbird,
+Mozilla Suite
+
+
+- Themes
+- Themes allow you to change the way your Mozilla program looks.
+New graphics and colors. Browse themes for:
+Firefox,
+Thunderbird,
+Mozilla Suite
+
+
+- Plugins
+- Plugins are programs that also add funtionality to your browser to
+deliver specific content like videos, games, and music. Examples of Plugins
+are Macromedia Flash Player, Adobe Acrobat, and Sun Microsystem's Java
+Software. Browse plug-ins for:
+Firefox & Mozilla Suite
+
+
+
{section name=faq loop=$faq}
- {$faq[faq].title}
@@ -8,3 +55,27 @@
{/section}
+
Valid App Versions for Addon Developers
+
+
+
+ | Application Name |
+ Display Version |
+ install.rdf Version |
+ GUID |
+
+
+{foreach item=app from=$appVersions}
+
+| {$app.appName} |
+{$app.displayVersion} |
+{$app.versionNumber} |
+{$app.guid} |
+{/foreach}
+
+
+
+
I see this error when trying to upload my extension or theme: "The Name for your extension or theme already exists in the Update database."
+
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.
+
+
diff --git a/mozilla/webtools/addons/public/tpl/policy.tpl b/mozilla/webtools/addons/public/tpl/policy.tpl
index 66a0c6796b2..2687626c800 100644
--- a/mozilla/webtools/addons/public/tpl/policy.tpl
+++ b/mozilla/webtools/addons/public/tpl/policy.tpl
@@ -1,21 +1,7 @@
Policy
-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}
By {$results[r]->UserName}
- {$results[r]->Description}
+ {$results[r]->Description|nl2br}
Last Update: {$results[r]->DateUpdated|date_format} | Downloads Last 7 Days: {$results[r]->downloadcount} | Total Downloads: {$results[r]->TotalDownloads}
{/section}