Register
phpBB.com Wiki · Home Projects Help

root / trunk / phpBB / includes / template.php

template.php

View | Annotate | Download (12.3 KB)

# Date Author Comment
8685 View | Annotate 07/28/2008 12:08 AM aptx

- Optimise compiled template code.
- Improve template filter.

8683 View | Annotate 07/25/2008 07:24 PM aptx

- Add some necessary evil
- Template DEFINE variables can now be assigned other variables

8653 View | Annotate 06/13/2008 07:57 PM aptx

Changed the template compiler to work on streams. Should be a bit faster.

8572 View | Annotate 05/29/2008 02:25 PM acydburn

ok… i hope i haven’t messed too much with the code and everything is still working.
Changes:
- Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed.
- A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid(‘memberlist’)) – in this case the root path and extension get added automatically. The hook is called after these are added.

8477 View | Annotate 03/29/2008 01:08 AM naderman

Go away evil carriage returns\!

8295 View | Annotate 01/03/2008 06:00 PM davidmj

oh boy…
- Migrate code base to PHP 5.1+

8131 View | Annotate 10/04/2007 02:03 PM acydburn

- fixed database updater
- fixed hook function call in database updater
- fixed bot agent detection (we used a wildcard within the w3c-agent, therefore we should really support this. ;))

8106 View | Annotate 09/23/2007 04:14 PM acydburn

ok… i seem to have overlooked the handy CLASS constant. ;)

8104 View | Annotate 09/23/2007 03:14 PM acydburn

PHP4 compatibility

8100 View | Annotate 09/22/2007 09:18 PM acydburn

new hook system (do not get it confused with events or plugins please)
- introducing two new hookable functions too

8044 View | Annotate 08/17/2007 11:29 PM acydburn

ok, the nasty one then… :/

7853 View | Annotate 07/09/2007 08:27 PM davidmj

#12675

7789 View | Annotate 06/24/2007 02:49 PM acydburn

tweak the sql_like_expression feature a little bit to allow correct escaping

7788 View | Annotate 06/23/2007 02:16 PM acydburn

new wrapper for LIKE expressions to streamline the fixes. We actually need to adjust them for different DBMS as well as SQLite2 not supporting escaping characters in LIKE statements (which is a reason why we think about dropping sqlite support completely).

7286 View | Annotate 04/06/2007 04:03 PM acydburn

some fixes

6915 View | Annotate 01/21/2007 07:33 PM acydburn

fixing some bugs, most being submitted grammatical/spelling errors.

6817 View | Annotate 12/28/2006 03:27 PM davidmj

#6642

6796 View | Annotate 12/23/2006 07:27 PM davidmj

- quite a few optimizations to the template engine. bitwise arithmatic is used to check odd/even, usage of ref to the root template variables should reduce the number of hash lookups needed, usage of refs within loops should reduce the amount of hash lookups, incrementing vars were turned from class variables to regular variables, cache now uses preincrementing variables instead of postincrementing variables, some regex were optimized/trimmed
- a bug fix somewhere in there…

6595 View | Annotate 11/17/2006 08:37 PM acydburn

adjust some comments to work with phpdocumentor. :)

6517 View | Annotate 10/22/2006 03:32 PM acydburn

- now username changes should work as desired
- removed some extract() calls

6405 View | Annotate 09/24/2006 05:07 PM acydburn

fix bug #4454

6366 View | Annotate 09/14/2006 04:57 PM acydburn

- Fix some bugs
- fixed retrieving of permissions if the LIKE statement is used as well as proper supporting (needs testing on mssql)

6312 View | Annotate 08/22/2006 11:26 PM acydburn

some updates. Also adjusted the utf tools and normalizer more to our coding guidelines.

6224 View | Annotate 08/01/2006 05:29 PM acydburn

- fixing some bugs
- shortening some db columns to meet the requirements
- correctly increase/decrease user post counts
- fix the topic title length bug(s)

