SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: Divecall on July 30, 2011, 10:02:31 AM

Title: Reminder-Block
Post 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/

Title: Re: Reminder-Block
Post by: Divecall on July 30, 2011, 01:39:32 PM
Looks like this is the code for this block.

How we can change this for SP?
Code: [Select]
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\')}"*/
Title: Re: Reminder-Block
Post by: Divecall on August 11, 2011, 12:17:15 PM
Nobody an Idea?
Title: Re: Reminder-Block
Post by: xlukzx on December 17, 2012, 09:03:10 AM
Hi :) I need this can anyone help us?
Thanks in advance.
Title: Re: Reminder-Block
Post by: FireDitto on January 02, 2013, 02:07:44 AM
OOh, I would be interested in this as well :D
SimplePortal 2.3.8 © 2008-2024, SimplePortal