vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vbRanking revised (https://vborg.vbsupport.ru/showthread.php?t=117102)

testnutzer123 05-29-2006 10:00 PM

vbRanking revised
 
You might know the vbRanking plugin for vBulletin 3.5.x. (https://vborg.vbsupport.ru/showthread.php?t=95265)
This one is a complete rewrite.

The plugin will regenrate links to a new format (e.g: showthread-goto_newpost-t_27730.html).
Webspiders, like the GoogleBot, will then parse the whole page and generate better search indexes from your forum.
  • does correctly handle "all" arguments
  • Less RewriteRules, less preg_replaces
  • Should do better performance-wise.
  • Only regenerates links for GUEST (i.e. all spiders)

Requirements
  • vB3.5
  • mod_rewrite
  • No active vbRanking from other vendor(s).

License
? 2006 by Nils Maier
The GNU General Public License (GPL)

Homepage
http://celebnamer.celebworld.ws/stuff/vbRanking/

Installation
  1. Install the RewriteRule stuff (upload and/or merge upload/.htaccess)
  2. Install the plugin (upload/product_*.xml)
  3. Done!

Code
(just as a reference the code from the plugin and from .htaccess).

Code is dead simple.
PHP Code:

<?php
/*
(C) 2006 by Nils Maier
License: GNU General Public License (GPL) 2.0, http://www.opensource.org/licenses/gpl-license.php
*/

function _c_vBRanking_replace($in)
{
    return 
sprintf(
        
'%s-%s.html%s',
        
$in[1],
        
preg_replace(array('/(&amp;|&(?!quot;|lt;|gt;))/''/=/'), array('-''_'), $in[2]),
        
$in[3]
    );
}
function 
vBRanking($in)
{
    return 
preg_replace_callback('-(<a.*href="(?!\w+:).*)\.php\?(.*)(#|")-Ums''_c_vBRanking_replace'$in);
}
if (!
$vbulletin->userinfo['userid'])
{
    
$output vBRanking($output);
}
?>

Rewrite Rules:
Code:

RewriteEngine on
RewriteRule ^(.*)-(.+?)_(.*?)\.html$ $1.html?$2=$3 [N,QSA,L]
RewriteRule ^(.*)\.html$ $1.php [QSA]

Notes
Beta version.
No support (maybe you'll get some if I have a nice day)

Lady Divus 05-30-2006 04:41 AM

Thank you for the hack, i will install it later on. Sounds interesting -

Lady Divus

testnutzer123 05-30-2006 04:45 AM

Quote:

Originally Posted by Lady Divus
Reserved!

huh?

kurtbarker 05-30-2006 05:04 AM

just to clarify mate... does this ONLY rewrite the links for guests... coz I like the idea but saw it pointless for actual members...

also, is it easy and clean to uninstall if required?

and that reserved post is funny, LOL

there is a massive vBrewrite which is good, but I reckon a little too big at the moment...

thanks

testnutzer123 05-30-2006 05:09 AM

Quote:

Originally Posted by kurtbarker
...
also, is it easy and clean to uninstall if required?
...

You may deactivate/uninstall the plugin anytime.

The RewriteRule stuff however might be left in then.
It shouldn't cause harm and furthermore regenerated links still work (eg. if a guest copy/paste'd such link somewhere).

redspider 05-30-2006 05:10 AM

Quote:

Originally Posted by Lady Divus
Reserved!

maybe question come later but will be hard to find .



anyway nice hack will try later in one of my site to compare with other similar seo .

maroceve 05-30-2006 07:57 AM

yes i d like to hear some more reviews cause vrewrite is causing a lot of problems in my site...

Barakat 05-30-2006 09:35 AM

it makes a server enternal error ? and wont work ...


2 what is that code ? or to put it

Code is dead simple.

PHP Code:

<?php 
/* 
(C) 2006 by Nils Maier 
License: GNU General Public License (GPL) 2.0, http://www.opensource.org/licenses/gpl-license.php 
*/ 

function _c_vBRanking_replace($in

    return 
sprintf
        
'%s-%s.html%s'
        
$in[1], 
        
preg_replace(array('/(&amp;|&(?!quot;|lt;|gt;))/''/=/'), array('-''_'), $in[2]), 
        
$in[3
    ); 

function 
vBRanking($in

    return 
preg_replace_callback('-(<a.*href="(?!\w+:).*)\.php\?(.*)(#|")-Ums''_c_vBRanking_replace'$in); 

if (!
$vbulletin->userinfo['userid']) 

    
$output vBRanking($output); 

?>


testnutzer123 05-30-2006 11:51 AM

Quote:

Originally Posted by Barakat
it makes a server enternal error ? and wont work ...

The RewriteRule stuff might cause 500 when Apache is not correctly configured.
a) You need to have mod_rewrite installed, and it must be properly configured, i.e. FollowSymLinks.
See http://httpd.apache.org/docs/2.0/mod...ml#rewriterule (esp. the "Note: Enabling rewrites in per-directory context" paragraph).
Quote:

Originally Posted by Barakat
2 what is that code ? or to put it
...

That code is simply the plugin code that gets installed.
No need to install it manually ;)

Lady Divus 05-30-2006 01:50 PM

Quote:

Originally Posted by kurtbarker
and that reserved post is funny, LOL

Ok, did i say something stupid?

re?served
Pronunciation: (ri-z?rvd'), [key]
?adj.
1. kept or set apart for some particular use or purpose.

Is there a problem with reserving a hack for later use? Oh well, i must be missing something. Can someone fill me in? I guess i forgot to wash the word stupid off my forehead when i showered this morning...Awaiting my crucifiction -

Lady Divus


All times are GMT. The time now is 07:55 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.01851 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete