Quote:
Originally Posted by Dismounted
You need to use the vBulletin Input cleaner to clean your variable(s)!
See the vBulletin Manual.
|
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>
and in VBA template adv_portal
Code:
<title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if>
<if condition="$subtitle">- $subtitle</if>
</title>
but not work !
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"