1
0
mirror of https://github.com/php/web-php.git synced 2026-04-26 00:18:17 +02:00
Commit Graph

914 Commits

Author SHA1 Message Date
Gabor Hojtsy 4135039c22 Increase chunk read size from 8K to 12K
because of long old notes
2003-07-29 17:05:15 +00:00
Gabor Hojtsy 2e420296e5 Only set language if properly specified, and fill in the blanks
when saving settings, so they will come back in the right
position in the preference list from the cookie
2003-07-29 12:55:24 +00:00
Gabor Hojtsy 9bd0cc6639 Change default URL shortcut search fallback type to be
the function list search (so users won't get redirected to
google). Also provide the option to force the site to redirect
to do a documentation seach (on google currently) in case
a user is used to this
2003-07-29 11:35:24 +00:00
Gabor Hojtsy 18df8ff1ef Fix a bug, which made language specifying shortcuts
(eg. /it/books) not work.
2003-07-25 16:54:07 +00:00
Gabor Hojtsy 654aaeded5 This is a gif, not a jpg 2003-07-25 15:44:12 +00:00
Gabor Hojtsy 0c96f1df1e Adding Larry's new books [first round] 2003-07-25 11:32:01 +00:00
Gabor Hojtsy c9a1e81413 Don't display edit options, when there is no ID [ie.
when previewing a note]
2003-07-23 18:36:10 +00:00
Andrew Lindeman 90e595890a fixing error in previous commit by goba that made it impossible to
submit a note.
2003-07-23 14:14:51 +00:00
Gabor Hojtsy bc57569536 Manual (and user note) functions remake:
- introduce a new PHP friendly naming scheme,
   like: manual_setup(), manual_header, etc.
 - use PEAR coding standards (except naming)
 - get rid of nasty globals, use one $PGI global for
   all page related information storage
 - get rid of unneded multiple function calls
   (sendManualHeaders and manualHeader)
 - reformat TOC information on pages, use modern CSS
   styled divs, instead of tables and spacers
 - get rid of email obfuscation code in user note handling,
   it is done now on the rsync server (TODO: user note
   text formatting should also be done there)
 - getting rid of extra parameters, as info is always
   available in $PGI
 - XHTML friendly environment for printer friendly pages,
   using CSS instead of nasty tables and other tricks
 - Also provide BC functions, so the sites won't break
   with the new code

Tested on a local mirror. This partically cleans the way
for livedocs, as it provides a much cleaner functional
interface of manual pages.

This commit is accompanied with the phpdoc modifications
to generate files with the new function calls in the future.
2003-07-21 16:41:54 +00:00
Gabor Hojtsy 59435032f7 Also specify BASE_PAGE on manual pages, so it can
be used to print out the show source link properly on pages
accessed with shortcuts

Use the BASE_HREF on manual pages to provide a backlink
to the previous page after user note submissions, so thse
will work from shortcut accessed pages too

These two fixes hopefully close all the problems related to
manual URL shortcut page displays
2003-07-21 13:14:33 +00:00
Gabor Hojtsy 9fd21b55e3 - Get rid of BASE_FOR_MANPAGE in favor of the more
generic _SERVER['BASE_HREF'], which we will use on all
pages

- Remove the old commented mirror switching part, which
was never used, and not going to be used

- Also employ BASE_HREF for the printed version, so the
right server name will be used, and XHTMLize the printed
page's header
2003-07-20 13:44:36 +00:00
Gabor Hojtsy 9a5cd6b532 Implement some more general handling of the base
parameter, to support the usage of webpage shortcuts
without redirections in the future

Also keep the two old base handling methods, until they
can be replaced by this general one
2003-07-13 20:02:10 +00:00
Gabor Hojtsy 72f47439a1 Ups, BASE_FOR_MANPAGE does not start with /manual...
Fix my previous fix...
2003-07-13 19:46:05 +00:00
Gabor Hojtsy d8dc179499 Don't display local search support information for now 2003-07-13 19:39:41 +00:00
Gabor Hojtsy bb99efb3cf Use the base computed for the request, instead of the request
URI, so the dropdown will work for shortcut accessed pages
too. Thanks to Hartmut for the bugreport :)
2003-07-13 13:25:26 +00:00
Andrew Lindeman 1a73113231 correct link, the other went to a p0rn site... 2003-07-08 18:11:40 +00:00
Gabor Hojtsy 55838d5faa Arabic is also not available online 2003-06-18 07:39:01 +00:00
Gabor Hojtsy 8fe303bc05 Use divs to present the TOC items on manual
pages on the left side of the window

Add images according to php.net rules to these
two styles (toca, toci) depending on what mirror
they are used on

