Page 1 of 1

MOD: Admin Note Pad

PostPosted: Wed Jun 28, 2006 12:15 am
Author: SLY LS1
Ok, Iv got a small question here, I have installed this mod and it works fine, The trouble Im having is when doing a database backup it wont let me because the table is called 'note' instead of 'phpbb_note' I know how to create a new table called 'phpbb_note' and drop the other one etc etc but I need to know which other bits of code to change so that when I change the table name to phpbb_note it will know how to find it.

Heres the mod in its original form

Code: Select all
############################################################## ## MOD Title]http://www.phpbb.com/mods/[/url] for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] ############################################################## ## Author Notes: You must have MySQL############################################################## ## MOD History: Add on that add the stripslashes in the reading table## ################################################################ Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################### #-----[ SQL ]------------------------------------------ #  CREATE TABLE note (id int(8) not null,text text);  INSERT INTO note (id,text) VALUES('1','Text');  # ##-----[ OPEN ]------------------------------------------#templates/subSilver/admin/index_body.tpl##-----[ FIND ]------------------------------------------#</table><br>##-----[ BEFORE ADD ]------------------------------------------#</table><h1>NOTE IT!</h1><table>   <tr>    <td>          <form>         <textarea>{U_NOTEIT}</textarea>         <input>     </form>      </td>   </tr>##-----[ OPEN ]------------------------------------------#admin/index.php  ##-----[ FIND ]------------------------------------------#}elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ){##-----[ AFTER ADD ]------------------------------------------#// Begin of Note It          if(isset($_POST['post'])){               $tnote = addslashes($_POST['noteme']);         $query = mysql_query("UPDATE note SET text = '" . addslashes($_POST['noteme']) . "' WHERE id = 1");     }           $sql = mysql_query("SELECT text FROM note");         if(!$sql) { echo mysql_error(); };         $note = mysql_fetch_array($sql);// End of Note It##-----[ FIND ]------------------------------------------#         "L_GZIP_COMPRESSION" => $lang['Gzip_compression'],##-----[ AFTER ADD ]------------------------------------------#                 "U_NOTEIT" => $note['text']##-----[ SEARCH ]---------------------------------------------#$template->pparse("body");       include('./page_footer_admin.'.$phpEx);  }else{     //     // Generate frameset  ##-----[ BEFORE ADD ]------------------------------------------#// Thanks again for the developpers of this MOD// Begin Add On by Nellsy for the Notes           $template->assign_vars(array(                 "U_NOTEPAD" => stripslashes($note['text']))         );  // End Add On by Nellsy for the Notes####-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM


Thanks in advance

SLY

Re: Question: How do I change it from note to phpbb_note

PostPosted: Wed Jun 28, 2006 2:47 am
Author: found it
Hi

Change in the install text the sql statement so it reads like this


Code: Select all
CREATE TABLE phpBB_note (id int(8) not null,text text);  INSERT INTO phpBB_note (id,text) VALUES('1','Text');


And then you can drop the table note using phpmyadmin

Also you need to change this to this in admin/index.php

find

Code: Select all
// Begin of Note It         if(isset($_POST['post'])){            $tnote = addslashes($_POST['noteme']);       $query = mysql_query("UPDATE note SET text = '" . addslashes($_POST['noteme']) . "' WHERE id = 1");    }           $sql = mysql_query("SELECT text FROM note");         if(!$sql) { echo mysql_error(); };         $note = mysql_fetch_array($sql);// End of Note It


to this

Code: Select all
// Begin of Note It         if(isset($_POST['post'])){            $tnote = addslashes($_POST['noteme']);       $query = mysql_query("UPDATE note SET text = '" . addslashes($_POST['noteme']) . "' WHERE id = 1");    }           $sql = mysql_query("SELECT text FROM phpBB_note");         if(!$sql) { echo mysql_error(); };         $note = mysql_fetch_array($sql);// End of Note It


let me know

:mrgreen:

Re: Question: How do I change it from note to phpbb_note

PostPosted: Wed Jun 28, 2006 3:29 am
Author: SLY LS1
Ok did that but its not working, must be something else to change as well?

any ideas

