Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Feb 19, 2008 3:30 pm Reply with quote

Thanks for the update, looking forward to it Smile
 
View user's profile Send private message Send e-mail
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Feb 24, 2008 12:31 pm Reply with quote

I've got 89 members on my map now, its a lot of fun. I've been tweaking it and am close to releasing it.

Sentinel has really gone to town on this one though. Members enter messages with parenthesis or quotes and get blocked. Sad This might be because I am using AJAX with the GET method. If I change it to POST would this be less likely to happen?

Secondary question. Should I setup another SourceForge page for this? Sourceforge worked pretty well for me for GCalendar, but I'm not sure if people liked signing up there to leave feedback. Or I could setup my own development site to host both. Or I could give the file to Raven or one of you guys to host.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
Guardian2003







PostPosted: Sun Feb 24, 2008 2:17 pm Reply with quote

Wow you have really worked overtime to get this as far as you have so quickly.

I'm not sure on GET/POST problem, one of the others is probably better qualified to answer that one.

Now you have your new server I'd go for your own dev site, let it flex those new found muscles lol
 
Gremmie







PostPosted: Sun Feb 24, 2008 2:55 pm Reply with quote

Aaargh, my spirit is totally crushed now.

My javascript works perfectly on Opera and Firefox, but is broken on IE7. I can work around all but one problem.

I did some initial testing regarding GET vs POST, and unless I did it wrong, Sentinel let some things by when I used POST.

However this IE problem is killing me. WHAT A PIECE OF GARBAGE!!!
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sun Feb 24, 2008 3:00 pm Reply with quote

Lots of projects use SourceForge for hosting SVN and their own sites for support. Just change the home page for the project, and remove the forums or post a message indicating that the home page should be used for support.

As for GET vs. POST - not sure. Why not test a change?

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Gremmie







PostPosted: Sun Feb 24, 2008 3:03 pm Reply with quote

kguske, good idea about using both sourceforge and a site.

As for GET vs POST, I think POST doesn't trip Sentinel up.

I'm so mad at Microsoft. Let's just disregard web standards. Their select DOM's add() function is not coded to spec. Now I have to work around that somehow, or just forget it.
 
Gremmie







PostPosted: Sun Feb 24, 2008 3:59 pm Reply with quote

Well I think I worked around it. It was ugly but it needed to be done. Smile

So I switched the AJAX method over to POST. I'll see how many Sentinel abuse reports I get now.
 
Gremmie







PostPosted: Mon Feb 25, 2008 5:59 pm Reply with quote

I just got approval on SourceForge for a new project page! Smile

I'm not happy with my Javascript code though, and after reviewing some OO tutorials today I think I'll refactor it.

So why would Sentinel apply different security measures to GET vs POST?
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Feb 26, 2008 7:53 am Reply with quote

Gremmie wrote:
So why would Sentinel apply different security measures to GET vs POST?


Hey, don't get fkelly started... lol.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Thu Feb 28, 2008 9:24 pm Reply with quote

Here it is, version 1.0.0....go easy on me... Smile

http://sourceforge.net/projects/membermapnuke/

You need:
PHP5
A google maps API key, which you can obtain here:
http://www.google.com/apis/maps/signup.html

I've got 99 users on my map, it's a big hit. I hope people enjoy it.

I'll submit a news item for this a bit later.
 
montego







PostPosted: Fri Feb 29, 2008 6:28 am Reply with quote

YOU ROCK MAN! Yes, I AM SHOUTING!
 
Guardian2003







PostPosted: Fri Feb 29, 2008 5:21 pm Reply with quote

I'm feeling a LITTLE inadequate now so I think I'll have to knock up an 'RN Team Weather' module over the weekend lol
 
montego







PostPosted: Sat Mar 01, 2008 7:28 am Reply with quote

Would you please at least make it work with both C and F? LOL!
 
Guardian2003







PostPosted: Sat Mar 01, 2008 8:20 am Reply with quote

Calendar and Forums?
 
catweazle
Regular
Regular



Joined: Oct 14, 2006
Posts: 60
Location: Norway

PostPosted: Sat Mar 01, 2008 8:34 am Reply with quote

Hi.

The Member_Map module don't support scandinavian special characters (like eg. ÆØÅ-æøå). When these characters are used in the message field all members and pins are not shown on the map.

AØÅ-æøå is written/saved to DB as -æøå-Ãâ... Sad

By all means this is a very great module!!
.. except for the above Wink

Any solution to this?

_________________
Regards,
Catweazle. 
View user's profile Send private message
Gremmie







