Changeset 1343

Show
Ignore:
Timestamp:
12/04/07 07:23:34 (11 months ago)
Author:
rho
Message:

pages plugin integrated

  • Allows custom static/dinamic pages for main site
  • Allows pages per user/community
  • Allows using keywords
  • Allows php code only for administrators
  • Allows editing legacy pages (terms,privacy police)
  • Allows editing frontpage logged in/out pages
  • Implements access restrictions

Signed-off: Rolando Espinoza La fuente <rho@prosoftpeople.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/htaccess-dist

    r1325 r1343  
    7878# 
    7979#RewriteBase / 
     80 
     81RewriteRule ^content\/?(.*)?$ mod/pages/index.php?page=$1 [QSA,L] 
     82RewriteRule ^([A-Za-z0-9]+)\/pages\/?(.*)?$ mod/pages/index.php?profile_name=$1&page=$2  [QSA,L] 
    8083 
    8184RewriteRule ^_templates(\/)?$ mod/template/index.php?%{QUERY_STRING} 
  • devel/index.php

    r1307 r1343  
    55    require_once(dirname(__FILE__)."/includes.php"); 
    66    templates_page_setup(); 
    7     if (logged_on) { 
    8         templates_page_output($CFG->sitename, null, 'frontpage_loggedin'); 
     7 
     8    if (function_exists('pages_frontpage')) { 
     9        $page = pages_frontpage(isloggedin()); 
     10        $context = null; 
     11        $title = $page->title; 
     12        $body = $page->content; 
    913    } else { 
    10         templates_page_output($CFG->sitename, null, 'frontpage_loggedout'); 
     14        $context = isloggedin() ? 'frontpage_loggedin' : 'frontpage_loggedout'; 
     15        $title = $CFG->sitename; 
     16        $body = null; 
    1117    } 
    1218             
     19    templates_page_output($title, $body, $context); 
    1320?> 
  • devel/mod/template/templates/Default_Template/frontpage_loggedin

    r1328 r1343  
    1212    <a href="{{url}}{{username}}">View your profile</a>! Your portfolio is the main way people find out about you. You can edit your details and choose exactly what you want to share with whom. 
    1313</p> 
     14<p>Navigate: {{page:Main}} | {{page:About}}</p> 
  • devel/mod/template/templates/Default_Template/frontpage_loggedout

    r1328 r1343  
    1212    If you like what you see, why not <a href="{{url}}mod/invite/register.php">register for an account</a>? 
    1313</p> 
     14<p>Navigate: {{page:Main}} | {{page:About}}</p>