Commit graph

47 commits

Author SHA1 Message Date
Dan McGee
5222bf0932 Use HTTPS links everywhere for Arch sites
The main site, wiki, and BBS are using HTTPS exclusively, so link
directly to the correct protocol rather than forcing a redirect.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-22 12:33:11 +02:00
Lukas Fleischer
7e201e5a3a Link to the HTTPs login page in the header
Change the login link so that it points directly to the HTTPs version of
the login page if "$DISABLE_HTTP_LOGIN" is set and if HTTP is used.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-21 02:50:06 +02:00
canyonknight
e9a0272118 Change logo link for consistency with Archweb
Fixes FS#27669

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-10 17:22:23 +02:00
Lukas Fleischer
6102759b7c Use echo shortcut syntax
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to
reduce noise in templates.

Note that as of PHP 5.4.0, "<?=" is always available and no longer
requires "short_open_tag" to be set.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 12:23:04 +02:00
Lukas Fleischer
c959d95fb1 Fix language selection
Use "REQUEST_URI" instead of the "PHP_SELF" sever variable to determine
the redirection URL for the language selection form. This fixes the
language selection feature to work well with virtual URLs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 15:19:30 +02:00
canyonknight
98ab6515b4 header.php: Update account editing link
* Use AUR_URL/account/userfoo/edit format for own account editing.
* Change "Accounts" label to "My Account" for regular users.
* Add ability for Developers and Trusted Users to edit their account
without having to use the search form first.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:59:48 +02:00
Lukas Fleischer
2425f963f8 Use virtual path feature for links
Use virtual paths in links (e.g. link to "/packages/" instead of
"/packages.php" etc.) if the virtual path feature is enabled.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15 22:44:51 +02:00
Lukas Fleischer
a03c684ecd Use absolute URIs for style sheets and images
This is needed for our new URI scheme, since we will use virtual
directories, such as "/packages/" instead of "/packages.php" etc.

Having relative URIs results in incorrect paths, such as
"/packages/css/aur.css" (instead of "/css/aur.css").

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15 22:42:45 +02:00
Lukas Fleischer
a64f23ff94 Remove legacy CSS
We completely switched to using the archweb stylesheet (with some custom
extensions in "aur.css"). The old CSS files are no longer needed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-08 10:32:40 +02:00
Lukas Fleischer
091c2b5f55 Move language selection to a drop-down list
Move all languages to a select container to save some space. Language
selection is a rarely used feature, so there's no need to make this a
one click option.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:26:47 +02:00
Lukas Fleischer
98c497d039 Restructure the navigation bar
* Remove "Bugs" and "Discussion" links. Move these to the home page.
* Reorder links in a reasonable and consistent manner.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:26:42 +02:00
Lukas Fleischer
0928525793 Move login form to a separate page
Do not show the login form on every page. Move it to a separate login
page and add a link to the navigation bar. Also, add a logout link for
logged-in users.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:26:38 +02:00
Lukas Fleischer
9cee53f3cf Wrap everything in a content cotainer
For consistency with archweb.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:25:55 +02:00
Lukas Fleischer
df19822e00 Add archweb style sheet
* Add "archweb.css" from the master branch of archweb. We will use this
  as base style sheet in the future.

* Add "aur.css" for AUR-specific extensions to "archweb.css".

* Remove the "archnavbar.css" link from the header template since this
  is included in "archweb.css".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:25:53 +02:00