6112 View | Annotate 06/21/2006 06:52 PM acydburn

show error if template path could not be determined

6058 View | Annotate 06/13/2006 11:06 PM acydburn

make sure custom profile fields are created correctly on registration (#2225)

6048 View | Annotate 06/11/2006 08:13 PM acydburn

- fixed a few bugs
- added user_add() function
- check posted images ([img]) for same domain/scipt and php files
- auth_api.html updated to the coding guidelines look&feel
- introduced ability to force non page-updates (cron is using it)
- correctly resend coppa email

6021 View | Annotate 06/07/2006 09:32 PM acydburn

ok, sorry for this. :/
- cleaned up table names/constants

5967 View | Annotate 05/26/2006 05:04 PM acydburn

some tiny changes…

5965 View | Annotate 05/25/2006 09:15 PM acydburn

first round of custom profile changes

5902 View | Annotate 05/12/2006 10:52 PM acydburn

- introduce new function build_url to easily build a valid url from the user->page object as well as optionally removing certain keys
- changed attachment config to utilize the config build methods
- cleaned up posting.php
- the submit/delete_post functions are now usable (functions_posting.php)
- adjusted header icons (transparency)
- a bunch of fixes for mssql
- bug fixes

5894 View | Annotate 05/07/2006 11:44 PM naderman

- added the template editor (doesn’t use a hardcoded list of template filenames for categorisation anymore)
- fix some bugs related to storing template files in the database
- allow templates stored in subfolders of the /styles/name/template/ folder

5865 View | Annotate 04/29/2006 07:19 PM acydburn

introduce LA_ for addslashing language variables for use in js vars (idea by naderman)

5790 View | Annotate 04/17/2006 03:09 PM acydburn

- clean up marklist calls (global function)
- added new feature: test out others permissions (admin permissions will not be copied)
- changed attachment processing by directly using the template engine
- fixed some attachment related bugs
- additional tiny fixes

5783 View | Annotate 04/14/2006 05:10 PM acydburn

fixing a bug within the installer (displaying notices) and making sure the installer is using the error handler.

5722 View | Annotate 03/25/2006 05:19 PM acydburn

save graham temporarly some headaches. ;)

5670 View | Annotate 03/19/2006 03:23 PM acydburn

- add our beloved in_phpbb check

5622 View | Annotate 03/13/2006 12:19 AM acydburn

- streamlined reports to consist of the feature set we decided upon (Nils, your turn now)
- use getenv instead of $_ENV (with $_ENV the case could be wrong)
- permission fixes (there was a bug arising with getting permission flags – re-added them and handled roles deletion differently)
- implemented max login attempts
- changed the expected return parameters for logins/sessions
- added acp page for editing report/denial reasons
- other fixes here and there

5566 View | Annotate 02/21/2006 11:32 AM acydburn

- implementing David’s proposed expression changes (some of them already noted within the events CCP)

5382 View | Annotate 12/27/2005 03:09 PM davidmj

- Removed a variable that has been left unused for three and a half years…

5379 View | Annotate 12/27/2005 09:50 AM acydburn

- fixing alter_block_array function as suggested by david.

5372 View | Annotate 12/22/2005 05:28 PM acydburn

- ok, get away with the secondary style approach (styles can be mixed together easily with the acp)
- introduce a more generic approach of defining some additional variables through cfg files as well as the name, copyright and version fields
- please note that at the moment this is in flux. I added it now for Tom because he needs the theme parameters.

5331 View | Annotate 12/13/2005 09:58 PM grahamje

Some fixes to the template code
– this handles the case where file caching is used and no cached
version exists

5321 View | Annotate 12/05/2005 07:52 PM acydburn

- mass email

5319 View | Annotate 12/04/2005 09:25 PM acydburn

- some bugfixes
- checking if page_header has been called already
- call correct page footer function
- rewrote avatar gallery
- seperated compilation of template and template functions (new file: functions_template.php)
- added assign_display function to template
- added group management (acp)
- removed admin_groups

