Changeset 917
- Timestamp:
- 12/10/05 13:05:46 (3 years ago)
- Files:
-
- trunk/feedmelinks/feedmelinks/admin/log.php (modified) (1 diff)
- trunk/feedmelinks/feedmelinks/comments.php (modified) (3 diffs)
- trunk/feedmelinks/feedmelinks/modules/utils.inc.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/feedmelinks/feedmelinks/admin/log.php
r916 r917 34 34 echo " $f lines in $l (recent-most entries are first) \n\n"; 35 35 exec( "tail -n 50 $l " 36 . "| sed s:" . get_home_dir() . ":root: "37 36 . "| sed s:" . get_root() . ":root:" 38 37 . "| sed s/-2005//" trunk/feedmelinks/feedmelinks/comments.php
r916 r917 36 36 37 37 <% 38 chdir( get_ home_dir() );38 chdir( get_root() ); 39 39 $cmd = "find _comments/$user -type f | xargs -n1 grep -H -v $user | sort -rk 2"; 40 40 if( $debug ) … … 96 96 <% 97 97 $c = 1; #counter 98 $the_dir = get_ home_dir() . '/_comments/' . $user;98 $the_dir = get_root() . '/_comments/' . $user; 99 99 if( is_dir( $the_dir )) { 100 100 chdir( $the_dir ); … … 148 148 149 149 <% 150 chdir( get_ home_dir() );150 chdir( get_root() ); 151 151 $cmd = "find _comments/ -type f | sort -r | xargs -n1 grep -H $user, | grep -v comments/$user | sort -r -k 2"; 152 152 if( $debug ) trunk/feedmelinks/feedmelinks/modules/utils.inc.php
r916 r917 616 616 ob_start(); 617 617 if( func_get_arg( 0 )) { 618 %><a href="<%= get _site() %>/contacts/">view all <%= get_ownoun() %> peeps' links</a><%618 %><a href="<%= getSiteURL() %>/contacts/">view all <%= get_ownoun() %> peeps' links</a><% 619 619 } else { 620 %><a href="<%= get _site() %>/contacts/?summarize=1">view just the most recent link from each of <%= get_ownoun() %> peeps</a><%620 %><a href="<%= getSiteURL() %>/contacts/?summarize=1">view just the most recent link from each of <%= get_ownoun() %> peeps</a><% 621 621 } 622 622 return ob_get_clean(); … … 721 721 } 722 722 723 # DEPRECATED: function footer_cb() { #a href="%= get _site() %/contacts/links"view %= get_ownoun() % peeps' links/a return $s; }723 # DEPRECATED: function footer_cb() { #a href="%= getSiteURL() %/contacts/links"view %= get_ownoun() % peeps' links/a return $s; } 724 724 725 725 function title_cb() { … … 873 873 function get_contact_link_driver( $user, $argVerbose ) { 874 874 if( $user == get_user()) 875 $r = "<img src=\"" . get _site() . "/img/mebay.gif\" />";875 $r = "<img src=\"" . getSiteURL() . "/img/mebay.gif\" />"; 876 876 else { 877 877 $inList = inList( $user, "contacts", get_cache() ) ; 878 878 if( ! $inList ) { 879 $r .= "<a href='" . get _site() . "/contacts/add?user=$user'>"880 . "<img src=\"" . get _site() . "/img/plus.gif\" alt=\"+\" border=\"0\" />"879 $r .= "<a href='" . getSiteURL() . "/contacts/add?user=$user'>" 880 . "<img src=\"" . getSiteURL() . "/img/plus.gif\" alt=\"+\" border=\"0\" />" 881 881 . ($argVerbose ? " Add <b>$user</b> as " . get_ownoun() . " peep?</a> " : "</a>") 882 882 . ($argVerbose ? " <a href='/contacts/ignore?user=$user'>Ignore <b>$user</b>?</a>" : "" ) … … 885 885 #$r = "<small>(<a href='/contacts/add?user=$user'>add to <b>" . get_ownoun() . " Peeps</b>?</a>)</small>"; 886 886 } else { 887 $r .= "<a href=\"" . get _site() . "/contacts/\">"888 . "<img src=\"" . get _site() . "/img/happy.png\" alt=\"*\" border=\"0\" class=\"icon\" align=\"middle\" /></a>"887 $r .= "<a href=\"" . getSiteURL() . "/contacts/\">" 888 . "<img src=\"" . getSiteURL() . "/img/happy.png\" alt=\"*\" border=\"0\" class=\"icon\" align=\"middle\" /></a>" 889 889 . ($argVerbose ? " <b>$user</b> is your peep. " : "") 890 890 . ($argVerbose ? " <a href='/contacts/remove?user=$user'>Remove <b>$user</b>?</a>" : "" ) … … 1680 1680 $exts = array( "gif", "jpg", "jpeg", "png" ); 1681 1681 foreach ($exts as $ext) { 1682 $f = get_ home_dir() . "/usr/$u/profile.$ext";1682 $f = get_root() . "/usr/$u/profile.$ext"; 1683 1683 if( is_file( $f )) { 1684 1684 unlink( $f ); … … 1695 1695 $exts = array( "gif", "jpg", "jpeg", "png" ); 1696 1696 foreach ($exts as $ext) { 1697 $f = get_ home_dir() . "/usr/$u/profile.$ext";1697 $f = get_root() . "/usr/$u/profile.$ext"; 1698 1698 if( is_file( $f )) { 1699 1699 %> … … 1848 1848 echo "then, "; 1849 1849 $d = formatTS( $date ); 1850 echo "<a href='" . get _site() . "/~$user'>$user</a>, "1850 echo "<a href='" . getSiteURL() . "/~$user'>$user</a>, " 1851 1851 . ($d != "today" && $d != "yesterday" ? " at " : "" ) 1852 1852 . $d . ", said:"; … … 2746 2746 function getStealItLinkWithText( $id ) { 2747 2747 ob_start(); 2748 %><a href="/g/<%= $id %>"><img src="<%= get _site() %>/img/plus.gif" border="0" alt="+" /> Add to your Links?</a><%2748 %><a href="/g/<%= $id %>"><img src="<%= getSiteURL() %>/img/plus.gif" border="0" alt="+" /> Add to your Links?</a><% 2749 2749 return ob_get_clean(); 2750 2750 } … … 2756 2756 function getStealItLink( $id ) { 2757 2757 ob_start(); 2758 %><a title="Add to your links?" href="/g/<%= $id %>"><img src="<%= get _site() %>/img/plus.gif" border="0" alt="+" /></a><%2758 %><a title="Add to your links?" href="/g/<%= $id %>"><img src="<%= getSiteURL() %>/img/plus.gif" border="0" alt="+" /></a><% 2759 2759 return ob_get_clean(); 2760 2760 } … … 3032 3032 $env = getFmlEnv(); 3033 3033 3034 function get_home_dir() { 3034 function get_bin() { 3035 return get_root() . "/bin"; 3036 } 3037 $bin = get_bin(); 3038 3039 function get_modules() { 3040 return $modules = get_root() . "/modules"; 3041 } 3042 $modules = get_modules(); 3043 3044 function get_root() { 3035 3045 global $env; 3036 3046 if( $env == "powerbook" ) … … 3056 3066 } 3057 3067 3058 function getSiteUrl() { 3059 global $env; 3060 if( $env == "powerbook" ) 3061 return "http://localhost:8080"; 3062 else 3063 return "http://feedmelinks.com"; 3064 } 3065 3066 function get_root() { 3067 if( $env == "powerbook" ) 3068 $root = "/Users/erdnase/www/feedmelinks.com"; 3069 else 3070 $root = "/usr/home/hirokai/feedmelinks.com"; 3071 return $root; 3072 } 3073 3074 function get_cookie_domain() { 3075 global $env; 3076 if( $env == "powerbook" ) 3077 return ""; 3078 else 3079 return ".feedmelinks.com"; 3080 } 3081 3082 function get_http_downloader() { 3083 global $env; 3084 if( $env == "powerbook" ) 3085 return "/sw/bin/lynx"; 3086 else 3087 return "/usr/local/bin/lynx"; 3088 } 3089 3090 function get_bin() { 3091 global $env; 3092 if( $env == "powerbook" ) 3093 $bin = get_root() . "/bin"; 3094 else if( $env == "live" ) 3095 $bin = "/usr/home/hirokai/feedmelinks.com/bin"; 3096 } 3097 $bin = get_bin(); 3098 3099 function get_modules() { 3100 global $env; 3101 if( $env == "powerbook" ) 3102 $modules = get_root() . "/modules"; 3103 else 3104 $modules = "/usr/home/hirokai/feedmelinks.com/modules"; 3105 } 3106 $modules = get_modules(); 3107 3108 function get_site() { 3068 function getSiteURL() { 3109 3069 global $env; 3110 3070 global $site; … … 3115 3075 return $site; 3116 3076 } 3117 $site = get_site(); 3077 $site = getSiteURL(); 3078 3079 function get_cookie_domain() { 3080 global $env; 3081 if( $env == "powerbook" ) 3082 return ""; 3083 else 3084 return ".feedmelinks.com"; 3085 } 3086 3087 function get_http_downloader() { 3088 global $env; 3089 if( $env == "powerbook" ) 3090 return "/sw/bin/lynx"; 3091 else 3092 return "/usr/local/bin/lynx"; 3093 } 3118 3094 3119 3095 # accessible so that any page can build links otf (note that QS is removed)