b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 2.4) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Procedural File: _template.funcs.php

Source Location: /blogs/inc/_core/_template.funcs.php

Page Details

This file implements misc functions that handle output of the HTML page.

This file is part of the evoCore framework - http://evocore.net/ See also http://sourceforge.net/projects/evocms/.

Author:  fplanque: Francois PLANQUE.
Author:  blueyed: Daniel HAHLER.
Version:  $Id: _template.funcs.php,v 1.14.2.3 2008/05/11 01:13:34 fplanque Exp $
Copyright:  

(c)2003-2008 by Francois PLANQUE - http://fplanque.net/ Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - http://thequod.de/contact.

Filesource:  Source Code for this file
Functions
add_headline  [line 492]

void add_headline( string $headline  )

Add a headline, which then gets output in the HTML HEAD section.

If you want to include CSS or JavaScript files, please use require_css() and require_js() instead. This avoids duplicates and allows caching/concatenating those files later (not implemented yet)

Parameters:
string   $headline: 


[ Top ]
app_version  [line 515]

void app_version( )

Template tag.



[ Top ]
base_tag  [line 307]

string base_tag( string $url, [ $target = NULL]  )

Returns a "<base />" tag and remembers that we've used it (regenerate_url() needs this).

Parameters:
string   $url:  URL to use (this gets used as base URL for all relative links on the HTML page)
   $target: 


[ Top ]
bloginfo  [line 697]

void bloginfo( $what  )

DEPRECATED

Parameters:
   $what: 


[ Top ]
blog_home_link  [line 362]

void blog_home_link( [ $before = ''], [ $after = ''], [ $blog_text = 'Blog'], [ $home_text = 'Home']  )

Output a link to current blog.

We need this function because if no Blog is currently active (some admin pages or site pages) then we'll go to the general home.

Parameters:
   $before: 
   $after: 
   $blog_text: 
   $home_text: 


[ Top ]
bullet  [line 527]

void bullet( boolean $bool  )

Displays an empty or a full bullet based on boolean

Parameters:
boolean   $bool:  true for full bullet, false for empty bullet


[ Top ]
credits  [line 619]

void credits( [ $params = array()]  )

Template tag

Parameters:
   $params: 


[ Top ]
display_if_empty  [line 603]

boolean display_if_empty( [ $params = array()]  )

Stub

Parameters:
   $params: 

API Tags:
Return:  true if empty MainList


[ Top ]
header_nocache  [line 144]

void header_nocache( )

Sends HTTP headers to avoid caching of the page.



[ Top ]
header_redirect  [line 52]

void header_redirect( [string $redirect_to = NULL], [boolean $permanent = false]  )

Sends HTTP header to redirect to the previous location (which can be given as function parameter, GET parameter (redirect_to), is taken from Hit::$referer or $baseurl).

$Debuglog and $Messages get stored in $Session, so they are available after the redirect.

NOTE: This function exit() the php script execution.

Parameters:
string   $redirect_to:  URL to redirect to (overrides detection)
boolean   $permanent:  is this a permanent redirect? if true, send a 301; otherwise a 303

Information Tags:
Todo:  fp> do NOT allow $redirect_to = NULL. This leads to spaghetti code and unpredictable behavior.

[ Top ]
include_headlines  [line 504]

string include_headlines( )

Outputs the collected HTML HEAD lines.


API Tags:
See:  add_headline()


[ Top ]
item_prevnext_links  [line 541]

void item_prevnext_links( [ $params = array()]  )

Stub: Links to previous and next post in single post mode

Parameters:
   $params: 


[ Top ]
link_pages  [line 706]

void link_pages( )

DEPRECATED



[ Top ]
mainlist_get_item  [line 582]

Item &mainlist_get_item( )

Stub



[ Top ]
mainlist_page_links  [line 566]

void mainlist_page_links( [ $params = array()]  )

Stub: Links to list pages:

Parameters:
   $params: 


[ Top ]
messages  [line 555]

void messages( [ $params = array()]  )

Stub

Parameters:
   $params: 


[ Top ]
powered_by  [line 653]

void powered_by( [ $params = array()]  )

Display "powered by b2evolution" logo

Parameters:
   $params: 


[ Top ]
request_title  [line 169]

void request_title( [array $params = array()]  )

Display a global title matching filter params

Outputs the title of the category when you load the page with

  1. ?cat=
Display "Archive Directory" title if it has been requested Display "Latest comments" title if these have been requested Display "Statistics" title if these have been requested Display "User profile" title if it has been requested

Parameters:
array   $params:  params

Information Tags:
Todo:  single month: Respect locales datefmt
Todo:  single post: posts do no get proper checking (wether they are in the requested blog or wether their permissions match user rights, thus the title sometimes gets displayed even when it should not. We need to pre-query the ItemList instead!!
Todo:  make it complete with all possible params!

[ Top ]
require_css  [line 442]

void require_css( string $css_file, [boolean $relative_to_base = FALSE], [string $title = NULL], [string $media = NULL]  )

Memorize that a specific css that file will be required by the current page.

All requested files will be included in the page head only once (when headlines is called)

Accepts absolute urls, filenames relative to the rsc/css directory. Set $relative_to_base to TRUE to prevent this function from adding on the rsc_path

Parameters:
string   $css_file:  alias, url or filename (relative to rsc/js) for javascript file
boolean   $relative_to_base:  relative_to_base. False (default) if the file is in the rsc/css folder. True to make it relative
string   $title:  title. The title for the link tag
string   $media:  media. ie, 'print'


[ Top ]
require_js  [line 389]

void require_js( string $js_file, [boolean $relative_to_base = FALSE]  )

Memorize that a specific javascript file will be required by the current page.

All requested files will be included in the page head only once (when headlines is called)

Accepts absolute urls, filenames relative to the rsc/js directory and certain aliases, like 'jquery' and 'jquery_debug' If 'jquery' is used and $debug is set to true, the 'jquery_debug' is automatically swapped in. Any javascript added to the page is also added to the $required_js array, which is then checked to prevent adding the same code twice

Parameters:
string   $js_file:  alias, url or filename (relative to rsc/js) for javascript file
boolean   $relative_to_base:  relative_to_base. False (default) if the file is in the rsc/js folder. True to make it relative


[ Top ]
robots_tag  [line 327]

void robots_tag( )

Robots tag

Outputs the robots meta tag if necessary



[ Top ]


Documentation generated on Sat, 06 Mar 2010 03:40:56 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).