vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Changing the title of tag search pages in vB4? (https://vborg.vbsupport.ru/showthread.php?t=273727)

svBK.vn 11-10-2011 04:01 AM

Changing the title of tag search pages in vB4?
 
Hi,

I need help with reformatting the title of the tag pages on my site http://svbk.vn/tags.php?tag=dien+dan+svbk

I need the title to change from

Search Results (kết quả t?m kiếm) - Dien dan sinh vien Bach Khoa

to

dien dan svbk - Dien dan sinh vien Bach Khoa

How do i change this in the templates. I'm running 4.1.3

Thanks in advance :)

Lynne 11-10-2011 05:38 PM

template - <span class="comment">search_resultlist

Change this line to what you want:
HTML Code:

<title>{vb:rawphrase search_results} - {vb:raw vboptions.bbtitle}</title>
If this is only for the tags page, then perhaps something like:

HTML Code:

<title><vb:if condition="THIS_SCRIPT == 'tags'">dien dan svbk<vb:else />{vb:rawphrase search_results}</vb:if> - {vb:raw vboptions.bbtitle}</title>

svBK.vn 11-11-2011 02:08 AM

Thank for you support but I need the title to change title of tag search page from:

Search Results (kết quả t?m kiếm) - Dien dan sinh vien Bach Khoa

to

<tag's name I search> - Dien dan sinh vien Bach Khoa

Example: when I search abc tag, title of tag search page will be:

abc - Dien dan sinh vien Bach Khoa


when I search def tag, title of tag search page will be:

def - Dien dan sinh vien Bach Khoa

It's look like this page: http://www.vbseo.com/tags/vbulletin/

svBK.vn 11-14-2011 11:46 AM

Who can help me? :(

Lynne 11-14-2011 04:42 PM

Just write a plugin like:
hook location - search_complete
PHP Code:

$this->template->register('criteria'$_GET['tag']); 

And then use the variable criteria in the <title> tag.

Probably should clean it first. So...
PHP Code:

$vbulletin->input->clean_array_gpc('r', array(
        
'tag'    => TYPE_STR,
));
$this->template->register('criteria'$vbulletin->GPC['tag']); 


svBK.vn 11-16-2011 01:13 PM

Solved. I've done it!

Thank you so much :x

Lynne 11-16-2011 08:42 PM

You may need to put a condition around that to only do it on the tags.php page (use THIS_SCRIPT) since that hook gets called on the regular search page also.

svBK.vn 11-18-2011 12:35 AM

OK, Thank you very much again :X

svBK.vn 11-28-2011 08:42 AM

Sorry, I have a problem with this plugin: When I try to view http://svbk.vn/search.php (and some profiles page), it gives me a 500 error saying:

http://nf0.upanh.com/b4.s5.d1/e14563...38369060.1.jpg

When I disable this plugin, everything works normally so I think this plugin cause the error.

Who can help me? Thanks in advance :)

Lynne 11-28-2011 05:06 PM

Did you put a condition around the plugin so it's only used for tags as I suggested in post 7?


All times are GMT. The time now is 10:09 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.03173 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_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