4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Plugins => Topic started by: uksoreeyes on June 08, 2003, 06:53:32 AM

Title: [Plugin] Notepad in Control Panel
Post by: uksoreeyes on June 08, 2003, 06:53:32 AM
A simple notepad for your admin control panel. Use it to write yourself reminders or maybe the names of users who you are keeping an eye on. Notes are stored on your MYSQL database so they are always to hand.

--------------------------------------------------------------------
Installation:

- Run MYSQL query
Quote
CREATE TABLE admin_notes (
  notes text NOT NULL,
  width char(3) NOT NULL default '',
  height char(3) NOT NULL default '',
  FULLTEXT KEY notes (notes)
) TYPE=MyISAM;

INSERT INTO admin_notes VALUES ('Your notes', '100', '10');
- Create a new directory called plugins in your admin folder
- Extract the zip and copy the file notepad.php to the new plugins directory
- Log in to your Control Panel, a new link should appear in the left navigation frame
- Click it to view your notepad

--------------------------------------------------------------------

I hope everyone finds this mod useful.

Carl
Title: Re: [Plugin] Notepad in Control Panel
Post by: jackie911 on June 09, 2003, 01:09:17 PM
Can I add to backup list ??

 :lol:
Title: [Plugin] Notepad in Control Panel
Post by: Darken on June 10, 2003, 01:34:25 PM
thanx 8)
Title: It work...
Post by: Sheep707 on June 11, 2003, 09:58:35 PM
Thx it work.....

....but i have no use at time....
Title: Re: [Plugin] Notepad in Control Panel
Post by: Schwarz Liesi on April 22, 2005, 02:36:50 PM
Also ich finde das schon brauchbar!

Ich schreib mir Kleinigkeiten bzw. TODO's hinein.

Auch schreibe ich mir hinein, welche MOD's ich mir installiert habe. Einfach damit ich den Überblick behalte.


Danke /THX for this nixy MOD!  :lol:
Title: Re: [Plugin] Notepad in Control Panel
Post by: gustav on May 21, 2005, 09:53:03 AM
Well, I get an error when trying to execute the SQL... please help...
Code: [Select]
Failed to execute SQL : SQL CREATE TABLE admin_notes
( notes text NOT NULL, width char(3) NOT NULL default '',
height char(3) NOT NULL default '', FULLTEXT KEY notes (notes) )
TYPE=MyISAM; INSERT INTO admin_notes VALUES
('Your notes', '100', '10'); failed : You have an error in your SQL
syntax near '; INSERT INTO admin_notes VALUES ('Your notes', '100', '10')'
at line 1
And when doing it manually, mysql tells me that "notes" can not have a default value.
So, it is not possible to insert the data as needed...
Title: Re: [Plugin] Notepad in Control Panel
Post by: hien on May 22, 2005, 05:34:42 PM
maybe you should try, insert table first then insert data.

that's what i have to do
Title: Re: [Plugin] Notepad in Control Panel
Post by: graficalicus on May 23, 2005, 03:52:44 PM
no problems installing/using this MOD - thx!

[BTW - I use it to keep notes to myself of things that need doing every time I run an image challenge - stuff like which files to update, which images to move, what templates to change.
I also use it to keep general notes about MODs I want to try, what things i need to change, snippets of code I want to keep, some IPs and/or users to watch, etc. -
Very handy, since I forget things a lot!]

Title: Re: [Plugin] Notepad in Control Panel
Post by: Bear on October 12, 2005, 03:23:07 PM
Worked a treat after changing route path.

using as i have 2 admin on board.
Thank you
   
Title: Re: [Plugin] Notepad in Control Panel
Post by: Bear on October 22, 2005, 10:55:31 PM
Sorted by removing white space between these 2 rows
Code: [Select]
<?php // PLUGIN_TITLE: Notepad

$nozip 1;

to
Code: [Select]
<?php // PLUGIN_TITLE: Notepad
$nozip 1;

Working great now
thanks again
Title: Re: [Plugin] Notepad in Control Panel
Post by: oswald on December 08, 2005, 02:56:46 PM
I just installed the notepad.. works fine so far, But saving results in this error:

Code: [Select]
DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax near ' height=' at line 1

