WordPress.org

Plugin Directory


Ignore:
Timestamp:
03/11/09 15:15:22 (9 years ago)
Author:
mark8barnes
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tng-wordpress-plugin/trunk/tng.php

    r101295 r101344  
    55Description: Integrates TNG (The Next Generation of Genealogy) with Wordpress. 
    66Author: Mark Barnes 
    7 Version: 0.25.1 
     7Version: 0.25.2 
    88Author URI: http://www.4-14.org.uk/ 
    99Copyright (c) 2008 Mark Barnes 
     
    791791// Discards contents of page if TNG is displayed 
    792792function mbtng_discard_output() { 
    793     if (mbtng_display_page() && mbtng_use_tng_homepage()) 
     793    if (mbtng_display_page() && mbtng_use_tng_homepage()) { 
    794794        ob_clean(); 
     795        // Remove actions in case loop used elsewhere (e.g. in sidebar) 
     796        remove_action('loop_start', 'mbtng_output_page'); 
     797        remove_action('loop_end', 'mbtng_discard_output'); 
     798    } 
     799 
    795800} 
    796801 
     
    922927        include ($tng_folder.'config.php'); 
    923928        $thislanguage = $mylanguage ? $mylanguage : $language; 
    924         chdir ($tng_folder.$thislanguage); 
    925         include ('text.php'); 
     929        include ($tng_folder.$thislanguage.'/text.php'); 
    926930        echo $before_widget; 
    927931        echo $before_title.'People Search'.$after_title; 
     
    947951        extract($args); 
    948952        $tng_folder = get_option('mbtng_path'); 
     953        include ($tng_folder.'config.php'); 
    949954        $thislanguage = $mylanguage ? $mylanguage : $language; 
    950         include ($tng_folder.'config.php'); 
    951         chdir ($tng_folder.$thislanguage); 
    952         include ('text.php'); 
    953         include ('alltext.php'); 
     955        include ($tng_folder.$thislanguage.'/text.php'); 
     956        include ($tng_folder.$thislanguage.'/alltext.php'); 
    954957        echo $before_widget; 
    955958        echo $before_title.'Genealogy Menu'.$after_title; 
     
    10021005} 
    10031006 
    1004 //Outputs the TNG theme switcher menu in the sidebar 
     1007//Outputs the TNG template switcher menu in the sidebar 
    10051008function mbtng_output_template_menu ($args) { 
    10061009    if (mbtng_display_widget()) { 
     
    10091012        if (is_array($templates)) { 
    10101013            echo $before_widget; 
    1011             echo $before_title.'Theme switcher'.$after_title; 
     1014            echo $before_title.'Template switcher'.$after_title; 
    10121015            echo "<ul>\n"; 
    10131016            foreach ($templates as $template) { 
     
    12061209            'swf' => 'application/x-shockwave-flash', 
    12071210            'flv' => 'video/x-flv', 
    1208             // images 
    12091211            'png' => 'image/png', 
    12101212            'jpe' => 'image/jpeg', 
     
    12181220            'svg' => 'image/svg+xml', 
    12191221            'svgz' => 'image/svg+xml', 
    1220             // archives 
    12211222            'zip' => 'application/zip', 
    12221223            'rar' => 'application/x-rar-compressed', 
     
    12241225            'msi' => 'application/x-msdownload', 
    12251226            'cab' => 'application/vnd.ms-cab-compressed', 
    1226             // audio/video 
    12271227            'mp3' => 'audio/mpeg', 
    12281228            'qt' => 'video/quicktime', 
    12291229            'mov' => 'video/quicktime', 
    1230             // adobe 
    12311230            'pdf' => 'application/pdf', 
    12321231            'psd' => 'image/vnd.adobe.photoshop', 
     
    12341233            'eps' => 'application/postscript', 
    12351234            'ps' => 'application/postscript', 
    1236             // ms office 
    12371235            'doc' => 'application/msword', 
    12381236            'rtf' => 'application/rtf', 
     
    12421240            'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 
    12431241            'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 
    1244             // open office 
    12451242            'odt' => 'application/vnd.oasis.opendocument.text', 
    12461243            'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 
     1244            'ged' => 'application/x-gedcom', 
    12471245        ); 
    12481246        $ext = strtolower(array_pop(explode('.',$filename))); 
     
    12621260/* TO DO 
    12631261======== 
    1264 Make it work in a subfolder 
    12651262Get it working with non-pretty permalinks 
    1266 Fix template switcher when not logged in 
    1267 Find error in cemetries page 
     1263Find error in cemeteries page 
    12681264Make it work with the home page 
    1269 Serve default template if template switcher widget not installed 
    12701265*/ 
    12711266?> 
Note: See TracChangeset for help on using the changeset viewer.