Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-02-2005, 02:09 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mod re-write conversion...

Hi

I've been looking for a Mod-rewrite for vB 3.0.7

I've seen Danis version and the update by Keith - however, there seems to be loads of bugs in there, and it not working for many people, plus nobody seems to want to offer support on that site (or the thread starter/ admin is unwilling to update the initial thread - I even pm'd admin telling them its looking bad on them, ignoring all those requests, but no response).

Anyway I was wondering if anyone could either

A) update the latest version that Keith did as it seems the best ( if it worked!) and post it here (or there),

b) convert the one below that Craven did for phpbb - it worked excellently on my site and additionaly, it only effects guests or non logged in users (I cant see why the vB ones dont also just effect guests!!).

Also C) does anyone know of one that actually works - is well supported and if possible, only effect non logged in users?

i would be really grateful! (as Im sure squilions of others would!)

:-)

Quote:
################################################## ############
## MOD Title: phpBB static URLs mod_rewrite 1.0.0
## MOD Author: Craven de Kere (N/A) http://www.Able2Know.com
## MOD Description: This mod should be added AFTER the Able2Know.com SEO mod
## This mod makes static URLs (only for guests) for phpBB, for example topic-22234.html
## Please read the author notes BEFORE using this mod.
## Check http://www.able2know.com/forums/about15132.html
## for the latest version or to get help with this MOD
##
## MOD Version: 1.0.0
##
## Installation Level: (Advanced)
## Installation Time: 5 Minutes
## Files To Edit: page_header.php,
## Included Files: n/a
################################################## ############
## Author Notes:
## Use this mod together with the Able2Know.com SEO Mod (http://www.able2know.com/forums/about15132.html)
## Make backups and test this on a test forum if you can. This is not a typical mod.
## For an additional tutorial on preventing IP addresses from being logged see:
## http://www.able2know.com/forums/about22586.html
##
################################################## ############
## MOD History:
##
## 2004-04-10 - Version 1.0.0
## - Initial public release.
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############


#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

//
// Generate logged in/logged out status
//

#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( !$userdata['session_logged_in'] )
{
ob_start();
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/)viewforum.php\?f=([0-9]*)&amp;topicdays=([0-9]*)&amp;start=([0-9]*)'",
"'(?<!/)viewforum.php\?f=([0-9]*)&amp;mark=topics'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;watch=topic*'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;unwatch=topic*'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;highlight=*'",
"'(?<!/)viewforum.php\?f=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;view=previous'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;view=next'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;postdays=([0-9]*)&amp;postorder=([a-zA-Z]*)&amp;vote=viewresult'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;postdays=([0-9]*)&amp;postorder=([a-zA-Z]*)&amp;start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;start=([0-9]*)&amp;postdays=([0-9]*)&amp;postorder=([a-zA-Z]*)&amp;highlight=([a-zA-Z0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)'",
"'(?<!/)viewtopic.php&amp;p=([0-9]*)'",
"'(?<!/)viewtopic.php\?p=([0-9]*)'",
);
$urlout = array(
"topic-\\1-\\2-\\3.html",
"mark-forum\\1.html",
"updates-topic\\1.html",
"stop-updates-topic\\1.html",
"about\\1.html&amp;highlight=\\2",
"forum-\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"view-poll\\1-\\2-\\3.html",
"about\\1-\\2-\\3-\\4.html",
"about\\1.html",
"about\\1-\\2.html",
"about\\1.html",
"post-\\1.html",
"post-\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
}

#
#-----[ OPEN ]------------------------------------------
#

includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#

$db->sql_close();

#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( !$userdata['session_logged_in'] )
{
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;
}

#
#-----[ OPEN ]------------------------------------------
#

.htaccess

#
#-----[ ADD ]------------------------------------------
#

RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=v iewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start= $4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder= $4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]


#
#-----[ OPEN ]------------------------------------------
#

robots.txt

Disallow: forums/post-*.html$
Disallow: forums/updates-topic.html*$
Disallow: forums/stop-updates-topic.html*$
Disallow: forums/ptopic*.html$
Disallow: forums/ntopic*.html$

#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#

if (!empty($db))
{
$db->sql_close();
}

#
#-----[ AFTER, ADD ]------------------------------------------
#

if ( !$userdata['session_logged_in'] )
{
if (stristr($url, 'http://')) {
header('Location: ' . $url);
exit;
}
}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
anyone have any comments?

Do people think its a good idea or not?

What do YOU think? :-)
Reply With Quote
  #2  
Old 04-03-2005, 11:06 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #3  
Old 04-03-2005, 11:50 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Razasharp
anyone?
I put together all changes to Keith into a phpBB style mod for vB. I'm waiting for Dani to give me the OK to post. However, there are still problems with the lastest post.
Reply With Quote
  #4  
Old 04-03-2005, 11:59 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Agiacosa

Can you PM me a copy please?

Also, you might want to take a look at this: http://forum.modrewrite.com/viewtopic.php?p=2599

it's from a htaccess forum and a nice man there called Caterham has optimised the htaccess bit, I've not tested it but once I get a reliable version of the mod file I will :-)
Reply With Quote
  #5  
Old 04-05-2005, 08:10 AM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Razasharp
Thanks Agiacosa

Can you PM me a copy please?

Also, you might want to take a look at this: http://forum.modrewrite.com/viewtopic.php?p=2599

it's from a htaccess forum and a nice man there called Caterham has optimised the htaccess bit, I've not tested it but once I get a reliable version of the mod file I will :-)
I'll try it out. I've PMed you the file.
Reply With Quote
  #6  
Old 04-06-2005, 08:23 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by agiacosa
I'll try it out. I've PMed you the file.
Can someone please help out with this?

ANY MOD-REWRITE experts out there?
Reply With Quote
  #7  
Old 04-06-2005, 08:32 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes can someone please help us convert the phpbb hack I posted in post one please???? its a system that works and thas what we're after ;-)
Reply With Quote
  #8  
Old 04-08-2005, 06:59 PM
djwins djwins is offline
 
Join Date: Jan 2005
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This one worked fantastic when my site was on PHPBB
http://www.phprebel.org/weblog/p/php...e_indexer.html

demo: http://www.phpbb2.de/archive
Reply With Quote
  #9  
Old 04-09-2005, 01:11 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that is similar to the current vB archiver and Zenon's archive hack. This is totally different.

This mod changes URLs to html extensions AND adds the topic to the URL thereby increasing keyword density. Altough this hack is not fully working, Google is indexing my threads much more now and I'm moving up the rankings.

We need someone to take ownership of this and get some fixes done. Unfortunately, the original coders don't seem to be interested in it anymore.
Reply With Quote
  #10  
Old 04-09-2005, 10:39 PM
dssmili dssmili is offline
 
Join Date: Jul 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please agicosa PM or email it to me too at mili@dssftp.com

mili
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04275 seconds
  • Memory Usage 2,264KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete