vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - Chief First Post - Every Page - [Thread Based] (https://vborg.vbsupport.ru/showthread.php?t=194830)

mykkal 05-16-2013 12:47 PM

Here is a fix offered by VBSEO support that will help those using this plugin to avoid duplicate meta descriptions:
Must be using vbSEO to do this
Change the vbseo_extract_msg_postbits() function code in functions_vbseo_vb.php file to:
Code:

function vbseo_extract_msg_postbits($postno = 0)
{
global $vbulletin;


$msg = '';
$pbits = $GLOBALS['postbits'];
if(!$pbits)
$pbits = vBSEO_Storage::get('cms_text');


if($pbits)
{
preg_match_all('#<!--\s*message\s*-->(.*?)<!--\s*/\s*message\s*-->#s', $pbits, $post_match);
if(!$post_match || !$post_match[1] || (isset($vbulletin) && $vbulletin->gars) ){
$lfor = (VBSEO_VB4? '</blockquote>' : '</div>');
if(strstr($pbits, $lfor))
preg_match_all('#post_message_[^>]*?\>(.*?)'.$lfor.'#s', $pbits, $post_match);


}


$msg = preg_replace('#<!--.*?-->#s', '', $msg);
$msg = str_replace('>Quote:<', '', $post_match[1][$postno]);
$msg = preg_replace('#<div>Originally Posted by.*?</div>#', '', $msg);
$msg = preg_replace('#<script.*?\>.*?</script>#is', '', $msg);
$msg = preg_replace('#(<.*?\>)+#s', ' ', $msg);
$msg = trim($msg);
}

return $msg;
}

Next replace this line in functions_vbseo.php file:
Code:

$desc_content = vbseo_extract_msg_postbits();
with:
Code:

$desc_content = vbseo_extract_msg_postbits(intval($_GET['page'])>1 ? 1 : 0);

M.C. 07-11-2013 07:14 AM

I love it on 3.8 so please update it for 4.2! THANKS!

shahidbaloch 01-16-2014 05:01 AM

is it available for vb 4.2.2?

ozzy47 01-16-2014 10:37 AM

Here, https://vborg.vbsupport.ru/showthread.php?t=306348


All times are GMT. The time now is 05: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.01081 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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