WordPress.org

Plugin Directory


Ignore:
Timestamp:
03/11/09 09:05:16 (8 years ago)
Author:
mark8barnes
Message:
 
File:
1 edited

Legend:

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

    r101128 r101214  
    55Description: Integrates TNG (The Next Generation of Genealogy) with Wordpress. 
    66Author: Mark Barnes 
    7 Version: 0.25 
     7Version: 0.25.1 
    88Author URI: http://www.4-14.org.uk/ 
    99Copyright (c) 2008 Mark Barnes 
     
    307307    echo "\></td>\n"; 
    308308    echo "\t\t</tr>\n"; 
    309     if (version_compare($wp_version, '2.6.2', '>=')) { 
     309    if (version_compare($wp_version, '2.6.1', '>')) { 
    310310        echo "\t\t<tr>\n"; 
    311311        echo "\t\t\t<td  style=\"padding: 0.5em 0\"valign=\"top\">Redirect successful login to referrer page:&nbsp;</td>\n"; 
     
    881881* mbtng_output_menu                             * 
    882882* mbtng_output_template_menu                    * 
     883* mbtng_base_url                                * 
    883884************************************************/ 
    884885 
     
    925926        echo $before_widget; 
    926927        echo $before_title.'People Search'.$after_title; 
    927         echo "<form action=\"search.php\" method=\"post\">\n"; 
     928        $base_url = mbtng_base_url(); 
     929        echo "<form action=\"{$base_url}search.php\" method=\"post\">\n"; 
    928930        echo "<table class=\"menuback\">\n"; 
    929931        echo "<tr><td><span class=\"fieldname\">{$text['mnulastname']}:<br /><input type=\"text\" name=\"mylastname\" class=\"searchbox\" size=\"14\" /></span></td></tr>\n"; 
     
    933935        echo "</form>\n"; 
    934936        echo "<ul>\n"; 
    935         echo "<li style=\"font-weight:bold\"><a href=\"searchform.php\">{$text['mnuadvancedsearch']}</a></li>\n"; 
     937        echo "<li style=\"font-weight:bold\"><a href=\"{$base_url}searchform.php\">{$text['mnuadvancedsearch']}</a></li>\n"; 
    936938        echo "</ul>\n"; 
    937939        echo $after_widget; 
     
    946948        $tng_folder = get_option('mbtng_path'); 
    947949        $thislanguage = $mylanguage ? $mylanguage : $language; 
     950        include ($tng_folder.'config.php'); 
    948951        chdir ($tng_folder.$thislanguage); 
    949952        include ('text.php'); 
     
    951954        echo $before_widget; 
    952955        echo $before_title.'Genealogy Menu'.$after_title; 
     956        $base_url = mbtng_base_url(); 
    953957        echo "<ul>\n"; 
    954         echo "<li class=\"surnames\" style=\"font-weight:bold\"><a href=\"surnames.php\">{$text['mnulastnames']}</a></li>\n"; 
     958        echo "<li class=\"surnames\" style=\"font-weight:bold\"><a href=\"{$base_url}surnames.php\">{$text['mnulastnames']}</a></li>\n"; 
    955959        echo "</ul>\n"; 
    956960        echo "<ul style=\"margin-top:0.75em\">\n"; 
    957         echo "<li class=\"whatsnew\"><a href=\"whatsnew.php\">{$text['mnuwhatsnew']}</a></li>\n"; 
    958         echo "<li class=\"mostwanted\"><a href=\"mostwanted.php\">{$text['mostwanted']}</a></li>\n"; 
    959         echo "<li class=\"media\"><a href=\"browsemedia.php\">{$text['allmedia']}</a>\n"; 
     961        echo "<li class=\"whatsnew\"><a href=\"{$base_url}whatsnew.php\">{$text['mnuwhatsnew']}</a></li>\n"; 
     962        echo "<li class=\"mostwanted\"><a href=\"{$base_url}mostwanted.php\">{$text['mostwanted']}</a></li>\n"; 
     963        echo "<li class=\"media\"><a href=\"{$base_url}browsemedia.php\">{$text['allmedia']}</a>\n"; 
    960964            echo "<ul>\n"; 
    961             echo "<li class=\"photos\"><a href=\"browsemedia.php?mediatypeID=photos\">{$text['mnuphotos']}</a></li>\n"; 
    962             echo "<li class=\"histories\"><a href=\"browsemedia.php?mediatypeID=histories\">{$text['mnuhistories']}</a></li>\n"; 
    963             echo "<li class=\"documents\"><a href=\"browsemedia.php?mediatypeID=documents\">{$text['documents']}</a></li>\n"; 
    964             echo "<li class=\"videos\"><a href=\"browsemedia.php?mediatypeID=videos\">{$text['videos']}</a></li>\n"; 
    965             echo "<li class=\"recordings\"><a href=\"browsemedia.php?mediatypeID=recordings\">{$text['recordings']}</a></li>\n"; 
     965            echo "<li class=\"photos\"><a href=\"{$base_url}browsemedia.php?mediatypeID=photos\">{$text['mnuphotos']}</a></li>\n"; 
     966            echo "<li class=\"histories\"><a href=\"{$base_url}browsemedia.php?mediatypeID=histories\">{$text['mnuhistories']}</a></li>\n"; 
     967            echo "<li class=\"documents\"><a href=\"{$base_url}browsemedia.php?mediatypeID=documents\">{$text['documents']}</a></li>\n"; 
     968            echo "<li class=\"videos\"><a href=\"{$base_url}browsemedia.php?mediatypeID=videos\">{$text['videos']}</a></li>\n"; 
     969            echo "<li class=\"recordings\"><a href=\"{$base_url}browsemedia.php?mediatypeID=recordings\">{$text['recordings']}</a></li>\n"; 
    966970            echo "</ul></li>"; 
    967         echo "<li class=\"albums\"><a href=\"browsealbums.php\">{$text['albums']}</a></li>\n"; 
    968         echo "<li class=\"cemeteries\"><a href=\"cemeteries.php\">{$text['mnucemeteries']}</a></li>\n"; 
    969         echo "<li class=\"heastones\"><a href=\"browsemedia.php?mediatypeID=headstones\">{$text['mnutombstones']}</a></li>\n"; 
    970         echo "<li class=\"places\"><a href=\"places.php\">{$text['places']}</a></li>\n"; 
    971         echo "<li class=\"notes\"><a href=\"browsenotes.php\">{$text['notes']}</a></li>\n"; 
    972         echo "<li class=\"anniversaries\"><a href=\"anniversaries.php\">{$text['anniversaries']}</a></li>\n"; 
    973         echo "<li class=\"reports\"><a href=\"reports.php\">{$text['mnureports']}</a></li>\n"; 
    974         echo "<li class=\"sources\"><a href=\"browsesources.php\">{$text['mnusources']}</a></li>\n"; 
    975         echo "<li class=\"repos\"><a href=\"browserepos.php\">{$text['repositories']}</a></li>\n"; 
    976         echo "<li class=\"trees\"><a href=\"browsetrees.php\">{$text['mnustatistics']}</a></li>\n"; 
    977         echo "<li class=\"language\"><a href=\"changelanguage.php\">{$text['mnulanguage']}</a></li>\n"; 
     971        echo "<li class=\"albums\"><a href=\"{$base_url}browsealbums.php\">{$text['albums']}</a></li>\n"; 
     972        echo "<li class=\"cemeteries\"><a href=\"{$base_url}cemeteries.php\">{$text['mnucemeteries']}</a></li>\n"; 
     973        echo "<li class=\"heastones\"><a href=\"{$base_url}browsemedia.php?mediatypeID=headstones\">{$text['mnutombstones']}</a></li>\n"; 
     974        echo "<li class=\"places\"><a href=\"{$base_url}places.php\">{$text['places']}</a></li>\n"; 
     975        echo "<li class=\"notes\"><a href=\"{$base_url}browsenotes.php\">{$text['notes']}</a></li>\n"; 
     976        echo "<li class=\"anniversaries\"><a href=\"{$base_url}anniversaries.php\">{$text['anniversaries']}</a></li>\n"; 
     977        echo "<li class=\"reports\"><a href=\"{$base_url}reports.php\">{$text['mnureports']}</a></li>\n"; 
     978        echo "<li class=\"sources\"><a href=\"{$base_url}browsesources.php\">{$text['mnusources']}</a></li>\n"; 
     979        echo "<li class=\"repos\"><a href=\"{$base_url}browserepos.php\">{$text['repositories']}</a></li>\n"; 
     980        echo "<li class=\"trees\"><a href=\"{$base_url}browsetrees.php\">{$text['mnustatistics']}</a></li>\n"; 
     981        echo "<li class=\"language\"><a href=\"{$base_url}changelanguage.php\">{$text['mnulanguage']}</a></li>\n"; 
    978982        if ($allow_admin) { 
    979             echo "<li class=\"showlog\"><a href=\"showlog.php\">{$text['mnushowlog']}</a></li>\n"; 
    980             echo "<li class=\"admin\"><a href=\"admin/index.php\">{$text['mnuadmin']}</a></li>\n"; 
    981         } 
    982         echo "<li class=\"bookmarks\"><a href=\"bookmarks.php\">{$text['bookmarks']}</a></li>\n"; 
    983         echo "<li class=\"suggest\"><a href=\"suggest.php\">{$text['contactus']}</a></li>\n"; 
     983            echo "<li class=\"showlog\"><a href=\"{$base_url}showlog.php\">{$text['mnushowlog']}</a></li>\n"; 
     984            echo "<li class=\"admin\"><a href=\"{$base_url}admin/index.php\">{$text['mnuadmin']}</a></li>\n"; 
     985        } 
     986        echo "<li class=\"bookmarks\"><a href=\"{$base_url}bookmarks.php\">{$text['bookmarks']}</a></li>\n"; 
     987        echo "<li class=\"suggest\"><a href=\"{$base_url}suggest.php\">{$text['contactus']}</a></li>\n"; 
    984988        echo "</ul>\n"; 
    985989        echo "<ul style=\"margin-top:0.75em\">\n"; 
    986990        if (!is_user_logged_in()) { 
    987             echo "<li class=\"register\" style=\"font-weight:bold\"><a href=\"newacctform.php\">{$text['mnuregister']}</a></li>\n"; 
    988             echo "<li class=\"login\" style=\"font-weight:bold\"><a href=\"login.php\">{$text['mnulogon']}</a></li>\n"; 
     991            echo "<li class=\"register\" style=\"font-weight:bold\"><a href=\"{$base_url}newacctform.php\">{$text['mnuregister']}</a></li>\n"; 
     992            echo "<li class=\"login\" style=\"font-weight:bold\"><a href=\"{$base_url}login.php\">{$text['mnulogon']}</a></li>\n"; 
    989993        } else { 
    990994            if (function_exists('wp_logout_url')) 
     
    10181022        } 
    10191023    } 
     1024} 
     1025 
     1026//Returns a full URL only if required 
     1027function mbtng_base_url () { 
     1028    if (!mbtng_display_page()) 
     1029        return = get_permalink(get_option('mbtng_wordpress_page')); 
     1030    else 
     1031        return = ''; 
    10201032} 
    10211033 
Note: See TracChangeset for help on using the changeset viewer.