Stefano Mtangoo 455 Senior Poster

I am recoding the javascript to make it faster. I have a few ideas I am wanting to try.

There is a bug in opera I am trying to sort out.

If I have some more time later I will make a tutorial, or have cwarn23 make one for his video tutorial series.

Are they ready Yet? I'm waiting to see them. Hope they will be downloadable for offline reading too :)

Stefano Mtangoo 455 Senior Poster

Thanks atli

Stefano Mtangoo 455 Senior Poster

will I be able still to access them in my scripts?
I want to be able to, yet no one can access them on his browser (while he is trying to hack?)

Stefano Mtangoo 455 Senior Poster

How can I protect a folder with some files from being accessed by htaccess? I'm newbie so take it with grain of salt.

Stefano Mtangoo 455 Senior Poster

How did this story ended? It was very interesting though I was not there. I hope Benett is back from exams :)

I'm doing same CMS and would like to see this topic progressing!

Stefano Mtangoo 455 Senior Poster

pygame, for simplicity as well as documentation and community

and Panda?

Stefano Mtangoo 455 Senior Poster

Hi All,
I'm curious to know what is the difference as well as recommendation for two beasts :)

Is it Panda or Pygame and why?

Stefano Mtangoo 455 Senior Poster

Tested!
It is working (FF) but a little bit delay.
Can you make it little more faster?

OFF TOPIC SUGGESTION: Make simple tutorial to make simple chat!

Stefano Mtangoo 455 Senior Poster

I you can the best way is downgrade your code to 2.5 and use gui2exe
Not so fun though

Stefano Mtangoo 455 Senior Poster

Thanks alot!

Stefano Mtangoo 455 Senior Poster

polite bump! I'm stucked guys, help me (:

Stefano Mtangoo 455 Senior Poster

I don't know but If you can mess with tasklist and subprocess module (for XP/VISTA). This is purely untested as I'm not sure if tasklist returns anything!

Stefano Mtangoo 455 Senior Poster

We used Inno setup. Well, we also had some problems with shortcuts on that program. That's why we dont allow creating a desktop shortcut in the installer. But does Nullsoft's NSIS create proper shortcuts? And can anyone tell a link, forum or tut to learn how to create a Linux installer?

Thanks, Dan08.

To me, even start menu failed.
I haven't figured out yet. I don't know much of NSIS so I will give it a try. If NSIS works for you Pse PM me!

Stefano Mtangoo 455 Senior Poster

@evstevemd
Using Ajax for chat is fine, but Comet may be better (push technology). There are quite a few Comet techniques that may help.

Ah! That is new jargon to me. I'll talk to google and see what it will say back :)

Stefano Mtangoo 455 Senior Poster

I want to setup my project folder sources to be pointing to WAMP folder and start WAMP from Aptana (Very lazy eh!) and run everything in internal browser instead of switcing to and fro btn IDE and firefox.

Also how about my question on offline installation? What I exactly need?

Stefano Mtangoo 455 Senior Poster

I want to setup my project folder sources to be pointing to WAMP folder and start WAMP from Aptana (Very lazy eh!) and run everything in internal browser instead of switcing to and fro btn IDE and firefox.

Also how about my question on offline installation? What I exactly need?

Stefano Mtangoo 455 Senior Poster

Just visited their site and they provide installers for All versions of Python.
You may need to check that :)

Stefano Mtangoo 455 Senior Poster

Just visited their site and they provide installers for All versions of Python.
You may need to check that :)

Stefano Mtangoo 455 Senior Poster

I failed to install Aptana via update manager, and now I have to go offline.
I would love to install Apatana with PHP support, but how do I do that offline? As I said, if possible, I don't want that big download (140MB or so) only to get aptana as plugin. If I can do that then my issue will be solved

If that is not possible, I want to integrate my EasyEclipse (No Aptana then) with my existing Wamp. I see it have XAMPP button, but I don't know how to integrate it!

Stefano Mtangoo 455 Senior Poster

I failed to install Aptana via update manager, and now I have to go offline.
I would love to install Apatana with PHP support, but how do I do that offline? As I said, if possible, I don't want that big download (140MB or so) only to get aptana as plugin. If I can do that then my issue will be solved

If that is not possible, I want to integrate my EasyEclipse (No Aptana then) with my existing Wamp. I see it have XAMPP button, but I don't know how to integrate it!

Stefano Mtangoo 455 Senior Poster

Thanks Jomanlk,
It seems that I must learn Ajax :)

Stefano Mtangoo 455 Senior Poster

You mean PDT+Aptana (offline) using software->install will do it?
That will be great. And Also I plan to use debugger!