Also rewrite the TOC generator code a bit, so it
identifies items properly when their title and titleabbrev
differ [was a bug on many pages]

Also wrap too long function names, so we have the
same amount of content and nav area on pages with
long function names in the TOC [eg. xml functions]

The new div based approach means that we have *much*
less HTML to output, and the layout of the menu is better
than before, as the box images are aligned to the text.
Tested with Mozilla and Konqueror. Apart from pages with
long function names in the TOC, this should look very similar
to the display of the TOC before
2003-06-14 18:28:56 +00:00
Gabor Hojtsy 7db579e003 Korean language code fix 2003-06-13 15:29:19 +00:00
Philip Olson cda59ef3cc Add back the popup link functions, as used by the user comments. 2003-06-08 02:17:10 +00:00
Gabor Hojtsy c2ae6b78fe Allow the caller of make_image() to opt out from
automatic image sizing

Use this feature and convert the border attribute
in make_submit() to output an [X]HTML compatible
<input> tag
2003-06-07 20:17:34 +00:00
Gabor Hojtsy e32ad79275 Tab => spaces and remove ending ?> for consistency 2003-06-07 20:01:53 +00:00
Gabor Hojtsy 6b19498e74 Tabs to spaces, and several rewrites among the common
layout functions. eg. the code for make_image() got optimized

Also employ coding style (comments, spaces, bracing)

Remove the popup link function which are not used for a very
long time...

Put the static root to $_SERVER['STATIC_ROOT'] so it can
easily go around the functions

The header and footer functions are still not rewritten, and
more work is needed on make_submit() to make it [X]HTML
compliant

These changes seem to work on my local mirror
2003-06-07 20:01:07 +00:00
Gabor Hojtsy 413fc3c506 Do a very different SQL query in case of a dot
is provided in the URL, which indicates a better
qualified URL type. All such shortcuts are the end
of filenames, so search for them in this form
2003-06-07 18:54:26 +00:00
Gabor Hojtsy 1d86bcff06 Define the new searchHistory() JS function to restore
the last search done by a user

Include this in the onload event handler of the index page,
and in all other pages, where an onload handler is not already
defined

Add name to form, so we can call it by it's name

JS tested with Mozilla. As the functions and objects used
are rather old, it should work with all browsers. In case someone
knows a better way, go and fix it ;)
2003-06-05 19:41:55 +00:00
Gabor Hojtsy 69d4b58e86 Reflect the phpdoc changes in the comments 2003-06-04 18:34:22 +00:00
Gabor Hojtsy 89200e688e Hide the left side bar and the top and bottom navbars
from mnogosearch, so the indexing will be a bit faster,
and the results will be more accurate. Mnogo will still
find all the pages starting from the TOCs and indexes

Also use $MYSITE instead of $SERVER_NAME and
$SERVER_PORT, as we have the mirrors detected
name in $MYSITE

Also remove some unused code from the user note
handling functions
2003-06-04 09:12:11 +00:00
Gabor Hojtsy 98679b4e1f Only use a non-empty requested language 2003-06-04 08:38:31 +00:00
Gabor Hojtsy 7eca1945e0 Also set the explicit lang if it was specified in a shortcut
(eg. /hu/echo) as we include the page now, and don't
redirect
2003-06-04 08:18:37 +00:00
Derick Rethans 8a3dc36b34 - Make it global too :) 2003-06-02 09:49:46 +00:00
Derick Rethans 40849db79b - Remove inactive languages from this list too 2003-06-02 08:40:18 +00:00
Derick Rethans 6751cf78ab - Make it possible to disable languages that should not show up as available
language online.
2003-06-02 08:36:54 +00:00
Rasmus Lerdorf edbe4e40bf New categorized look for the calendar sidebar
Might take a couple of hours for the backend data and this new frontend
ui to get in synch.
2003-06-01 19:16:54 +00:00
Rasmus Lerdorf ddc3732b3b More work on the event categorization 2003-06-01 15:52:37 +00:00
Gabor Hojtsy 0bc109e0c6 Use $_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT in the slow lookup function
Also use this for loading the sqlite DB, instead of a
relative path value

Reformat the sqlite lookup function to be indented
with spaces instead of tabs

Add many comments to this part

Add prefix detection code, so /function.echo type of
lookups will work with the sqlite lookup method too. This
hopefully fixes #23652.

Remove ending ?> for consistency

Changes tested on my local mirror with sqlite and without it
2003-05-29 18:01:30 +00:00
Gabor Hojtsy af04d4d2a8 Fix the manual page check on the dropdown to check with
an absolute path and not a relative (it can also be included
in a shortcut call)