Re: Question: How do I change it from note to phpbb_note

PostPosted: Wed Jun 28, 2006 4:02 am
Author: found it
sorry my bad it should be phpbb not phpBB so you need to change all the phpBB to phpbb :mrgreen: <img>

MOD: Admin Note Pad

PostPosted: Wed Jun 28, 2006 4:45 am
Author: SLY LS1
"found it";p="10391" wrote:sorry my bad it should be phpbb not phpBB so you need to change all the phpBB to phpbb <img>


Yep thats ok, i knew that much and the sql satement bit, just couldnt work out the other 2 changes, its all working again now with the correct table name.

Heres the correct complete mod if anyone wants to use it.

Code: Select all
############################################################## ## MOD Title]http://www.phpbb.com/mods/[/url] for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] ############################################################## ## Author Notes: You must have MySQL ############################################################## ## MOD History: Add on that add the stripslashes in the reading table ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ SQL ]------------------------------------------ #  CREATE TABLE phpbb_note ( id int(8) not null, text text);  INSERT INTO phpbb_note (id,text) VALUES ('1','Text');  # # #-----[ OPEN ]------------------------------------------ # templates/subSilver/admin/index_body.tpl # #-----[ FIND ]------------------------------------------ # </table> <br> # #-----[ BEFORE ADD ]------------------------------------------ # </table> <h1>NOTE IT!</h1> <table>   <tr>    <td>         <form>       <textarea>{U_NOTEIT}</textarea>       <input>    </form>      </td>   </tr> # #-----[ OPEN ]------------------------------------------ # admin/index.php  # #-----[ FIND ]------------------------------------------ # } elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) { # #-----[ AFTER ADD ]------------------------------------------ # // Begin of Note It         if(isset($_POST['post'])){            $tnote = addslashes($_POST['noteme']);       $query = mysql_query("UPDATE phpbb_note SET text = '" . addslashes($_POST['noteme']) . "' WHERE id = 1");    }           $sql = mysql_query("SELECT text FROM phpbb_note");         if(!$sql) { echo mysql_error(); };         $note = mysql_fetch_array($sql); // End of Note It # #-----[ FIND ]------------------------------------------ #       "L_GZIP_COMPRESSION" => $lang['Gzip_compression'], # #-----[ AFTER ADD ]------------------------------------------ #                 "U_NOTEIT" => $note['text'] # #-----[ SEARCH ]--------------------------------------------- # $template->pparse("body");      include('./page_footer_admin.'.$phpEx);  } else {    //    // Generate frameset  # #-----[ BEFORE ADD ]------------------------------------------ # // Thanks again for the developpers of this MOD // Begin Add On by Nellsy for the Notes           $template->assign_vars(array(                 "U_NOTEPAD" => stripslashes($note['text']))         );  // End Add On by Nellsy for the Notes # # # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM

Re: MOD: Admin Note Pad

PostPosted: Wed Jun 28, 2006 8:23 am
Author: Threat009
what is the purpose of this mod <img>

PostPosted: Wed Jun 28, 2006 9:05 am
Author: ayasha
it helps make notes for yourself and other admins in the acp, can be quite helpful, or i think it can.

for example, since my memory fails at times, i have a note with what to do when the "1 new message" gets stuck for a member, i just go to my notes and follow what i have their.

Re: MOD: Admin Note Pad

PostPosted: Wed Jun 28, 2006 9:11 pm
Author: SLY LS1
"Threat009";p="10409" wrote:what is the purpose of this mod <img>


Its handy for those late night when you realy need to go to bed but havent finished something lol

Just leave yourself another admin a message on the note pad.

Its pretty handy

Re: MOD: Admin Note Pad

PostPosted: Sun Jul 02, 2006 1:19 pm
Author: a_lunatic
I installed this & all was working good but for now for some reason my admin menu is coming up as blank but the right pane is there any1 know what could be causing this <img>

PostPosted: Sun Jul 02, 2006 5:34 pm
Author: star
one of the sites thats ported to provide the update & current version info in acp when you first enter is down

more of an explanation here
http://www.integramod.com/forum/viewtopic.php?t=1434