Author Topic: [MOD]HTML Sitemap  (Read 4061 times)

0 Members and 1 Guest are viewing this topic.

Offline sathishIPL

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
[MOD]HTML Sitemap
« on: March 17, 2012, 04:04:20 PM »
Hi All,

An another MOD from me, HTML Sitemap for 4images Gallery.

Installation::3 Minutes

1.Go to Yourwebsite/lang/main.php and look for ?>

And paste the below code above ?>
//-----------------------------------------------------
//--- Html Sitemap --------------------------------------
//-----------------------------------------------------

$lang['htmlsitemap_title']="Sitemap";
$lang['htmlsitemap_images']="Images Sitemap";
$lang['hrmlsitemap_cat']="Categories Sitemap";


2.Download the htmlsitemap.php and upload the file to the root directory

3.go to yourwebsite/templates/your templates/error.html and save the file as htmlsitemap.html [copy the error.html and save it as htmlsitemap.html]

3.a
find {lang_error} in htmlsitemap.html and replace with
 {lang_htmlsitemap


3.b find below code in htmlsitemap.html
<p>{error_msg}</p>
and repalce with below code
<!--HTML Sitemap -->
	
	
	
	
	
<
table border="0" width="500">
	
	
	
	
	
	
<
tr align="left">
	
	
	
	
	
	
	
<
th>{lang_htmlsitemap_images}</th>
	
	
	
	
	
	
	
<
th>{lang_htmlsitemap_cats}</th>
	
	
	
	
	
	
</
tr>
	
	
	
	

	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
<
td width=250>
	
	
	
	
	
	
	
	
	
<
table width="250">
	

	
	
	
	
	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
	
	
	
	
<
td>
	
	
	
	
	
	
	
	
	
	
	
	
	
{
htmlsitemap}
	
	
	
	
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
	
	
	
	
</
table>
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
<
td width="250" valign="top">
	
	
	
	
	
	
	
	
	
<
table BORDER="0">
	

	
	
	
	
	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
	
	
	
	
<
td width="250" >
	
	
	
	
	
	
	
	
	
	
	
	
	
{
htmlsitemap_cat}
	
	
	
	
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
	
	
	
	
</
table>
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
</
table>


NOTE: htmlsitemap is nothing but copy of your error.html

thats it and now submit the sitemap to google wemaster tool

Currently it is hitting the database twice[ images and categories ].I will try to optimize it

 

« Last Edit: March 18, 2012, 04:15:38 PM by sathishIPL »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD]HTML Sitemap
« Reply #1 on: March 17, 2012, 05:51:53 PM »
Thank you for sharing.

You do realize that error.html is being used by 4images, right? by renaming it you create problem when 4images decided display that template and not find it.

You should create a copy of it, not renaming it.


Now, about optimizing it. Since you define GET_CACHES constant, all needed information about categories is already loaded in $cat_cache array.
And finally, unless that's the plan, it will show all categories regardless of visitor's permissions...

P.S.
Would it affect google if many categories have the same name? Maybe it would be better add parent categories names to each category?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline sathishIPL

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: [MOD]HTML Sitemap
« Reply #2 on: March 18, 2012, 04:13:25 PM »
Thank you for sharing.

You do realize that error.html is being used by 4images, right? by renaming it you create problem when 4images decided display that template and not find it.

You should create a copy of it, not renaming it.




yes, i realize. I was in hurry while posting the above mod.

by missing one word ,the whole sentence meaning gone wrong . Yep i have modified.




Now, about optimizing it. Since you define GET_CACHES constant, all needed information about categories is already loaded in $cat_cache array.
And finally, unless that's the plan, it will show all categories regardless of visitor's permissions...

P.S.
Would it affect google if many categories have the same name? Maybe it would be better add parent categories names to each category?




Yea, Initially that was the plan and I have changed it later .

P.S.
Would it affect google if many categories have the same name? Maybe it would be better add parent categories names to each category?



I dont think ,but i am not sure ...Yes, if anchor text is same.It might  be .
Will work out for this.

Thanks for poiting out and please feel free to change the above mod if you found any thing wrong.

:-) Have a nice day.