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 athttp://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:
<?php
//
// Google Maps RSS 2.0
// displays latest point location title and description via RSS 2.0 feed.
//
// Copyright (c) 2007 Kostas Ksilas - www.mykerkyra.gr
// based on xcgal rss hack by Mowaffak Ali - 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 "<?xml version=\"1.0\" encoding=\"$charset\"?>\n";
print "<rss version=\"2.0\">";
print "<channel>\n";
print "<title>$channel_title</title>\n";
print "<link>$channel_link</link>\n";
print "<description>$channel_desc</description>";
print "<language>$channel_language</language>\n";
print "<lastBuildDate>$channel_lastbuild</lastBuildDate>\n";
print "<generator>$channel_generator</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<item>\n";
print "\t\t<title> $title </title>\n";
print "\t\t<link>$path$id)</link>\n";
print "\t\t<author>$channel_editor</author>\n";
print "\t\t<pubDate>$channel_lastbuild</pubDate>\n";
print "\t\t<description>";
echo $myts->htmlSpecialChars("<p>$html </p>");
print "</description>\n";
print "\t</item>\n";
print "\n";
}
print "</channel>";
print "</rss>";
still havent finished yet so if any changes i will update the code here. Hope it helps someone...