If I can, I would like only to have Aptana without installing Eclipse.
I mean Just: Aptana+PDT :)

Stefano Mtangoo 455 Senior Poster

This is off topic but can you do simple tutorial on chat with PHP (No ajax for a while)? Or just point/recommend good tutorial? I wish I could help but I'm not good PHPer enough to conquer your problem

Stefano Mtangoo 455 Senior Poster

Hi All,
I have been using netbeans for long now and it is somehow good. But I saw Aptana and was attracted. But I failed to Install PHP support with its new PHP plugin (Actually it is PDT). It throws errors and Have tried to check on Easy eclipse. It is great too but I have failed to integrate it to my existing WAMP.

I'm willing to export/import all my Databases to New WAMP if necessary but only IF I know how to integrate it with PHP.
Please help me guys!

Stefano Mtangoo 455 Senior Poster

does cx_freeze support Python3.x?
I always use py2exe and doesn't support 3.x yet

Stefano Mtangoo 455 Senior Poster

Also wait a minute,
what Installer did you use? Inno or Nullsoft's NSIS?
I remember having problem with packing my software using Inno. The shortcuts didn't worked

Stefano Mtangoo 455 Senior Poster

Bravo guys!
That is nice news :)
Just a point of interest, have you considered security side?
I'm not security expert but all the time you send such critical info you should consider security of that info. Isn't that so?

Stefano Mtangoo 455 Senior Poster

Also what Data type of those variables?
If they are numeric, then Just save them as strings. Then retrieve them and use int() or float() to convert them back o numerical values

Stefano Mtangoo 455 Senior Poster

That is!
Go to the link J provided and then either install the file or --> just download .egg file and then place it in same DIR as setup.py
Then run again setup.py

Any more errors? Post back here :)

Stefano Mtangoo 455 Senior Poster

Have a good go!

self.enjoy

:)

Stefano Mtangoo 455 Senior Poster

replace fname throughout with self.fname
That is because self.fname is accessible throughout the class

try and see what happens

Stefano Mtangoo 455 Senior Poster

replace fname throughout with self.fname
That is because self.fname is accessible throughout the class

try and see what happens

Stefano Mtangoo 455 Senior Poster

If you didn't close the database
connection.commit()
db.close()
you sould be able to access it via Database.db from the second program so try substituting that for self.database and see if it works, or just use
self.database = Database.db

There you are! He is trying to call self.database which is'nt defined anywhere. This should at least work

Stefano Mtangoo 455 Senior Poster

I guess this have the second argument(connection) missing:

mysql_select_db($db_name)

try something like this:

$conn = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name, $conn);
Stefano Mtangoo 455 Senior Poster

where do you get self.database?
I cannot see it in this code either!

Stefano Mtangoo 455 Senior Poster

ckeditor ? Hmm.. Haven't tried it. Anyways, goodluck man. Cheers!

OOops! That beautiful image uploader isn't there in latest version (ckeditor) and they say until version 3.1? Very bad!

Now can anyone help me up and running on how to make image uploader?

Stefano Mtangoo 455 Senior Poster

This project can quickly become rather complex, no matter what approach you pick. If you have a choice of words to pick from, you need the know the language by heart, or at least the meaning of the word in the sentence it is used in!

I agree.
What about English to English dictionary?

Stefano Mtangoo 455 Senior Poster

I cannot read your mind but I think the line missing is :

self.database = connection.cursor()

Also I see in line 76
"self.connection.commit()" but I cannot see where self.connection is defined.

Stefano Mtangoo 455 Senior Poster

Hi Benett,
can you explain a little bit?
I have never done Java so I don't understand well what you are saying.
Can you speak Pythonic, or at least C++?

Stefano Mtangoo 455 Senior Poster

If it's going to be a huge dictionary then I would implement the database and do the whole 9 yards.

It is large comparable to Oxford's or Webster's dictionaries
So I will consider your last suggestion over dict method.

Thanks for your ideas

Stefano Mtangoo 455 Senior Poster

welcome,
Any suggestion?

Stefano Mtangoo 455 Senior Poster

hahaha!
That Junior MD is me.
I hope copying my own stuffs isn't illegal, or at least in Daniweb.
So be at peace hehehe :)

Stefano Mtangoo 455 Senior Poster

Hi all,
I plan to make a PRACTICAL dictionary and need help on just ideas.
basically you can use dict datatype for simple dictionary and use dicy->key to retrieve but does that work for larger data queried from database? Or should I implement a database of key --->value?

Any Idea from you guys?
any Idea is welcomed :)
Thanks alot

Stefano Mtangoo 455 Senior Poster