The refering action in the code looks like this:
Code: [Select]
$action = $_GET["action"];
if ($action == "update") {
global $site_db;
$sql = "UPDATE admin_notes SET notes='$notes', width=$width, height=$height";
$result = $site_db->query($sql);
printf ("Notepad Updated<br>");
}
Title: Re: [Plugin] Notepad in Control Panel
Post by: V@no on December 08, 2005, 03:04:15 PM
This plugin does not seems to work on servers with registry_globals turned off...:(
Title: Re: [Plugin] Notepad in Control Panel
Post by: oswald on December 08, 2005, 04:21:49 PM
Turning register_globals on didn't help either....
Title: Re: [Plugin] Notepad in Control Panel
Post by: Bear on December 08, 2005, 11:53:45 PM
I just installed the notepad.. works fine so far, But saving results in this error:

Code: [Select]
DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax near ' height=' at line 1

The refering action in the code looks like this:
Code: [Select]
$action = $_GET["action"];
if ($action == "update") {
global $site_db;
$sql = "UPDATE admin_notes SET notes='$notes', width=$width, height=$height";
$result = $site_db->query($sql);
printf ("Notepad Updated<br>");
}

That was the error i got untill i did the correction i posted, worked fine after that.
Title: Re: [Plugin] Notepad in Control Panel
Post by: oswald on December 09, 2005, 11:32:20 PM
no, didn't help either. :(
Can you maybe attach your notpad.php as a zip to this thread?
Title: Re: [Plugin] Notepad in Control Panel
Post by: Bear on December 10, 2005, 12:54:29 AM
try this works for me
Title: Re: [Plugin] Notepad in Control Panel
Post by: oswald on December 11, 2005, 12:25:49 PM
Nop... not working. Guess I have to remove it from the plugins again. :(
Title: Re: [Plugin] Notepad in Control Panel
Post by: m.a on February 07, 2007, 12:36:01 AM
I just installed the notepad.. works fine so far, But saving results in this error:

Code: [Select]
DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax near ' height=' at line 1


Hi,
i have the same problem too!

DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' height=' at line 1
Notepad Updated


my 4images version is 1.7.4!
 Best Regards
m.a
Title: Re: [Plugin] Notepad in Control Panel
Post by: FunnyUser on February 07, 2007, 02:34:08 PM
I've just installed it and it works perfectly fine!

Its even great to leave a message for another admin...

Thanx a lot!
Title: Re: [Plugin] Notepad in Control Panel
Post by: m.a on February 07, 2007, 04:13:55 PM
I've just installed it and it works perfectly fine!

Its even great to leave a message for another admin...

Thanx a lot!

Hi FunnyUser,
is your 4images version 1.7.4?

m.a
Title: Re: [Plugin] Notepad in Control Panel
Post by: FunnyUser on February 07, 2007, 08:52:19 PM
Quote
Hi FunnyUser,
is your 4images version 1.7.4?

Sorry I forgot to post that: Yes, I'm using Version: 1.7.4 too.


enjoy yourself!
Title: Re: [Plugin] Notepad in Control Panel
Post by: Foto-Portal on February 12, 2007, 12:47:50 PM
hi,

it is not working for me too.
i use version 1.7.4

Error:

Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in ...4images/admin/plugins/notepad.php on line 7

Fatal error: require() [function.require]: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/.../usr/share/pear') in .../4images/admin/plugins/notepad.php on line 7
Title: Re: [Plugin] Notepad in Control Panel
Post by: Buggy Driver on April 05, 2007, 11:49:27 PM
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in ...4images/admin/plugins/notepad.php on line 7

Code: [Select]
$root_path = (!eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "../" : "../../";



DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax near ' height=' at line 1

Code: [Select]
if ($action == "update") {
global $site_db;

// extra code to fill the $var
$notes = $_POST["notes"];
$width = $_POST["width"];
$height = $_POST["height"];
//


$sql = "UPDATE admin_notes SET notes='$notes', width=$width, height=$height";
$result = $site_db->query($sql);
printf ("Notepad Updated<br>");
}
Title: Re: [Plugin] Notepad in Control Panel
Post by: m.a on July 11, 2007, 03:07:26 PM
perfect!
Title: Re: [Plugin] Notepad in Control Panel
Post by: DilnüvaZ on May 16, 2008, 02:39:58 PM
perfect!
Hi all
i have the same problem too!

DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' height=' at line 1
Notepad Updated


what can i do?
Title: Re: [Plugin] Notepad in Control Panel
Post by: Jan-Lukas on May 16, 2008, 08:38:20 PM
Version 1.7.4 > 1.7.6

Error, Fehler
DB Error: Bad SQL Query: UPDATE admin_notes SET notes='', width=, height=


 :flag-en: search
 :flag-de: suche
Code: [Select]
if ($action == "update") {
global $site_db;
$sql = "UPDATE admin_notes SET notes='$notes', width=$width, height=$height";
$result = $site_db->query($sql);
printf ("Notepad Updated<br>");
}

 :flag-en: replace
 :flag-de: ersetze

Code: [Select]
if ($action == "update") {
global $site_db;

// extra code to fill the $var
$notes = $_POST["notes"];
$width = $_POST["width"];
$height = $_POST["height"];
//


$sql = "UPDATE admin_notes SET notes='$notes', width=$width, height=$height";
$result = $site_db->query($sql);
printf ("Notepad Updated<br>");
}

Title: Re: [Plugin] Notepad in Control Panel
Post by: pixie_stixs on May 22, 2009, 07:50:03 AM
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in /home/pixie76/public_html/gallery/admin/plugins/notepad.php on line 7

Fatal error: require() [function.require]: Failed opening required './../admin/admin_global.php' (include_path='.:/x10hosting/php1/pear') in /home/pixie76/public_html/gallery/admin/plugins/notepad.php on line 7
Title: Re: [Plugin] Notepad in Control Panel
Post by: Marion on May 19, 2011, 12:30:29 PM
Worked very well with 4images 1.7.9 till my Webhoster changed register_globals  to off this morning. Now I get the same error as in posting above.
Too bad, I've used it very often. :(