MX_SITE_MAP beta

Begonnen von algebre, 24 August 2007, 15:43:54

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

algebre

hi
new module MX_SITE_MAP v2 beta test
you can see it here : http://www.geologie.22web.net/modules.php?name=Site_Map



you can see v1 here: http://www.demo-pragmamx.22web.net/modules.php?name=Site_Map

algebre


Manuel

Hello algebre,

seems really good :)

I will test it for my page and then you will get a feedback.

greetings, Manu
Mein pragmaMx -> Berufswahl-Online.de

algebre

hi
some improvements,
work well with firefox, two small problem with IE and no idea with opera, netscape & safari


algebre

#4
now the problem with ie is solved


this is the new index.php

<?php 
/**
 * pragmaMx  Content Management System
 * Copyright (c) 2007 pragmaMx Dev Team - http://pragmaMx.org
 *
 * 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.
 */
if (!defined("mxMainFileLoaded"))
    die(
"You can't access this file directly...");
$module_name basename(dirname(__file__));
mxGetLangfile($module_name);

$index 0;
$pagetitle _PAGETITLE;
$hidshow _HIDSHOW;
// Définition des icones du plan avec la fonction mxCreateImage de PragmaMx ;-)
define('MX_ML_IMAGEPATH''modules/' $module_name '/images/');
define('IMG_FOLDER'mxCreateImage(MX_ML_IMAGEPATH 'sarrow.gif'_ACTIVMOD));
define('IMG_LIST'mxCreateImage(MX_ML_IMAGEPATH 'tree-T.gif''Liste'));
define('IMG_FOLDERPLUS'mxCreateImage(MX_ML_IMAGEPATH 'oarrow.gif',
    
'Catégories'));
define('IMG_FOLDERNEW'mxCreateImage(MX_ML_IMAGEPATH 'rarrow.gif',
    
'Sous-catégories'));
define('IMG_GO'mxCreateImage(MX_ML_IMAGEPATH 'bullet_go.png''Messages'));
define('IMG_LINE'mxCreateImage(MX_ML_IMAGEPATH 'ligne.gif',
    
'Get Screen Name'));
define('IMG_HOME'mxCreateImage(MX_ML_IMAGEPATH 'inhome.gif'_HOME));
define('IMG_CAT'mxCreateImage(MX_ML_IMAGEPATH 'fleche.gif'_HOME));
$descending MX_ML_IMAGEPATH "descending.gif";
include_once (
"includes/mxNewsFunctions.php");
global 
$prefix$currentlang$bgcolor2$bgcolor3$bgcolor4;
$cmi 0;
echo 
'<a name="Haut"></a>';
include (
'header.php');
echo 
'<script type="text/javascript" language="JavaScript" src="modules/Site_Map/script.js"></script>';
openTable();
echo 
'<div align="center"><img src="images/logo.gif"></div><br>';
echo 
'<table width="100%">';
echo 
'<tr><td>' IMG_HOME '<a href="index.php" title="' _HOME '"> ' .
    
_HOME '</a></td></tr></table>';
/**
 * RSS FEED
 */
if (empty($backend_active))
{
    
$rssfeed = array("smf" => """downs" => """story" => """link" => "");
}
else
{
    
$rssfeed = array("smf" =>
        
'<td width="5%"><div align="center"><a href=modules.php?name=Forum&type=rss;action=.xml title=""><img src="modules/Site_Map/images/rss.jpg" alt="Abonner vous a ce flux" title="Abonner vous a ce flux"><a></div></td>',
        
"downs" => '<td width="5%"align="right"><a href=backend.php?op=downs title=""><img src="modules/Site_Map/images/rss.jpg" alt="Abonner vous a ce flux" title="Abonner vous a ce flux"></td>',
        
"story" => '<td width=\"5%\"align=\"right\"><a href=backend.php?op=news title=\"\"><img src=\"modules/Site_Map/images/rss.jpg\" alt=\"Abonner vous a ce flux\" title=\"Abonner vous a ce flux\"></td>',
        
"link" => '<td width="5%"align="right"><a href=backend.php?op=link title=""><img src="modules/Site_Map/images/rss.jpg" alt="Abonner vous a ce flux" title="Abonner vous a ce flux"><a></td>');
}
/**
 * Language
 */
if ($GLOBALS['multilingual'] == '1')
{
    
$handle = @opendir('language');
    if (!
$handle)
        return;
    while (
$file readdir($handle))
    {
        if (
preg_match("/^lang\-(.+)\.php/"$file$matches))
        {
            
$linklist[$matches[1]] = ucwords(str_replace("_"" "str_replace('german',
                
'deutsch'$matches[1])));
        }
    }
    
closedir($handle);
    
ksort($linklist);
    
$to basename($_SERVER['PHP_SELF']);
    if (
$to == 'modules.php' && empty($_GET['name']))
    {
        
$to 'index.php';
    }
    if (!empty(
$_GET['name']))
    {
        
$args[] = "name={$_GET['name']}";
    }
    foreach (
$_GET as $key => $value)
    {
        if (
$key != 'newlang' && $key != 'name')
        {
            
$args[] = "{$key}={$value}";
        }
    }
    if (isset(
$args))
    {
        
$to .= '?' implode('&amp;'$args) . '&amp;newlang=';
    }
    else
    {
        
$to .= '?newlang=';
    }
    echo 
"<table width=\"100%\"><tr bgcolor=$bgcolor2><td width=\"100%\" onclick=\"show_section('section{lang}')\"><span style=\"cursor:pointer\"><img src=\"$descending\" border=\"1\" width=\"9\" height=\"9\" alt=\"\" title=\"$hidshow\"> " .
        
_SITEMAPHEADER "</span></td></tr></table>";
    echo 
"<table $bgcolor3 id=\"section{lang}\">";
    foreach (
$linklist as $langu => $alt)
    {
        
$sel = ($langu == $GLOBALS['currentlang']) ? "selected":"";
        echo 
"  <tr><td><img src=\"images/language/flag-$langu.png\" align=\"middle\" alt=\"$langu\"> <a href={$to}$langu >$alt</a></td></tr>";
    }
    echo 
"</table>";
}
$result2 sql_query("SELECT title, custom_title FROM " $prefix .
    
"_modules WHERE active=1 AND main_id<>'hided' AND title<>'" $module_name .
    
"' ORDER BY custom_title");
while (
$row2 sql_fetch_array($result2))
{
    
$link $row2['title'];
    
$titolomodulo stripslashes($row2['custom_title']);
    
//*******************************
    
if (mxModuleAllowed($link))
    {
        
$modtitle $titolomodulo;
        
/**
         * Dans cette section vous devriez les noms de vos modules
         * exemple votre module téléchargements s'appel telechargements et non pas Downloads il aut mettre ( [case 'telechargements':] à la place de [case 'Downloads':])
         */
        
switch ($link)
        {
            case 
'Downloads'// section téléchargements
                
if (mxModuleAllowed("Downloads"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td>{$rssfeed['downs']}</tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_downloads();
                    echo 
"</table>";
                }
                break;
            case 
'Forum'// section Forum SMF
                
if (mxModuleAllowed("Forum"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td width="95%" onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow"></span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td>{$rssfeed['smf']}</tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_furom_smf();
                    echo 
"</table>";
                }
                break;
            case 
'eBoard'// section Forum eBoard
                
if (mxModuleAllowed("eBoard"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_furom_eBoard();
                    echo 
"</table>";
                }
                break;
            case 
'Sections'// section Sections
                
if (mxModuleAllowed("Sections"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_section();
                    echo 
"</table>";
                }
                break;
            case 
'Web_Links'// section Web_Links
                
if (mxModuleAllowed("Web_Links"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td>{$rssfeed['link']}</tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_links();
                    echo 
"</table>";
                }
                break;
            case 
'Topics'// section Topics
                
if (mxModuleAllowed("Topics"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_topics();
                    echo 
"</table>";
                }
                break;
            case 
'News'// section Topics
                
if (mxModuleAllowed("News"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td>{$rssfeed['story']}</tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_news();
                    echo 
"</table>";
                }
                break;
            case 
'Content'// section Content
                
if (mxModuleAllowed("Content"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_content2();
                    echo 
"</table>";
                }
                break;
            case 
'My_eGallery':
                if (
mxModuleAllowed("My_eGallery"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_My_eGallery();
                    echo 
"</table>";
                }
                break;
            case 
'Gallery':
                if (
mxModuleAllowed("Gallery"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_Gallery();
                    echo 
"</table>";
                }
                break;
            case 
'Search':
                if (
mxModuleAllowed("Search"))
                {
                    echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor2>
<td onclick="show_section('section
{$link}')">
<span style="cursor:pointer"><img src="
$descending" border="1" width="9" height="9" alt="" title="$hidshow">  </span>  <a href="modules.php?name=$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                    echo 
"<table $bgcolor3 id=\"section{$link}\">";
                    
map_searchform();
                    echo 
"</table>";
                }
                break;
            default:
                echo <<< EOT
<table width="100%">
<tr width="100%" bgcolor=
$bgcolor4>
<td><a href="modules.php?name=
$link" title="$modtitle" ><b>$modtitle</b></a></td></tr></table>

EOT;
                break;
        }
        
$cmi++;
    }
}
echo 
"<table>";
echo 
"<tr><td><a href='#Haut'>" _HAUT "</a></td></tr>";
echo 
"</table>";
closeTable();
include (
"footer.php"); 
?>


HanSolo

Hi Algebre,

I have a little problem with this module - here is what I did:
* copied the files to the modules-folder
* activated the module only for administrators and put it into one block
(* there is no setup-file / routine or something like that, right?)
* the link is there and when I click any language link nothing happens ...
* I got the following error:
Fatal error: Unknown function: map_news() in /home/dtsvde/public_html/modules/Site_Map/index.php on line 229

what did I do wrong?

I use FF and the newest version of pragma ...

Thanx for any comment and hint

Oliver / HanSolo

==============================
Addition
If I use the "old" index.php everything works fine - maybe in combination with the FF the "new" index.php is not qorking quite correct now. THANKS  for the module :thumbup: .. will there be the possibility to change the entries or delete some entries in the future?
Lieben Gruß

Oliver / HanSolo