The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
module VBA: add sub title ?
in VBA template adv_portal i have:
Code:
<title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if></title> my module name is "book" and I see it as: Code:
www.mysite.com/index.php?id_page=book&nr=22 In the page <TITLE> tag there is: "My site name - book" "book" is $pagetitle, definite in the Admin CP module, OK? how do I do to add in page module also the title of the book nr.22? es. title book nr. 22 is "THE LAST HISTORY" I would want the title of the page to be: "My site name - book - THE LAST HISTORY" I could pass in GET variable es: Code:
www.mysite.com/index.php?id_page=book&nr=22&subtitle=THE LAST HISTORY in adv_portal i have add: Code:
<title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if> <if condition="$subtitle">- $subtitle</if> </title> in my php module I have add Code:
$subtitle= $_GET['subtitle']; help me please thanks |
#2
|
||||
|
||||
|
#3
|
|||
|
|||
Quote:
I read the manual and : https://vborg.vbsupport.ru/showthread.php?t=119372&highlight=%24_GET+clean_gp c() but I did not understand how use vBulletin Input cleaner in my example $subtitle= $_GET['subtitle']; $vbulletin->input->clean_gpc('g', 'subtitle', TYPE_STR); $subtitle = htmlspecialchars($vbulletin->GPC['subtitle']); ????? or: $subtitle = $vbulletin->input->clean_gpc('g', 'subtitle', TYPE_NOCLEAN); I have done this plugin Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1" executionorder="5" product="vbulletin"> <title>Add subtitle my module book</title> <hookname>Add_subtitle</hookname> <phpcode><![CDATA[if (@$_GET['subtitle']){ $subtitle = $vbulletin->input->clean_gpc('g', 'subtitle', TYPE_NOHTML); }]]></phpcode> </plugin> </plugins> Code:
<title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if> <if condition="$subtitle">- $subtitle</if> </title> you can give me an example please? thanks --------------- Added [DATE]1235584089[/DATE] at [TIME]1235584089[/TIME] --------------- wow! now it works ! this is my plugin Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1" executionorder="5" product="vBadvanced CMPS"> <title>Add subtitle my module book</title> <hookname>vba_cmps_print_output</hookname> <phpcode><![CDATA[ if (@$_GET['subtitle']){ $subclear = @$_GET['subtitle']; $subtitle = $vbulletin->input->clean($subclear, TYPE_NOHTML); }]]></phpcode> </plugin> </plugins> product="vBadvanced CMPS" location hook = "vba_cmps_print_output" |
#4
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|