5310 View | Annotate 11/20/2005 07:58 PM acydburn

- more acp additions and changes…

5296 View | Annotate 11/08/2005 08:29 PM acydburn

- tiny bugfixes. ;)

5271 View | Annotate 10/19/2005 07:57 PM acydburn

allow checking for loops with IF .block_var

5268 View | Annotate 10/09/2005 07:59 PM acydburn

- added new query type to dbal’s sql_build_array
- allow setting custom template path
- adjusted module class to correctly parse trees with more than one category
- added caching to module class

5238 View | Annotate 10/02/2005 07:49 PM acydburn

- some bugfixes
- allow template variables in defines

5151 View | Annotate 05/15/2005 10:08 PM acydburn

- fixed url parsing ([] breakage)

5118 View | Annotate 04/11/2005 11:32 PM acydburn

- made path information available to template (T_)
- eased topic/post icon in templates (removing hardcoded img)
- added S_FIRST_ROW and S_LAST_ROW to template engine

5117 View | Annotate 04/10/2005 08:07 PM acydburn

- added updated coding guidelines
- introduced is_registered and is_bot flags for correct determinition of guest/registered/bot users
- changed bot code to act on useragent || ip

5114 View | Annotate 04/09/2005 02:26 PM acydburn

- Documentation related changes
- added resend activation email dialog
- fixed issue in session code
- log failed/successful admin re-authentication/login
- fixed simple forum dropdown box (used in mcp and posting)

5083 View | Annotate 01/27/2005 07:59 PM acydburn

fix admin_session “bug”

5053 View | Annotate 01/10/2005 08:14 AM acydburn

this should eliminate most problems with statements not interpreted but valid. We really do not use/need multiline conditionals. ;)

5035 View | Annotate 12/19/2004 06:59 PM acydburn

- some fixes/changes

5013 View | Annotate 10/30/2004 07:11 PM acydburn

- new function + a few fixes suggested by cyberalien

4984 View | Annotate 09/16/2004 08:33 PM acydburn

- more updates, mostly bugfixes to the bbcode parser
- changed current_user in sessions (please review)
- give more flexibility to style authors in regard to the pagination elements
- profile fields updates (included a sample constuct into viewtopic_body.html – have to be documented extensivly)
- code optimizations (use of strpos, sizeof, loops not iterating functions on every call, memory savings…)
- and last but not least - hopefully not introduced more bugs than healthy (cough)

4940 View | Annotate 08/01/2004 02:31 PM psotfx

Fixed problem with UNDEFINE

4920 View | Annotate 07/09/2004 12:41 AM acydburn

- remove output buffering options from download.php (not needed anymore)
- optimized viewtopic.php a little bit
- removed the create_function (was consuming too much memory) from viewtopic
- check for manually added convert[.exe] program name to imagemagick path in admin_attachments
- reduced filesize checking for imagemagick program (some installations require less than 20k)
- added checked=”checked” for “not selected” topic icon
- moved parse_text_display function from functions_posting.php to functions.php (see comment above function)
- check for user_id != ANONYMOUS in page_footer for displaying the administration link (there seems to be a problem checking for global options)
- rewrote attachment thumbnail functions – utilize GD2 functions if available, more uptodate checks…
- changed final thumbnail size calculation
- define S_ROW_COUNT within template class itself
- added SID to template vars in page_header
- added ability to view topic/forum within admin_viewlogs
- added optional acl checking to make_jumpbox, no need to duplicate the function for this small need
- added custom body file for confirm_box

4912 View | Annotate 06/06/2004 11:44 PM acydburn

- added folder_moved image
- new feature: bookmark topics
- fixed post details link
- added confirmation screen to cookie deletion

4896 View | Annotate 05/26/2004 10:18 PM acydburn

don’t hurt me… just very small things

4883 View | Annotate 05/02/2004 03:06 PM acydburn

