SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started by: Divecall on July 30, 2011, 10:02:31 AM
-
I'm looking for a block, where member can put notes inside (e.g. 2-do, url, topics they want read....)
i saw, that ADKPortal have this (looks like).
look at the picture.
if you click on the pencil in the right corner it opens a inbox, where members can enter text.
working demo:http://www.anotheradminforum.com/
-
Looks like this is the code for this block.
How we can change this for SP?
global $user_info, $smcFunc, $txt, $boardurl;
$notes = '';
if(isset($_POST['notes_save']) && !empty($_POST['notes_txt']))
{
$notes = $smcFunc['htmlspecialchars']($_POST['notes_txt']);
if($user_info['is_guest'])
$_SESSION['adk_notes'] = $notes;
else
updateMemberData($user_info['id'],array('adk_notes' => $notes));
}
else
{
$notes = $user_info['adk_notes'];
//If this user is guest, He can add notes too ;)
if(isset($_SESSION['adk_notes']) && $user_info['is_guest'])
$notes = $_SESSION['adk_notes'];
}
echo'
<script type="text/javascript">
function ChangeContent(id, id2) {
if(document.getElementById(id).style.display == "none"){
document.getElementById(id).style.display = "block";
}
else{
document.getElementById(id).style.display = "none";
}
if(document.getElementById(id2).style.display == "none"){
document.getElementById(id2).style.display = "block";
}
else{
document.getElementById(id2).style.display = "none";
}
}
</script>';
echo'
<div class="windowbg2 smalltext" align="center" id="note" style="display: none;">
<form action="" method="post">
<textarea rows="3" cols="15" name="notes_txt">',$notes,'</textarea>
<br />
<br /><input class="button_submit" type="submit" name="notes_save" value="'.$txt['save'].'" />
</form>
</div>';
echo'
<div id="note2" align="center" class="windowbg2 smalltext" style="display: block;">
',empty($notes) ? $txt['adk_add_a_reminder'] : parse_bbc($notes) ,'
</div>
<div align="right">
<a href="javascript:ChangeContent(\'note\',\'note2\')" title="'.$txt['editar'].'">
<img alt="" src="'.$boardurl.'/adkportal/images/email_edit.png" />
</a>
</div>
';
/* rows="10" cols="10" onkeyup="if(this.value.length > 140){this.value=this.value.substring(0,140);alert(\'no puede poner más de 140 caracteres\')}"*/
-
Nobody an Idea?
-
Hi :) I need this can anyone help us?
Thanks in advance.
-
OOh, I would be interested in this as well :D