PostPosted: Sat Mar 01, 2008 9:45 am Reply with quote

catweazle wrote:

AØÅ-æøå is written/saved to DB as -æøå-Ãâ... Sad


Wow, I have no clue what would be causing that. My install script did not specify a collation for the message field in the _memmap_user table. Can you check it with phpMyAdmin and see what it is?

I just tried pasting AØÅ-æøå into my map, and it works. My collation is set to latin1_general_ci.


Last edited by Gremmie on Sat Mar 01, 2008 9:49 am; edited 1 time in total 
Gremmie







PostPosted: Sat Mar 01, 2008 9:48 am Reply with quote

I take that back, sort of...it was saved in the database as: AØÅ-æøå but it still is display as AØÅ-æøå on the balloon.

I'm no expert on this, but I wonder if AØÅ-æøå is the unicode version of AØÅ-æøå.
 
Gremmie







PostPosted: Sat Mar 01, 2008 10:02 am Reply with quote

Image

Image

Strange, hopefully we can figure this out!
 
catweazle







PostPosted: Sat Mar 01, 2008 11:06 am Reply with quote

I really don't see why this should happen.

I have checked allmost all tables and fields in my DB, and all other modules save these scandinavian special characters as is - they are also read back and shown just fine.

My collation is set to latin1_general_ci as well (for all text fields in DB).

So far Member_Map module is the only "part" of my site that don't handle these characters right.

.. and from what I have read so far after searching the Internet:
These weird characters is what the UTF-8 bit sequence would look like if it was mistakenly interpreted as 8bit encoded iso-8859-1.
Whatever the heck that means Embarassed
 
Gremmie







PostPosted: Sat Mar 01, 2008 11:24 am Reply with quote

I wonder if you need to change your encoding....?

In header.php you could change this line:

Code:


    echo '<?xml version="1.0" encoding="iso-8859-1"?>'."\n";


Also, have you checked your _CHARSET define in language/lang-xxx.php ?
That is spit out in includes/meta.php.

Try changing both of those to UTF-8. I'm totally guessing here. The above changes influence the following (do a view source in your browser):

Code:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>blah blah bah </title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />


As you can see, I have iso-8859-1 in two places: in the xml thingy and in the meta content attribute.
 
catweazle







PostPosted: Sat Mar 01, 2008 3:11 pm Reply with quote

Unfortunatly your suggestions didn't make the characters look right either...

They did change the characters into UTF-8 though but that itself don't help me much - as the changes occured to all content on all my pages.


I recall that some years back (on a HTML based homepage) I had this very same problem when the result submittet from a form was sent as an email. The received email had these same weird characters, and the solution to this was to decode the content from the text field...

This is the code I used (found it in a 4 year old backup! Laughing ):

Code:
$message=utf8_decode($HTTP_POST_VARS['field5']);


Just wonder if something simular to this can be used to decode the characters before they are saved to the DB?
 
Gremmie







PostPosted: Sat Mar 01, 2008 4:28 pm Reply with quote

The only thing I am doing differently than any other Nuke module is POST'ing the data through a javascript object. So let's look there. Put everything back the way you had it.

Now, find the mmap.js file and find this code:

Code:


      params += '&u=' + this.userId;
      params += '&loc=' + encodeURIComponent(address);
      params += '&lat=' + point.lat();
      params += '&lng=' + point.lng();
      params += '&m=' + encodeURIComponent(message);


Change it to this:

Code:


      params += '&u=' + this.userId;
      params += '&loc=' + address;
      params += '&lat=' + point.lat();
      params += '&lng=' + point.lng();
      params += '&m=' + message;


Before you try it, please clear your browser's cache (very important).

Let me know if that does anything.
 
Gremmie







PostPosted: Sat Mar 01, 2008 4:41 pm Reply with quote

Okay, this holds more promise. Revert back to the original mmap.js.

Find this line of code in the mmap.js file:

Code:


this.ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");


Try changing it to this:
Code:


this.ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");


And, since I don't know what I am doing, Smile, if UTF-8 doesn't work, try ISO-8859-1.

Again, clear your browser's cache each time after changing mmap.js.
 
catweazle







PostPosted: Sat Mar 01, 2008 5:08 pm Reply with quote

I have tried out all suggestions from your last two posts, but the special characters don't seem to wanna cooperate...
 
Gremmie







PostPosted: Sat Mar 01, 2008 5:40 pm Reply with quote

So they get displayed as garbage in the balloon?

I wonder what is different about your environment vs mine. What browser are you using? I'm on FireFox.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©