fix some issues with oop, fixing small bugs and prepare the next steps…
NOTE TO DEVS: have a look at adm/admin_board.php (new config layout)

4753 View | Annotate 01/11/2004 03:33 AM psotfx

oopsie

4740 View | Annotate 01/10/2004 01:23 PM acydburn

custom profile fields.
Not finished, committed to let us discuss about the next steps
-> BartVB

4735 View | Annotate 01/09/2004 06:22 PM psotfx

Add DEFINE/UNDEFINE … user vars bust be preceeded by $ and be uppercase, string vars must be in single quotes. Can be used in loops, something.$VAR, etc. Use with standard IF, IF $something ==, etc.

4698 View | Annotate 11/30/2003 12:42 AM ludovic_arnaud

Quiet please!

4574 View | Annotate 10/12/2003 11:16 AM acydburn
  • empty log message *
4557 View | Annotate 10/12/2003 01:58 AM psotfx

include_once

4517 View | Annotate 09/29/2003 02:20 AM psotfx

Switch for recompilation (based on filesystem modified time)

4514 View | Annotate 09/27/2003 10:44 PM psotfx

Allow for start,end values within begin/end loops

4364 View | Annotate 08/10/2003 08:33 PM ludovic_arnaud

Added the binary attribute for Windows platforms. Removed the read attribute because it wasn’t needed.

4343 View | Annotate 08/06/2003 05:45 PM psotfx

A fair amount of additional working or semi-working stuff … template stored db source (when appropriate), switch theme/templates between DB/filesystem (if available), import, upload templates, imagesets, themes (if available … i.e. no safe mode), etc. still a fair amount of stuff to do but getting there … take care using this, backup any themes/templates/imagesets before fiddling and let me know of issues

4325 View | Annotate 07/24/2003 03:58 PM psotfx

Changes for styling directory layout alterations

4273 View | Annotate 07/17/2003 05:16 PM psotfx

Remove subfolder storage of templates … a safe-mode thang, you can delete any existing cache/templates folder

4235 View | Annotate 07/13/2003 05:13 PM psotfx

Cope with secondary (per forum) styles, probably other minor things too … there is a known permissions problem, will work on that soon

4224 View | Annotate 07/12/2003 01:36 AM psotfx

Fix failure to INCLUDE a file following its sole recompilation … I should add that neither of these commits have added support for primary/secondary styles (e.g. styling of forums) ... won’t commit these till all relevant styling changes have been implemented.

4223 View | Annotate 07/12/2003 01:28 AM psotfx

forced_recompile “seems” to work now if set true …

3961 View | Annotate 05/02/2003 05:50 PM psotfx

Various updates, forum links, “improve” forum management, cleanups, blah blah, note the schema changes, note also that forum management may misbehave … reports on wrong doings are welcome … seem to be having problems with some mcp functions under apache/win32

3957 View | Annotate 04/28/2003 05:06 PM psotfx

Check for and remove other possible PHP execution tags

3954 View | Annotate 04/26/2003 03:35 AM ludovic_arnaud

I believe the original intent was to put the backslash in the character class, this should make it work

3933 View | Annotate 04/23/2003 10:55 PM psotfx

hhmmm, was slap bang in the middle of working on this ;) Excess slashing(?) .. keep an eye out for errors … fixed static lang preg

3932 View | Annotate 04/23/2003 10:50 PM acydburn

replaced \’ with ’ in template to let it parse javascript correctly. admin_attachments.php changes. added real media streaming.

3928 View | Annotate 04/23/2003 04:55 PM psotfx

Thanks to John, who indirectly reminded me about this :D … echo only data we need to echo.

3885 View | Annotate 04/18/2003 04:32 PM psotfx

Okay, give this one a whirl … clear your template cache before trying

3882 View | Annotate 04/18/2003 01:07 PM acydburn

Revert INCLUDE template change, fixed attachment display.

3825 View | Annotate 04/13/2003 02:28 PM acydburn