Also comment it out the same time, as discussed with the
php-mirrors list, for performance reasons [other language
listings are also done without checks on docs.php for
example] This eliminates approx. 24 stat() calls per
manual page display
2003-05-27 16:48:36 +00:00
Gabor Hojtsy bc78f8032c Remove PHP < 4.1.0 BC code
- the creation of $_.. vars
 - global-ing them before usage

These are not needed anymore, we have all mirrors with
PHP > 4.1.0, and those having old versions are disabled
2003-05-27 16:40:05 +00:00
Gabor Hojtsy 52702cdd65 This search in the index was causing most of the IPs
to be hidden in the db since I have added the speed
increase fix. The previous ranges were checked for IPs
instead of the actual range where the IP was [because ==
was true for the upper part of the region].

Now we search in one region up, and that makes this
whole code work again without any more resource needs.

Plus it also finds Rasmus' home IP finally ;))
2003-05-26 18:44:19 +00:00
Gabor Hojtsy 55513d6ab8 Drop out ugly workaround to make the country lookup work
The database has errors, so we need to wait for that to be
fixed...

Some speed fixes:

 - do not search in the DB if we were unable to find any
   helpful data in the index. A full DB search is something
   we should not do because of performance reasons

 - return a two element array in the index lookup specifying
   a range where the IP should be in the DB (if it is correct).
   If we pass that range, we were unable to find the IP.
   This reduces the number of compared records significantly

Note that this is not a fix for Rasmus' and others'
lookup problems. That is caued by the DB containing
overlapping IP ranges, which are not OK for our indexer,
and would even not return valid results in an SQL
'BETWEEN' search [which is the recommended search
method on ip-to-country.com].
2003-05-25 12:39:26 +00:00
Jacques Marneweck 0883c55d3a - Another better fix seeing that it does not process more of the
ip-to-country database file than necessary as well as adding a failsafe
  so we only do a max of 3 lookups and move the index down each time by
  one.
2003-05-24 20:51:41 +00:00
Andrew Lindeman a53dea92ac this is a better way to do that 2003-05-24 20:32:44 +00:00
Jacques Marneweck ea491396ff - Quickfix to get rasmus IP to lookup. 2003-05-24 20:01:56 +00:00
Gabor Hojtsy eab7a75a1b Comment the BC code for pre 4.1.0 mirrors as we have
them disabled now, so autoglobal vars should work on
all mirrors without special preparation

Use $_SERVER['DOCUMENT_ROOT'] for includes
instead of a user defined constant, as the docroot
value is always available [even before prepend.inc]
This ensures consistency and causes no stat() calls

Add myphpnet_...() functions to load, get/set and save
the user preferences, and use them everywhere. This
enables us to easily add new preferences to the same
cookie. Every preference will last for a year this way,
and the cookie will only be set again, if someone
modifies his data on my.php

If this works nicely, then we can easily add a preferred
mirror site setting (and more)

[These changes seem to work on my local mirror]
2003-05-24 19:50:37 +00:00
Gabor Hojtsy c0c7276f29 This base seems to be correct to me on mirror
sites too, so enable it
2003-05-24 11:10:51 +00:00
Gabor Hojtsy bc55d94455 Add $BASE_FOR_MANPAGE which will always contain
the correct URI of a manual page which is currently served.

The code uses no external calls, it is based on config params
provided by sendmanualheaders() and manualheaders(), which
are always properly parameterized on all manpages and are
always called.

The <base> printout is added with a comment now,
so we can see if it works correcly. If yes, that the
comment signs can be removed, making that effective.

Then all the manual shortcuts can be changed to include()
manual pages instead of redirecting to them. Relative
links will work.
2003-05-23 20:45:39 +00:00
Gabor Hojtsy 6cc5946b04 Add a language code conversion function, which
will be used on manual pages
2003-05-23 20:32:16 +00:00
Ilia Alshanetsky 19d6196627 Optimized include logic.
# As it now stands phpweb uses EXTREMELY inefficient way of including files
# by relying on the include_path parameter. Which causes at least 2 useless
# stat() calls for every include. By prefixing all includes & requires for
# files from include/ with the __PHPWEB_INC_PATH__ constants this is avoided.
2003-05-23 13:35:56 +00:00
Wez Furlong b7c0ecfb61 deprecate ht://dig in favour of alltheweb.
alltheweb has better results than ht://dig and allows us to utilize all mirrors
equally for load balancing.
2003-05-23 01:30:20 +00:00
Wez Furlong 1842aa7aee fix an issue for people in the US... 2003-05-23 00:27:55 +00:00
Wez Furlong a11ee2424b avoid function calls and hash-lookups here when we already have the details. 2003-05-23 00:04:59 +00:00