Hi All,
I need to upload image to site for my CMS. I use Ckeditor, improvement of FCKeditor. It is great editor but have no upload plugin (they say we should wait until version 3.1). There is ibrowser which have an issue with deprecated eregi() function (caused me to leave tinyMCE+iBrowser) and only today I realized that it misses that crucial function and here comes my question:

1. Is there free already plugin for that with no licence issues (like advertised ckfinder)?
2. Have anyone got working code that he is willing to share here?
3. If none of above is possible, then where can I get good tutorial for very beginner like me on the issue?
Thanks for your time!

Stefano Mtangoo 455 Senior Poster

Although this is off-topic: I have Python 2.6.3, I installed py2exe 0.6.9, and when I try to compile the program it gives some error, I can't post the error since I can't copy text from the command prompt. I did mention something about wx.core and some dll file (MSVCP90.dll). It works fine for other non-wxpython programs, but it doesn't work with this! How do I solve this?

Do you you code setup.py by yourself?
If yes, Andrea Gavana have saved you alot of pain by making front end (GUI) for py2exe. It is called GUI2exe
Get It here:
http://code.google.com/p/gui2exe/
I use it with inno setup to make setups
It is fantastic work!

If you still get errors, then open new thread. Oh by the way, Using wing IDE (101 version is free) will help you copy and paste errors. Any other decent IDE should be able to do that (even IDLE :))

Stefano Mtangoo 455 Senior Poster

Executing SQL that way isn't good. Here is a sample function that will illustrate how to do it better. It is for sqlite3 imported as sqlite. If you have problems in implementing it just post back

def createtb(self):
        query1 = "DROP TABLE IF EXISTS bible"
        query2 = """CREATE TABLE IF NOT EXISTS bible(
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "book" VARCHAR(32) NOT NULL,
  "cap" INTEGER(3) NOT NULL,
  "verse" INTEGER(3) NOT NULL,
  "line" VARCHAR(530) default NULL
)
"""
        self.cur.execute(query1)
        self.cur.execute(query2)
Stefano Mtangoo 455 Senior Poster

Executing SQL that way isn't good. Here is a sample function that will illustrate how to do it better. It is for sqlite3 imported as sqlite. If you have problems in implementing it just post back

def createtb(self):
        query1 = "DROP TABLE IF EXISTS bible"
        query2 = """CREATE TABLE IF NOT EXISTS bible(
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "book" VARCHAR(32) NOT NULL,
  "cap" INTEGER(3) NOT NULL,
  "verse" INTEGER(3) NOT NULL,
  "line" VARCHAR(530) default NULL
)
"""
        self.cur.execute(query1)
        self.cur.execute(query2)
Stefano Mtangoo 455 Senior Poster

Export the whole database using PHPMyAdmin
There is export option

Stefano Mtangoo 455 Senior Poster

changed to ckeditor which allowed me to use two different textareas
Now I will be able to get both inputs.
Also it have nice image uploader as ibrowser have some issues of deprecated eregi() function

Thanks alot for the help!

Stefano Mtangoo 455 Senior Poster

Hi All,
I have made simple CMS with PHP/MYSQL. It make use of TinyMCE as Javascript editor. I can delete as well as add the contents. But How can I load the contents from database to TinyMCE for editing and saving? Here is my PHP code to add contents using TinyMCE (No database connections population et cetera)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Edit Contents</title>
  <link type="text/css" rel="stylesheet" media="all" href="/site/site.css" />
<script type="text/javascript" src="/site/editor/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
	// General options
	mode : "textareas",
	theme : "advanced",
	plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager, ibrowser",

	// Theme options
	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage, ibrowser",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,

	// Example content CSS (should be your site CSS)
	content_css : "css/example.css",

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "js/template_list.js",
	external_link_list_url : "js/link_list.js",
	external_image_list_url : "js/image_list.js",
	media_external_list_url : "js/media_list.js",

	// Replace values for the template plugin
	template_replace_values : {
		username : "Some User",
		staffid : "991234"
	}
});
</script>
</head>
<body>
<br />

<form method="post" action="/site/insert.php">
<label for="title"><b> Article Title:</b></label><br />
<input name="heading" id="title" type="text" maxlength="150" /> 
<br />  <br />   
<div style="width:100%; height:100%; "> 
<label for="title"><b>Article Message:</b></label><br />
	<textarea name="contents" style="width:100%; height:400px; ">
	</textarea>
	<br /> 
	<INPUT type="submit" value="Save"/>

</form>
</div>
<?php
# Using SCRIPT_NAME

//$path = $_SERVER['SCRIPT_NAME'];

//echo "Path To Script Example: <a href='$path'>An Article Title</a>";

?>
</body>
</html>