faster (for me), especially for topics with a bunch of attachments (due to the nested block vars).

3824 View | Annotate 04/13/2003 01:36 PM acydburn

Fixed INCLUDE. Now cached items are processed correctly. all glitches are fixed (for example the strange display after a template got changed)

3817 View | Annotate 04/12/2003 04:30 PM acydburn

added 711252 and lock topic within post, fixed post editing a bit.

3810 View | Annotate 04/11/2003 01:58 AM psotfx

Try this version of include …

3807 View | Annotate 04/10/2003 11:35 PM acydburn

initial ‘view attachments’ implementation. added new template var (merged include, to preserve previous block vars), could be changed later to consider caching. some config variables and upload icons are not present as of yet…

3662 View | Annotate 03/18/2003 03:58 PM psotfx

Change cache location to root path cache, you can delete the cache/ and its contents from the templates/ directory. Moved cache show, decompile, etc. methods to new admin_ object in functions_admin

3284 View | Annotate 01/08/2003 07:27 PM psotfx

Updates as opposed to downdates

3166 View | Annotate 12/03/2002 02:46 PM psotfx

Start to (re-)fix generation of “plain text” templates from compiled source for template editing

3018 View | Annotate 11/08/2002 04:33 AM ludovic_arnaud

Cleaned up viewforum/index, altered template class to replace missing lang strings with a nicely formatted text, pre-implemented topics prefetching and broke some things.

3016 View | Annotate 11/08/2002 12:21 AM psotfx

These changes mean you no longer have to assign L_ vars values (unless you want/need to) ... the relevant entry in the lang array will automatically be used if a var isn’t assigned

2951 View | Annotate 10/10/2002 03:02 AM ludovic_arnaud

More bugfixes

2923 View | Annotate 10/04/2002 03:09 PM psotfx

Well, here are all my changes … don’t blame me if things break :D

2918 View | Annotate 10/04/2002 01:50 AM ludovic_arnaud

I updated my copy with the Area51 template so here it is, along with a couple of bugfixes :]

2913 View | Annotate 10/03/2002 04:43 AM ludovic_arnaud

Subforums handling part 2, it almost works. Also added: the “Explain” link at the bottom page, can be removed easily before official release if necessary.

2882 View | Annotate 08/22/2002 11:40 PM psotfx

Instantiate template and set template path from seperate method

2704 View | Annotate 07/16/2002 10:39 PM psotfx

Minor changes

2662 View | Annotate 07/14/2002 04:33 PM psotfx

This should work fine with existing templates … note that you will need to create a directory called cache/ in your templates directory … give it a+w access (chmod 700)

2642 View | Annotate 06/22/2002 01:48 PM psotfx

Template caching ( file based )

2467 View | Annotate 04/02/2002 11:13 PM the_systech

Ok this is just me being anal again… No code changes, just file headers..

2328 View | Annotate 03/19/2002 12:53 AM psotfx

Stop being too paranoid about hacking of includes containing only fully inclusive functions

2304 View | Annotate 03/18/2002 02:35 PM psotfx

Updates to overcome security issue + updates of various functions, initial version of profile registration include … not completed but should be functional for obvious reasons(!)

2006 View | Annotate 01/28/2002 08:12 PM psotfx

Another warning fix …

1997 View | Annotate 01/28/2002 06:25 PM psotfx

Fix various var not set warnings … many thanks go to The Horta for pointing out and offering fixes for many of these

957 View | Annotate 08/31/2001 10:59 PM the_systech

Fix for Paul’s Polling problem..

943 View | Annotate 08/31/2001 12:20 AM thefinn

Re-added GPL disclaimers

933 View | Annotate 08/26/2001 04:04 PM psotfx

Modified header comments

847 View | Annotate 08/13/2001 06:08 AM dougk_ff7

Fixes a template parsing error.

741 View | Annotate 07/24/2001 01:39 PM psotfx

Changed extension of templates to php