Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Admin notes
Topic Started: Jul 23 2008, 09:52 AM (534 Views)
Rubenvh
Member
 *  
Hi, i'm looking for the source code of the admin notes. Ik think it's made with php, but i can't find the source code. Can anyone tell me what the source code is?
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
Member
 *   *   *   *  
Code:
 

<form action="http://__.invisionfree.com/__________/admin.php?adsess=________________________" method="post" name="theAdminForm" />
<input name="adsess" value="________________________" type="hidden" />
<input name="save" value="1" type="hidden" />
<input name="act" value="index" type="hidden" />
<div class="tableborder">
<div class="maintitle">Admin Notepad</div>
<table width="100%" align="center" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td class="tdrow1" valign="middle" width="100%">
<center>
<textarea rows="5" name="notes" wrap="soft" style="width: 80%;" onfocus="this.value=''">You can use this section to keep notes for yourself and other admins, etc.</textarea>
</center>
</td>
</tr>
<tr>
<td class="pformstrip" colspan="1" align="center">
<input value="Save Admin Notes" id="button" accesskey="s" type="submit" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>


If you add your server number, forum name and a 32 count string to be used as your admin session, this works.

If you are logged into your AdminCP, once you click on the Save Admin Notes, the admin main page will pop-up with your updated admin notes area. Otherwise, when clicked, it will ask for you to log in.

You can create a forum that only Administrators can see and can place it in the forum rules.

Anyway, there you go.
Offline Profile Quote Post Goto Top
 
Rubenvh
Member
 *  
I can't do anything with this. I need the source code so I can see how the thing is done. I think it's php.
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
Member
 *   *   *   *  
Rubenvh
Jul 23 2008, 11:50 AM
I can't do anything with this. I need the source code so I can see how the thing is done. I think it's php.
Well, my friend, I apologize that you can't do anything with this, but I was attempting to assist you.

I suggest you download a copy of Invision Power Board 1.3 and look at the admin files to see the source code.

I apologize for my ignorance, since you have no access to the MySQL database to store the notes, I didn't really think that was what you wanted.

In IPB 2.1.7, the code is:

Code:
 

//-----------------------------------------
// Notepad
//-----------------------------------------

if ( $this->ipsclass->input['save'] == 1 )
{
$this->ipsclass->DB->do_update( 'cache_store', array( 'cs_value' => $this->ipsclass->txt_stripslashes($_POST['notes']) ), "cs_key='adminnotes'" );
}

$text = "You can use this section to keep notes for yourself and other admins, etc.";

$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='adminnotes'" ) );
$this->ipsclass->DB->simple_exec();

if ( ! $notes = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->DB->do_insert( 'cache_store', array( 'cs_key' => 'adminnotes', 'cs_value' => $text ) );

$notes = array( 'cs_key' => 'adminnotes ', 'cs_value' => $text );
}

$content['ad_notes'] = $this->html->acp_notes( $notes['cs_value'] );


EDIT: here is the skin code

Code:
 

function acp_notes($notes) {

$IPBHTML = "";
//--starthtml--//

$IPBHTML .= <<<EOF
<form action='{$this->ipsclass->base_url}&act=index&save=1' method='post'>
<textarea name='notes' style='background-color:#F9FFA2;border:1px solid #CCC;width:95%;font-family:verdana;font-size:10px' rows='8' cols='25'>{$notes}</textarea>
<div align='center'><br /><input type='submit' value='Save Admin Notes' class='realdarkbutton' /></div>
</form>
EOF;

//--endhtml--//
return $IPBHTML;
}

Maybe that can assist you, and I apologize for not providing you something that you could do something with in the first place.
Edited by Codes Rock, Jul 23 2008, 12:13 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply