Changeset 1288
- Timestamp:
- 12/30/06 17:11:32 (2 years ago)
- Files:
-
- feedmelinks/index.php (modified) (1 diff)
- feedmelinks/modules/header.inc.php (modified) (1 diff)
- feedmelinks/modules/scripts.inc.php (modified) (1 diff)
- feedmelinks/modules/track.inc.php (modified) (1 diff)
- feedmelinks/modules/utils.inc.php (modified) (3 diffs)
- feedmelinks/modules/view-link.inc.php (modified) (3 diffs)
- feedmelinks/script/funcs.js (modified) (1 diff)
- feedmelinks/testing/moo.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/index.php
r1188 r1288 63 63 if( $op == "add_comment" ) { 64 64 addCommentToLink( $l, $comment, $u, $debug ); 65 66 if( !$debug ) { 67 %> 68 <script language="javascript"> history.go( -1 ); </script> 69 <% 70 } 65 $late_mesg = "Added comment!"; 66 67 if( !$debug ) 68 bounceTo( "/$l/m/Added+your+comment." ); 71 69 } 72 70 feedmelinks/modules/header.inc.php
r1278 r1288 62 62 if( ! $noMenu ) 63 63 include( "$modules/menu.inc.php" ); 64 if( $mesg ) 65 echo "<p/>" . ephemeral( $mesg ); 64 66 ?> 65 67 feedmelinks/modules/scripts.inc.php
r876 r1288 2 2 <script language="javascript" type="text/javascript" src="/script/behaviour.js"></script> 3 3 <script language="javascript" type="text/javascript" src="/script/fml-behaviours.js"></script> 4 <script language="javascript" type="text/javascript" src="/script/mootools.js"></script> 5 feedmelinks/modules/track.inc.php
r863 r1288 1 1 <% 2 2 if( ! $noTrack ) { 3 %> 4 <script src="/mint/mint.js.php" type="text/javascript" language="javascript"></script> 5 <% 3 # script src="/mint/mint.js.php" type="text/javascript" language="javascript"/script 6 4 } 7 5 %> feedmelinks/modules/utils.inc.php
r1286 r1288 699 699 } 700 700 701 function startTell( $t = "", $wide = false ) { 701 function fade_out( $id ) { 702 $id = $id ? $id : "mesg"; 703 return "\n" . jsWrap( "\n var my_oncomplete = function() { removeElement( '$id' ); };\n var myFx = new Fx.Style('$id', 'opacity', {duration:2000,onComplete:my_oncomplete} ).custom(1,0);\n" ); 704 } 705 706 function ephemeral( $title, $message ) { 707 $id = "mesg_" . rand(); 708 $s = "<div id='$id' class='warning'>" . ($message ? "$title : $message" : $title) . "</div>"; 709 return $s . fade_out( $id ); 710 } 711 712 function startTell( $t = "", $wide = false, $id ) { 702 713 %> 703 714 <link rel="stylesheet" type="text/css" href="/style/notebox.css"> 704 <div class="notebox" <%= $wide ? 'style="width: 600px; margin-left: auto; margin-right: auto;"' : ""%>>715 <div id="<?= $id ?>" class="notebox" <%= $wide ? 'style="width: 600px; margin-left: auto; margin-right: auto;"' : ""%>> 705 716 <div class="noteboxHead" <%= $wide ? 'style="font-size: 140%;"' : ""%>><h2><%= $t %></h2></div> 706 717 <div class="noteboxBody" <%= $wide ? 'style="font-size: 140%;"' : ""%>> … … 716 727 } 717 728 718 function tell( $t, $m, $wide = false ) {719 startTell( $t, $wide );729 function tell( $t, $m, $wide = false, $id ) { 730 startTell( $t, $wide, $id ); 720 731 echo $m; 721 732 endTell(); … … 2950 2961 if( $debug ) 2951 2962 echo "(DEBUG: WROTE $bytes_written BYTES TO $linkfile)<br />"; 2952 else2953 echo "Adding your comment... done!<br />";2954 2963 2955 2964 # NOW WE SEND MAIL: feedmelinks/modules/view-link.inc.php
r1286 r1288 1 1 <% 2 3 if( $late_mesg ) 4 echo ephemeral( $late_mesg ); 5 2 6 if( $l ) { 3 7 if( is_numeric( $l )) { … … 26 30 $owned = ( $user == $u ) ? 1 : 0; 27 31 28 if( $mesg ) {29 %>30 <div class="warning">31 <?= $mesg ?>32 </div>33 <%34 }35 32 if( $owned ) { 36 33 %> … … 60 57 <a class="biglink" title="<%= $name %>" href="/t/<%= $l %>"><%= $name %></a> <% if( $owned ) {makeAJAXEditLink( "name", "Rename this link" );} %> 61 58 <% if( $owned ) { %> 62 Privacy:<%= makeAJAXToggle( "link_privacy", $l, $isPrivate ) %>59 Make <?= $private ? "public" : "private" ?>: <%= makeAJAXToggle( "link_privacy", $l, $isPrivate ) %> 63 60 <% } %> 64 61 </div> feedmelinks/script/funcs.js
r1188 r1288 73 73 //_content.window.location = "/s/" + s[s.selectedIndex].value; 74 74 } 75 76 function removeElement( el ) { 77 var parent = document.getElementById( el ).parentNode; 78 parent.removeChild( document.getElementById( el )); 79 } 80