Lukas Fleischer
a774b3d355 Merge branch 'maint' 2012-02-19 16:41:47 +01:00
Lukas Fleischer
19789c3f75 Escape all output strings in the header and footer
Escape each output string using htmlspecialchars(). These aren't
exploitable; it's still better to escape them properly.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-19 05:21:48 +01:00
Lukas Fleischer
6f6904db3f Fix some more XSS vulnerabilities
Escape strings properly using htmlspecialchars(). Seems like we missed
these in former cleanups. Fixes FS#28515.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-19 04:48:31 +01:00
Dan McGee
e571a694d6 Add a new AUR_LOCATION setting
This should be set to something like 'http://localhost' for development
or 'https://aur.archlinux.org' in production. It ensures all links in
the site stay in the development site and there is no sudden jump from
development to production environments.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-11-02 21:21:23 +01:00
Florian Pritz
b60a30af71 fix incompatibility with php short open tags
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-25 11:29:56 +02:00
Lukas Fleischer
897211374f Use HTTPs for links in the main site navigation bar (fixes FS#23832).
Basically just sync with what archweb currently uses, prefixing all
relative URLs with "http://www.archlinux.org".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-20 00:13:10 +02:00
Lukas Fleischer
0a625ae8ff Fix XSS vulnerability in "web/template/header.php".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-30 17:07:27 +02:00
Lukas Fleischer
7f9e498e48 Fix broken XHTML.
Fix a lot of invalid XHTML in the templates and actions. There might
still be some legacy code left, but this should cover most of it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11 19:00:50 +01:00
Loui Chang
137e7a1ad3 header.php: Add missing closing </li> tag.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-08-01 10:03:06 -04:00
Denis Kobozev
b22f66b3ee Header and navbar consistent with Arch site redesign
-- Loui Chang
Change is_tu to check_user_privileges
Change div#archdev-navbar style

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-23 05:40:15 -04:00
Loui Chang
f5c1851bbb header.php: Remove lingering </li> tag.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-12-07 18:44:22 -05:00
Loui Chang
1bc4836e19 Restyle the layout.
Make HTML markup more logical.
Remove some unused style sheets rules.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-23 23:24:56 -05:00
Loui Chang
cf49644f4e Change rss2.php references to rss.php
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 16:23:35 -04:00
Dan McGee
5c13854922 Remove Google ads from header
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:11 -04:00
Loui Chang
6bac561bf8 Rework login form.
Correct some xhtml validation errors.
Correct translation usage.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 00:40:30 -05:00
Loui Chang
f82f3dd247 Fix a few xhtml validation errors.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 15:49:41 -05:00
Dan McGee
8f97330100 Store account type in local var when possible
No need to call this function way too often, especially when on the package
list page where it could be called up to once per row.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04 14:09:53 -05:00
Loui Chang
cfeb080dcd Make all web paths relative.
The site no longer needs to be hosted from the
root of a domain, or virtual host.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-21 15:24:57 +09:00
Thayer Williams
9aa03d3262 Renamed Get Arch to Download.
AL logo now goes to AL homepage, not AUR homepage
Appended forward slash to top navigation links

Signed-off-by: Thayer Williams <thayer@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-25 00:27:05 -05:00
Callan Barrett
4b616e20ba Move logout link from main menu to login bar
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-10-05 20:42:52 -04:00
Simo Leone
99e65b28d8 Revamped pkg_search_page()
- Reduced database hits
- Improved speed
- Improved sanity (slightly)
- Fixed searches,buttons,gizmos

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:07:22 -05:00
Loui Chang
a5a8895f49 Put login into its own function.
Utilise login form template.
Also cleaned up a couple notices.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:04:16 -05:00
Callan Barrett
d14def92ff Turn action bar into drop box
Moves the action bar down to the bottom right of the search results and turns it
into a drop-down selection box.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
2008-01-20 03:18:16 -06:00
Callan Barrett
52a770e7e7 Fix login error and translation bug
Fixes a login error where entering nothing would result in the login message
"Incorrect password for username, ." and changes the translation "TU" to
"Trusted User" so the menu bar on the accounts page doesn't bug up (we need a
new translation system :((()

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
2008-01-20 03:16:07 -06:00
eliott
aa2517ebfc some more tweaks to make it look less like I worked on it. 2008-01-20 00:21:21 -06:00
eliott
6edbef61c1 Hacky attempt to fix lang and navigation bars 2008-01-20 00:21:21 -06:00
Callan Barrett
8ab823728c More cleanup, add TU link to header
Cleans up links on front page, adds a TU link to the header to the voting
application, fixes some titles and styling for logged in text

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:21 -06:00
eliott
a9ea2bd89d updates to header. Manual addition of thayers previous patch. 2008-01-20 00:21:21 -06:00
Callan Barrett
379e16eebd Support for verbose page titles
Verbose page titles again

Adds support for more verbose page titles based on current
page and action by user and removes sort by options from
search form as they're obsolete by column links.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
Callan Barrett
d4b07f2b33 Tweaks of various page layouts and handling of data
This is a patch that fixes a lot of little things:
* We no longer have pkgsearch or pkgdetails link functions and all
references to them are gone, that's what a back button is for and if
we really need it we can come up with something better
* No longer have do_Details variable, this means links on the package
search are simply ?ID=foo
* On the pkgdetails pages when there are either no deps, deps by,
sources or comments for a package the list for each will display
"None" instead of nothing at all (ruining the layout)
* Fixed a bug where if a package had no sources or no deps
pkgsubmit.php would submit an empty one
* Translation of the word "Search'" has been changed to "Search"

Most of these relate to each other.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
Callan Barrett
bf5c28cf22 Fix bug with botched AURSID values
In the check_sid function in aur.inc the condition for expiring the
cookie and redirecting to hacker.php could never be met and instead
the user would be given blank login instead of being considered logged
out, now fixed. This also means we no longer need either hacker.php or
timeout.php at all.

Also, this bug seems to be present in the AUR version running on
aur.archlinux.org.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:19 -06:00
Callan Barrett
0e4b25211b Removes timeout page and moves login form to header
This removes the need for a timeout page (and probably hacker.php) and
moves the login form and status to the header. If your login times out
you won't lose your place anymore and links will always work. Works
for me but at the moment index_po.php is imported in aur.inc which has
to stay until the translations from it for login are moved to
aur_po.php.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:19 -06:00
Loui Chang
878d0bb39a Added header, footer, and login form templates
Implemented the first two in web/lib/aur.inc.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-01-19 23:45:07 -06:00