1
kerkyra
Google maps WYSIWYG editor...RSS hack
  • 2007/9/26 22:37

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


Hi i'm making an rss hack for google maps so that my visitors can see any new locations added in the map along with their descriptions. The problem is that the description part is in XOOPS code so the picture of each location is not showing. Instead it shows the [img] tag and the url.

the question

How can i implement a WYSIWYG editor in the googlemaps module so that i can add html text in the description? Anybody has any ideas?

you can see the my rss feeds at http://www.mykerkyra.gr/modules/googlemaps/rss.php (its in greek though)

if any of you need this just create an rss.php file and paste the following code in, you only need to set the charset to the one you are using...

Quote:
//
// Google Maps RSS 2.0
// displays latest point location title and description via RSS 2.0 feed.
//
// Copyright (c) 2007 Kostas Ksilas - http://www.mykerkyra.gr
// based on xcgal rss hack by Mowaffak Ali - http://www.arabxoops.com
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//
//

include_once '../../mainfile.php';


$myts =& MyTextSanitizer::getInstance();
global $myts;

$charset='iso-8859-7';
$sitename = htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES);
$email = checkEmail($xoopsConfig['adminmail'],false);
$slogan = htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES);
$module = $xoopsModule->getVar('name');
$channel_link = XOOPS_URL.'/';
$channel_desc = $slogan;
$channel_lastbuild = formatTimestamp(time(), 'rss');
$channel_editor = $email;
$channel_category = $category;
$channel_generator = $module;
$channel_language = _LANGCODE;
$link = $smarty.section.displaylastpoints.index;

// How many items you want to show in RSS feed
$upperlimit = 10;

header('Content-Type:text/xml; charset='.$charset);
$title = $sitename.' - '.$module;
$channel_title = $title;
print "\n";
print "";
print "\n";
print "$channel_title\n";
print "$channel_link\n";
print "$channel_desc";
print "$channel_language\n";
print "$channel_lastbuild\n";
print "$channel_generator\n";

$table1= $xoopsDB->prefix("gmap_points");
$table2= $xoopsDB->prefix("users");

$result=$xoopsDB->query("SELECT id,map_id,lat,lon,title,html,date FROM ".$xoopsDB->prefix("gmap_points")." ORDER BY

date DESC LIMIT 0,$upperlimit");

$path = XOOPS_URL.'/modules/googlemaps/index.php?javascript:myclick(';

while (list($id,$map_id,$lat,$lon,$title,$html,$date) = mysql_fetch_row($result)) {
print "\t\n";
print "\t\t $title \n";
print "\t\t$path$id)\n";
print "\t\t$channel_editor\n";
print "\t\t$channel_lastbuild\n";
print "\t\t";
echo $myts->htmlSpecialChars("

$html

");
print "
\n";
print "\t
\n";
print "\n";
}
print "
";
print "
";


still havent finished yet so if any changes i will update the code here. Hope it helps someone...
whttp://www.guidemap.gr - Beta is out...

2
kerkyra
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/27 11:29

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


anybody?
whttp://www.guidemap.gr - Beta is out...

3
lintu
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/27 11:58

  • lintu

  • Not too shy to talk

  • Posts: 103

  • Since: 2005/9/18


kerkyra,

I am using Yahoo Maps APIs to publish a member community map on my web site. You can view that here.

During the member registration process, I am capturing their IP address and look up their longitude and Latitude which is then stored on the member's profile. A text file is then created with all the member info, which is used as the feed for the map.

The documentation on the Yahoo developer network was very helpful and it was pretty easy to implement. You can find all the Yahoo map how-to stuff here.

Hope this helps.
JigJak.com - A social Bookmarking & Blogging site.

ProjectMgr.net - Online Project Management Software

4
kerkyra
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/27 12:13

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


hi and thanks for the info! i'm using frappr for my community map, so i have no problem there! My main problem is how to change the default editor so as to show html code instead of XOOPS code (xoops code doesnt work with the rss i'm working on so the images are not showing). Thanks for the reply though! Very usefull indeed.
whttp://www.guidemap.gr - Beta is out...

5
kerkyra
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/30 20:29

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


Hi i made some more mods in the module!

I changed the first tab of the marker to show the title of the place, and to justify the content. I also removed the small magnifying glass image showing.

When submiting a new place i added a new Text area where the user can submit pictures (with XOOPS code) which then is showed in the second tab which is now titled "Images"!

Further more in the template instead of showing the names of the categories i added some code which shows a picture for each category and behaves as the previous text links. You only need to upload the image in the images folder of the module and name it as category_id_number.jpg.

also the image link for the rss is added. Just put an image named xml.gif in the images folder.

You can have a glimpse at http://www.mykerkyra.gr/modules/googlemaps/

Notice that a modification in the database is needed...

If someones needs something like that i'll be happy to upload the module on my server for downloading.
whttp://www.guidemap.gr - Beta is out...

6
Anonymous
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/30 20:50

  • Anonymous

  • Posts: 0

  • Since:


Hi kerkyra .. your site is copy of my site .. at least say thank you

Send your module and I will add WYSIWYG editors to it.


7
kerkyra
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/30 23:04

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


hey man, i never said that the design of the theme is mine!!I did made a few modifications to the theme though with the help of the community here! you can see my post here https://xoops.org/modules/newbb/viewtopic.php?topic_id=60988&forum=32&post_id=273341#forumpost273341

where i say that i use ramadan theme!

the theme i'm using right now is a mixture of ramadan and pro_violet!

where should i send the module?In email perhaps?

by the way i think your theme is one of the best out there (thats why i chose that one for my site)

and very easy even for newbies to understand the code and change it
whttp://www.guidemap.gr - Beta is out...

8
Anonymous
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/30 23:17

  • Anonymous

  • Posts: 0

  • Since:


lol kerkyra .. I'm kidding .. it's free theme.

Where I can find googlemaps module ? send URL here or via PM.

9
kerkyra
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/9/30 23:24

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


the one i modified can be found here

Google Maps 0.82 modified

the original one can be found here

Release of Google Maps 0.82

Appreciate the help! I really think using html instead of XOOPS code in the description would be much better and the rss would work even better!
whttp://www.guidemap.gr - Beta is out...

10
Anonymous
Re: Google maps WYSIWYG editor...RSS hack
  • 2007/10/1 1:13

  • Anonymous

  • Posts: 0

  • Since:


Hi Kerkyra,

This is wysiwyg hack for your modified googlemaps, just ovewrite then update googlemaps module:

http://www.arabxoops.com/uploads/googlemaps_wysiwyg_hack.zip

you need to upload xoopseditor folder to class folder.

Login

Who's Online

523 user(s) are online (379 user(s) are browsing Support Forums)


Members: 0


Guests: 523


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits