Changeset 1304

Show
Ignore:
Timestamp:
01/29/07 17:18:54 (2 years ago)
Author:
jm3
Message:

main hub / controller / site dispatch includes cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/folder-as-rss.php

    r1178 r1304  
    2020 
    2121        $showURLs = false; 
    22         $USE_LONG_URLS = false; 
    2322        $errors = 0; 
    2423 
     
    187186<% if( $showURLs ) { 
    188187                $tmpurl = $url; 
    189                 if( ! $USE_LONG_URLS ) { 
    190                         $tmpurl = str_replace ( "http://", "", $tmpurl); 
    191                         $tmpurl = str_replace ( "https://", "[s] ", $tmpurl); 
    192                         $tmpurl = str_replace ( "ftp://", "[f] ", $tmpurl); 
    193                         $tmpurl = str_replace ( "www.", "", $tmpurl); 
    194                 } 
     188                $tmpurl = str_replace ( "http://", "", $tmpurl); 
     189                $tmpurl = str_replace ( "https://", "[s] ", $tmpurl); 
     190                $tmpurl = str_replace ( "ftp://", "[f] ", $tmpurl); 
     191                $tmpurl = str_replace ( "www.", "", $tmpurl); 
    195192                if( strlen( $tmpurl ) > $MAX_URL_LENGTH )  
    196193                        $tmpurl = substr( $tmpurl, 0, $MAX_URL_LENGTH ) . "..."; 
  • feedmelinks/folder.php

    r1178 r1304  
    2828 
    2929        $showURLs = false; 
    30         $USE_LONG_URLS = false; 
    3130        $errors = ""; 
    3231        $condensed = ($condensed || $short) ? 1 : 0; 
  • feedmelinks/index.php

    r1302 r1304  
    33        include( "modules/class.gzip_encode.inc.php" ); 
    44        include_once( "modules/utils.inc.php" ); 
     5        include( "modules/initial-dispatch.inc.php" ); 
    56        $page = "index"; 
    67 
     
    910        $direction = "ASC"; 
    1011 
    11         $tok =  $_COOKIE["c_pass_token"]; 
    12         $u   =  $sessionUserId = $_COOKIE["c_uid"]; 
    13          
    14         if( (! $tok || $tok != md5( getPasswdForUser( $u )) ) && ! $l ) { 
    15                 $op = "login"; 
    16                 if( $name && $url && $from ) { 
    17                         echo bounceTo( $site . "/login?name=" . urlencode( $name ) . "&url=" . urlencode( $url ) . "&from=" . urlencode( $from )); 
    18                 } else { 
    19                         if( isADevice( $HTTP_USER_AGENT )) { 
    20                                 echo jsWrap( "window.location = 'http://feedmelinks.com/portal';" ); 
    21                         } else { 
    22                                 echo bounceTo( $site . urldecode( "/portal" ) ); 
    23                         } 
    24                 }  
    25         } else { 
     12        $MAX_URL_LENGTH = 40; 
     13        $MAX_NAME_LENGTH = 40; 
    2614 
    27                 # first, set up options and defaults. 
    28                 $MAX_URL_LENGTH = 40; 
    29                 $MAX_NAME_LENGTH = 40; 
    30                 $USE_LONG_URLS = 0; 
    31  
    32                 if( $l ) { 
    33                         $link_info = getLinkInfo( $l ); 
    34                         $name = urldecode( $link_info['name'] ); 
    35                         $submitter = $link_info['submitter']; 
    36                 } 
     15        if( $l ) { 
     16                $link_info = getLinkInfo( $l ); 
     17                $name = urldecode( $link_info['name'] ); 
     18                $submitter = $link_info['submitter']; 
     19        } 
    3720 
    3821        $title = ( $l ? "Feed Me Links &raquo; $submitter &raquo; " . $name : "Feed Me Links!" ); 
     
    4124        if( $op != "delete" && $op != "commitEdit" && $u ) { 
    4225                $do_xajax = true; 
    43  
    4426                include( "$modules/header.inc.php" );  
    45 ?> 
    46  
    47 <br /> 
    48  
    49 <?php 
     27                echo "<br />"; 
    5028        } else { 
    5129                include( "$modules/header.insecure.inc.php" ); 
     
    5533        $showLinks = 1; 
    5634        $hotRow = -1; 
    57  
    58         ############################################################## 
    5935 
    6036        if( $op == "add_comment" ) { 
     
    7551 
    7652        include( "$modules/footer.inc.php" );  
    77  
    78 } // end if login 
    79  new gzip_encode(); 
     53        new gzip_encode(); 
    8054?> 
  • feedmelinks/list-public.php

    r569 r1304  
    1414 
    1515        $showURLs = false; 
    16         $USE_LONG_URLS = false; 
    17  
    1816        $title = "Feed Me Links : Public " . getCatsName(); 
    1917%> 
  • feedmelinks/modules/list-public-compact.inc.php

    r889 r1304  
    2020        # first, set up options and defaults. 
    2121        $MAX_NAME_LENGTH = 40; 
    22  
    23         $showURLs = false; 
    24         $USE_LONG_URLS = false; 
    2522%> 
    2623 
     
    3330        $magick = 1; 
    3431        $hotRow = -1; 
    35  
    36         $columnCount = $showURLs ? 7 : 6; 
    37  
     32        $columnCount = 6; 
    3833        $singleGroup = $folder ? true : false; 
    3934 
  • feedmelinks/modules/public.inc.php

    r889 r1304  
    1717 
    1818        $showURLs = false; 
    19         $USE_LONG_URLS = false; 
    2019 
    2120        $max = 4; 
     
    185184        <% 
    186185                $tmpurl = $url; 
    187                 if( ! $USE_LONG_URLS ) { 
    188                         $tmpurl = str_replace ( "http://", "", $tmpurl); 
    189                         $tmpurl = str_replace ( "https://", "[s] ", $tmpurl); 
    190                         $tmpurl = str_replace ( "ftp://", "[f] ", $tmpurl); 
    191                         $tmpurl = str_replace ( "www.", "", $tmpurl); 
    192                 } 
     186                $tmpurl = str_replace ( "http://", "", $tmpurl); 
     187                $tmpurl = str_replace ( "https://", "[s] ", $tmpurl); 
     188                $tmpurl = str_replace ( "ftp://", "[f] ", $tmpurl); 
     189                $tmpurl = str_replace ( "www.", "", $tmpurl); 
    193190                if( strlen( $tmpurl ) > $MAX_URL_LENGTH )  
    194191                        $tmpurl = substr( $tmpurl, 0, $MAX_URL_LENGTH ) . "...";