Created
March 29, 2013 21:18
-
-
Save sorenmalling/5273706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="save.php" method="POST"> | |
<input type="hidden" name="element-uid" value="[tt_content_uid]" /> | |
<textarea>Here goes comment - this could be a RTE</textarea> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" onclick="openNoteForm">Open note form</a> | |
<script> | |
function openNoteForm(element) { | |
jQuery('#formid').show() <<-- here, do some magic that makes sense: Show the form (form.html) set the value of the hidden field to the current tt_content element | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sql = 'INSERT INTO `table` SET note = "' . $notecontent . '" element = "' . $tt_content_uid . '" fe_user = "' . $this->getCurrentUserSession() . '"'; | |
functon getCurretUserSession() { | |
return $GLOBALS['TSFE']->fe_user # and maybe some more.. | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment