News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Sitemap

Started by SlammedDime, May 12, 2007, 05:43:04 PM

Previous topic - Next topic

SlammedDime

Replace
', theme_copyright(), '
With
', theme_copyright(), '<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"> | <a href="'.$scripturl.'?action=sitemap">', $txt['sitemap'], '</a></span>
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

gordonjr

#741
It worked. Thanks for the help.

hartiberlin

I got it to work on SMF 2.0B4,
but now SMF 2.0 RC1 is out.

Does the Sitemap MOD need a change now ?
Will the SMF 2.0B4 Mod version also work with
SMF 2.0 RC1  ?

Many thanks.

SlammedDime

If you got it working on 2.0b4, yes, it will work on rc1, however I'm in the process of rewriting the template after adding more features, so a true RC1 release is not far off. :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

sAce

Quotein admin
XML Parsing Error: junk after document element
Location: http://forum.soumik-ace.com/index.php?action=sitemap;xml
Line Number 1791, Column 10:</urlset><script type="text/javascript">

this in regular
This page contains the following errors:

error on line 1791 at column 10: Extra content at the end of the document
Below is a rendering of the page up to the first error.

hey i get this error when i click the xml link

can any one help me solve this,
my forum url is in my sig,



SlammedDime

Get rid of the javascript in the footer of your website and relocate it to the proper place, in index.template.php, before </body>
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

Version 2.0.0 has been released and is available for download...

It is a complete rewrite of the mod to use more of SMF 2.0's native functions and also optimizes the database queries a bit.

To upgrade, uninstall any previous version then install this one.  The XML link has remained the same as to not break compatibility.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

sAce

Quote from: SlammedDime on February 07, 2009, 10:14:06 AM
Get rid of the javascript in the footer of your website and relocate it to the proper place, in index.template.php, before </body>

thank you bro, it was my analytics code which was creating probs,
i fixed it like u said, its working now

but there is one more issue

i use FF3 , its workinging fine wid ff, and ie6, but xml is giving odd out put in chrome
can u pllzz take a look

SlammedDime

It doesn't really matter how it looks in the browser, as long as the XML output is correct, which it is.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

MultiformeIngegno

Quote from: SlammedDime on February 07, 2009, 06:31:17 PM
Version 2.0.0 has been released and is available for download...

It is a complete rewrite of the mod to use more of SMF 2.0's native functions and also optimizes the database queries a bit.
YOU ROCK!!
Really thanks!! ;)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

zerog12avity

#750
I'm not clear on how to install. Which folder would I upload the GZ file too? I'm running 2.0B4   

Smoky "Rider" Blue

go to

admin>packages

then upload it from there..

it will install to the default  ;)
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

zerog12avity

#752
I tried that first... but got this
An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted.

Also tried, adding a folder "sitemap" in the package directory and then uploaded the file directly. As suggested below:

An Error Has Occurred!
Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF.

weisus

SlammedDime,
I added your mod to my site and it installed perfectly, thank you. I do have a question though; I already had a map for my site submitted to google, so for better or worse, I just added my main site info to the forum xml, deleted my old map and resubmitted the new one. Can you think of any issues that this may cause? At the moment google is saying that my status is ok.

Smoky "Rider" Blue

only one i can see, depending on how the one for the front was created and what it lists, you may have links either missing or merging.. you might want to double check on it..

personally, i have 2 sitemaps on mine, with no ill effects  ;)
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

weisus

Thanks for the reply SmokyBlue, now I have a different problem though. At first I wasn't able to auto install the mod; received a fail on index.php. So I installed a previous index file and everything seemed happy, until...
I noticed that the sitemap was viewable to guests and then I noticed that the saved index.php that I installed was for version 1.1.5, so I reinstalled a fresh 1.1.8 and now, when I click on the sitemap link, it just refreshes my page with the sitemap link in the address. It would seem that my ambition, far outreaches my skill at this point.

Smoky "Rider" Blue

not sure how many mods you have on your site, but if you go to where you downloaded the site map, it will have the edits you need to make on all files.. then make sure you have done the same to the custom theme you want to use as well.. ;)

you will need that index.php if you have other installed mods or your site might be subject to more issues.. if you need more help, you might want to replace all smf files with a large update and start again..  :P
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

weisus

#757
Thanks again, I did just reinstall 1.1.8 again and then re-downloaded the sitemap mod and it again said fail on index.php, I'm no programmer, but for the life of me I don't see a problem with the file. If you or someone else doesn't mind looking, here is the file:
<?php
/**********************************************************************************
* index.php                                                                       *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel ([email protected])                    *
* =============================================================================== *
* Software Version:           SMF 1.1.8                                           *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/


/*        This, as you have probably guessed, is the crux on which SMF functions.
       Everything should start here, so all the setup and security is done
       properly.  The most interesting part of this file is the action array in
       the smf_main() function.  It is formatted as so:

               'action-in-url' => array('Source-File.php', 'FunctionToCall'),

       Then, you can access the FunctionToCall() function from Source-File.php
       with the URL index.php?action=action-in-url.  Relatively simple, no?
*/

$forum_version = 'SMF 1.1.8';

// Get everything started up...
define('SMF', 1);
@
set_magic_quotes_runtime(0);
error_reporting(E_ALL);
$time_start = microtime();

// Make sure some things simply do not exist.
foreach (array('db_character_set') as $variable)
       if (isset(
$GLOBALS[$variable]))
               unset(
$GLOBALS[$variable]);

// Load the settings...
require_once(dirname(__FILE__) . '/Settings.php');

// And important includes.
require_once($sourcedir . '/QueryString.php');
require_once(
$sourcedir . '/Subs.php');
require_once(
$sourcedir . '/Errors.php');
require_once(
$sourcedir . '/Load.php');
require_once(
$sourcedir . '/Security.php');


// Using an old version of PHP?
if (@version_compare(PHP_VERSION, '4.2.3') != 1)
       require_once(
$sourcedir . '/Subs-Compat.php');

// If $maintenance is set specifically to 2, then we're upgrading or something.
if (!empty($maintenance) && $maintenance == 2)
       
db_fatal_error();

// Connect to the MySQL database.
if (empty($db_persist))
       
$db_connection = @mysql_connect($db_server, $db_user, $db_passwd);
else
       
$db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd);

// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
       
db_fatal_error();

// Load the settings from the settings table, and perform operations like optimizing.
reloadSettings();
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();

// Seed the random generator?
if (empty($modSettings['rand_seed']) || mt_rand(1, 250) == 69)
       
smf_seed_generator();

// Determine if this is using WAP, WAP2, or imode.  Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
       
$_REQUEST['wap2'] = 1;
elseif (isset(
$_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
       if (
strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
               
$_REQUEST['imode'] = 1;
       else
               
$_REQUEST['wap'] = 1;
}

if (!
defined('WIRELESS'))
       
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

// Some settings and headers are different for wireless protocols.
if (WIRELESS)
{
       
define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : '')));

       
// Some cellphones can't handle output compression...
       
$modSettings['enableCompressedOutput'] = '0';
       
// !!! Do we want these hard coded?
       
$modSettings['defaultMaxMessages'] = 5;
       
$modSettings['defaultMaxTopics'] = 9;

       
// Wireless protocol header.
       
if (WIRELESS_PROTOCOL == 'wap')
               
header('Content-Type: text/vnd.wap.wml');
}

// Check if compressed output is enabled, supported, and not already being done.
if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0)
{
       
// If zlib is being used, turn off output compression.
       
if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1)
               
$modSettings['enableCompressedOutput'] = '0';
       else
               
ob_start('ob_gzhandler');
}
// This makes it so headers can be sent!
if (empty($modSettings['enableCompressedOutput']))
       
ob_start();

// Register an error handler.
set_error_handler('error_handler');

// Start the session. (assuming it hasn't already been.)
loadSession();

// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());

// Call obExit specially; we're coming from the main area ;).
obExit(null, null, true);

// The main controlling function.
function smf_main()
{
       global
$modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir;

       
// Special case: session keep-alive.
       
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
               die;

       
// Load the user's cookie (or set as guest) and load their settings.
       
loadUserSettings();

       
// Load the current board's information.
       
loadBoard();

       
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
       
loadTheme();

       
// Check if the user should be disallowed access.
       
is_not_banned();

       
// Load the current user's permissions.
       
loadPermissions();


       
// Do some logging, unless this is an attachment, avatar, theme option or XML feed.
       
if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption', '.xml')))
       {
               
// Log this user as online.
               
writeLog();

               
// Track forum statistics and hits...?
               
if (!empty($modSettings['hitStats']))
                       
trackStats(array('hits' => '+'));
       }

       
// Is the forum in maintenance mode? (doesn't apply to administrators.)
       
if (!empty($maintenance) && !allowedTo('admin_forum'))
       {
               
// You can only login.... otherwise, you're getting the "maintenance mode" display.
               
if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout'))
               {
                       require_once(
$sourcedir . '/LogInOut.php');
                       return
$_REQUEST['action'] == 'login2' ? 'Login2' : 'Logout';
               }
               
// Don't even try it, sonny.
               
else
               {
                       require_once(
$sourcedir . '/Subs-Auth.php');
                       return
'InMaintenance';
               }
       }
       
// If guest access is off, a guest can only do one of the very few following actions.
       
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', '.xml', 'verificationcode'))))
       {
               require_once(
$sourcedir . '/Subs-Auth.php');
               return
'KickGuest';
       }
       elseif (empty(
$_REQUEST['action']))
       {
               
// Action and board are both empty... BoardIndex!
               
if (empty($board) && empty($topic))
               {
                       require_once(
$sourcedir . '/BoardIndex.php');
                       return
'BoardIndex';
               }
               
// Topic is empty, and action is empty.... MessageIndex!
               
elseif (empty($topic))
               {
                       require_once(
$sourcedir . '/MessageIndex.php');
                       return
'MessageIndex';
               }
               
// Board is not empty... topic is not empty... action is empty.. Display!
               
else
               {
                       require_once(
$sourcedir . '/Display.php');
                       return
'Display';
               }
       }

       
// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).
       
$actionArray = array(
               
'activate' => array('Register.php', 'Activate'),
               
'admin' => array('Admin.php', 'Admin'),
               
'announce' => array('Post.php', 'AnnounceTopic'),
               
'ban' => array('ManageBans.php', 'Ban'),
               
'boardrecount' => array('Admin.php', 'AdminBoardRecount'),
               
'buddy' => array('Subs-Members.php', 'BuddyListToggle'),
               
'calendar' => array('Calendar.php', 'CalendarMain'),
               
'cleanperms' => array('Admin.php', 'CleanupPermissions'),
               
'collapse' => array('Subs-Boards.php', 'CollapseCategory'),
               
'convertentities' => array('Admin.php', 'ConvertEntities'),
               
'convertutf8' => array('Admin.php', 'ConvertUtf8'),
               
'coppa' => array('Register.php', 'CoppaForm'),
               
'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'),
               
'detailedversion' => array('Admin.php', 'VersionDetail'),
               
'display' => array('Display.php', 'Display'),
               
'dlattach' => array('Display.php', 'Download'),
               
'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'),
               
'editpoll' => array('Poll.php', 'EditPoll'),
               
'editpoll2' => array('Poll.php', 'EditPoll2'),
               
'featuresettings' => array('ModSettings.php', 'ModifyFeatureSettings'),
               
'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'),
               
'findmember' => array('Subs-Auth.php', 'JSMembers'),
               
'help' => array('Help.php', 'ShowHelp'),
               
'helpadmin' => array('Help.php', 'ShowAdminHelp'),
               
'im' => array('PersonalMessage.php', 'MessageMain'),
               
'jsoption' => array('Themes.php', 'SetJavaScript'),
               
'jsmodify' => array('Post.php', 'JavaScriptModify'),
               
'lock' => array('LockTopic.php', 'LockTopic'),
               
'lockVoting' => array('Poll.php', 'LockVoting'),
               
'login' => array('LogInOut.php', 'Login'),
               
'login2' => array('LogInOut.php', 'Login2'),
               
'logout' => array('LogInOut.php', 'Logout'),
               
'maintain' => array('Admin.php', 'Maintenance'),
               
'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'),
               
'manageboards' => array('ManageBoards.php', 'ManageBoards'),
               
'managecalendar' => array('ManageCalendar.php', 'ManageCalendar'),
               
'managesearch' => array('ManageSearch.php', 'ManageSearch'),
               
'markasread' => array('Subs-Boards.php', 'MarkRead'),
               
'membergroups' => array('ManageMembergroups.php', 'ModifyMembergroups'),
               
'mergetopics' => array('SplitTopics.php', 'MergeTopics'),
               
'mlist' => array('Memberlist.php', 'Memberlist'),
               
'modifycat' => array('ManageBoards.php', 'ModifyCat'),
               
'modifykarma' => array('Karma.php', 'ModifyKarma'),
               
'modlog' => array('Modlog.php', 'ViewModlog'),
               
'movetopic' => array('MoveTopic.php', 'MoveTopic'),
               
'movetopic2' => array('MoveTopic.php', 'MoveTopic2'),
               
'news' => array('ManageNews.php', 'ManageNews'),
               
'notify' => array('Notify.php', 'Notify'),
               
'notifyboard' => array('Notify.php', 'BoardNotify'),
               
'optimizetables' => array('Admin.php', 'OptimizeTables'),
               
'packageget' => array('PackageGet.php', 'PackageGet'),
               
'packages' => array('Packages.php', 'Packages'),
               
'permissions' => array('ManagePermissions.php', 'ModifyPermissions'),
               
'pgdownload' => array('PackageGet.php', 'PackageGet'),
               
'pm' => array('PersonalMessage.php', 'MessageMain'),
               
'post' => array('Post.php', 'Post'),
               
'post2' => array('Post.php', 'Post2'),
               
'postsettings' => array('ManagePosts.php', 'ManagePostSettings'),
               
'printpage' => array('Printpage.php', 'PrintTopic'),
               
'profile' => array('Profile.php', 'ModifyProfile'),
               
'profile2' => array('Profile.php', 'ModifyProfile2'),
               
'quotefast' => array('Post.php', 'QuoteFast'),
               
'quickmod' => array('Subs-Boards.php', 'QuickModeration'),
               
'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'),
               
'recent' => array('Recent.php', 'RecentPosts'),
               
'regcenter' => array('ManageRegistration.php', 'RegCenter'),
               
'register' => array('Register.php', 'Register'),
               
'register2' => array('Register.php', 'Register2'),
               
'reminder' => array('Reminder.php', 'RemindMe'),
               
'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'),
               
'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'),
               
'removepoll' => array('Poll.php', 'RemovePoll'),
               
'repairboards' => array('RepairBoards.php', 'RepairBoards'),
               
'reporttm' => array('SendTopic.php', 'ReportToModerator'),
               
'reports' => array('Reports.php', 'ReportsMain'),
               
'requestmembers' => array('Subs-Auth.php', 'RequestMembers'),
               
'search' => array('Search.php', 'PlushSearch1'),
               
'search2' => array('Search.php', 'PlushSearch2'),
               
'sendtopic' => array('SendTopic.php', 'SendTopic'),
               
'serversettings' => array('ManageServer.php', 'ModifySettings'),
               
'serversettings2' => array('ManageServer.php', 'ModifySettings2'),
               
'smileys' => array('ManageSmileys.php', 'ManageSmileys'),
               
'smstats' => array('Stats.php', 'SMStats'),
               
'spellcheck' => array('Subs-Post.php', 'SpellCheck'),
               
'splittopics' => array('SplitTopics.php', 'SplitTopics'),
               
'stats' => array('Stats.php', 'DisplayStats'),
               
'sticky' => array('LockTopic.php', 'Sticky'),
               
'theme' => array('Themes.php', 'ThemesMain'),
               
'trackip' => array('Profile.php', 'trackIP'),
               
'about:mozilla' => array('Karma.php', 'BookOfUnknown'),
               
'about:unknown' => array('Karma.php', 'BookOfUnknown'),
               
'unread' => array('Recent.php', 'UnreadTopics'),
               
'unreadreplies' => array('Recent.php', 'UnreadTopics'),
               
'viewErrorLog' => array('ManageErrors.php', 'ViewErrorLog'),
               
'viewmembers' => array('ManageMembers.php', 'ViewMembers'),
               
'viewprofile' => array('Profile.php', 'ModifyProfile'),
               
'verificationcode' => array('Register.php', 'VerificationCode'),
               
'vote' => array('Poll.php', 'Vote'),
               
'viewquery' => array('ViewQuery.php', 'ViewQuery'),
               
'who' => array('Who.php', 'Who'),
               
'.xml' => array('News.php', 'ShowXmlFeed'),
       );

       
// Get the function and file to include - if it's not there, do the board index.
       
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
       {
               
// Catch the action with the theme?
               
if (!empty($settings['catch_action']))
               {
                       require_once(
$sourcedir . '/Themes.php');
                       return
'WrapAction';
               }

               
// Fall through to the board index then...
               
require_once($sourcedir . '/BoardIndex.php');
               return
'BoardIndex';
       }

       
// Otherwise, it was set - so let's go to that action.
       
require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]);
       return
$actionArray[$_REQUEST['action']][1];
}

?>

Smoky "Rider" Blue

perhaps in the morning, im code challenged currently and wont do you or me a bit of good..

maybe slammeddime will be around soon to help you out..  ;)
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

weisus

No problem SmokyBlue, I appreciate you helping me as much as you did-at least I have narrowed it down some, goodnight and thank you.

Advertisement: