vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Use vBulletin Archive as Sitemap for the Forum (https://vborg.vbsupport.ru/showthread.php?t=198920)

shabbirbhimani 12-14-2008 10:00 PM

Use vBulletin Archive as Sitemap for the Forum
 
What does this product do?

It uses the existing vBulletin Archive feature to be used for Sitemap for the forum like in vbSEO / TfSEO product.

How to install?
  1. Enable the Archive Feature in
    AdminCP > vBulletin Options > Search Engine Friendly Archive

    Forum Archive Enabled <Yes>
    Display Simple View of Threads <No> ( Optional but its not good to have different page for the content )
  2. Add the following line to your .htacces file

    Code:

    RewriteRule ^sitemap(.*)$ forums/archive/index.php$1 [QSA,L]
  3. Import the product XML
  4. Change the Footer Template to point the Archive to Sitemap Location.

    Find :

    Code:

    <if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
    Replace with :
    Code:

    <if condition="$vboptions['archiveenabled']"><a href="$vboptions[homeurl]sitemap/">$vbphrase[archive]</a> -</if>
    You may need to add a trailing slash after $vboptions[homeurl] if it does not already end with /
  5. Optionally change the Phrase Archive to Sitemap

How to uninstall?
  • Remove the content of .htaccess
  • Revert the template / phrases
  • Just un-install product.

Samples

See the working example on my forum http://www.go4expert.com/

Note: I changed some bburl to homeurls and if you find something wrong in it do let me know and I would be more than happy to help.

Alfa1 12-15-2008 10:35 AM

Something is wrong: It redirects to http://www.mysite.com/index.phpsitemap/
Note that I do have vbSEO sitemap installed. i.e. htaccess does already have these rewrites:
PHP Code:

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$[L


shabbirbhimani 12-15-2008 10:42 AM

If you have vbSEO it already have this feature for you and so you don't need to use this Hack.

Alfa1 12-15-2008 10:47 AM

I dont have the vbSEO product. I only have the vbSEO Google sitemap mod(submits an xml sitemap to sitemaps.org), that is available here on vb.org.

$vboptions[homeurl] gives mysite.com/index.php
When I hardcode this so that my footer shows mysite.com/sitemap/ or to mysite.com/sitemap/index.php then I still get a blank page.

shabbirbhimani 12-15-2008 11:01 AM

in this bburl's are replaced by homeurls and so do let me know your bburls/homeurls.

if you would like that to be changed

Edit the

archive_complete plugin

With the following
Code:

$searchArray=array(
'<a href="' . $vbulletin->options['homeurl'] . '/archive/index.php">' . $vbulletin->options['bbtitle'] . '</a>',
$vbulletin->options['homeurl'] . '/archive/index.php',
"<a href=\"" . $vbulletin->options['home'] . '/' . $vbulletin->options['forumhome'] . '.php">' . $vbulletin->options['bbtitle'] . "</a>"
);

$replaceArray=array(
'<a href="' . $vbulletin->options['bburl'] . 'sitemap/">' . $vbulletin->options['bbtitle'] . ' Sitemap</a>',
$vbulletin->options['bburl'] . 'sitemap',
"<a href=\"" . $vbulletin->options['bburl'] . '">' . $vbulletin->options['hometitle'] . "</a>"
);
$output = str_replace($searchArray, $replaceArray,$output);


abdobasha2004 12-15-2008 11:21 AM

is this better or vbseo sitemap generator?

shabbirbhimani 12-15-2008 11:43 AM

Quote:

Originally Posted by abdobasha2004 (Post 1685809)
is this better or vbseo sitemap generator?

vbseo sitemap generator generates only xml file for robots to be submitted but this one has the sitemap on your forum for users / bots to browse it.

abdobasha2004 12-15-2008 02:21 PM

Server not found


Firefox can't find the server at 100fm6.comsitemap.

shabbirbhimani 12-16-2008 01:48 AM

Quote:

Originally Posted by abdobasha2004 (Post 1685905)
Server not found


Firefox can't find the server at 100fm6.comsitemap.

How do you get to that? If you can tell me more about it I can help you in this.

Stefanus 12-16-2008 08:42 PM

Quote:

Originally Posted by shabbirbhimani (Post 1686316)
How do you get to that? If you can tell me more about it I can help you in this.

Had to do the following edits to get this to link to the sitemap:

Place a "/" between: $vboptions[homeurl] and sitemap/
Code:

<if condition="$vboptions['archiveenabled']"><a href="$vboptions[homeurl]/sitemap/">$vbphrase[archive]</a> -</if>
Changed the following in the .htacces file:
Code:

RewriteRule ^sitemap(.*)$ "My Forum"/archive/index.php$1 [QSA,L]
On the Sitemap the links stil point to www.mysite.comsitemap and the threads to:
http://www.mysite.comsitemap/f-21.html
http://www.mysite.comsitemap/f-23.html

Any help on this?
Thanks

shabbirbhimani 12-17-2008 02:01 AM

You would need to edit the replaceArray

Code:

'<a href="' . $vbulletin->options['homeurl'] . 'sitemap/">' . $vbulletin->options['bbtitle'] . ' Sitemap</a>',
$vbulletin->options['homeurl'] . 'sitemap',

to
Code:

'<a href="' . $vbulletin->options['homeurl'] . '/sitemap/">' . $vbulletin->options['bbtitle'] . ' Sitemap</a>',
$vbulletin->options['homeurl'] . '/sitemap',

In the future version I would check if homeurl ends with / and then add accordingly.

Stefanus 12-17-2008 12:19 PM

Quote:

Originally Posted by shabbirbhimani (Post 1687104)
You would need to edit the replaceArray

Without the Complete Idiot's Guide to being a VB coder, the "replaceArray" does sound very strange to me and at this moment I don't have the foggiest idea of any "replaceArray".
Any help in directing me to this "replaceArray" would be appreciated :o

After some time trying to find the "archive_complete plugin " I have to admit that this bugger has eluded me completely and is still at large on my forum, any idea where this fella could be hiding?

Thanks.

shabbirbhimani 12-17-2008 12:24 PM

AdminCP > Products > plugins

Or if you want I can give you a seperate XML file or let me know your forum url and can edit it for you.

shabbirbhimani 12-17-2008 01:34 PM

Here is the updated product with the support of / in home url

Stefanus 12-24-2008 08:14 AM

Hello shabbirbhimani,

Thanks for the help but the best I could get out of this was a working sitemap with the following error:

Code:

Parse error: syntax error, unexpected ',' in /usr/www/users/wendag/forum/archive/index.php(475) : eval()'d code on line 12

shabbirbhimani 12-24-2008 10:44 AM

I downloaded the XML and imported once again and could not get that error.

Check if your archive works without the plugin?

Keesa 12-30-2008 03:25 AM

MEH! This does not work.

The requested URL /forum/forums/archive/index.php/ was not found on this server.

Why is it forcing in the subdirectory /forums/. Not all of us use that.

shabbirbhimani 12-30-2008 04:23 AM

You would need to change the .htaccess url to match your url

Code:

RewriteRule ^sitemap(.*)$ forums/archive/index.php$1 [QSA,L]

Businesss 04-10-2009 01:31 AM

I got the sitemap up at http://www.businesss-forum.com/archive/index.php but none of the links are valid.

How can I fix this so bots can read valid info?

shabbirbhimani 04-10-2009 03:19 AM

You already have a blank sitemap folder under your home directory,

http://www.businesss-forum.com/sitemap/

Remove that first and then get the .htaccess correctly setup. Remember to remove the "forums/"


All times are GMT. The time now is 04:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01272 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete