The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello
(Sorry for my bad english) I wrote a custom plugin and i have a error when trying to display an array using vb:each (unexpected T_STRING in class_core.php). If i don't register the array, there is no error, if i don't try to display the array there is no error, and my code perfectly run outside of VB. So in my plugin i create an array, needed to create the second array : PHP Code:
PHP Code:
PHP Code:
Code:
Array
(
[372] => 01 - Ain
[373] => 02 - Aisne
[374] => 03 - Allier
[375] => 04 - Alpes-de-Haute-Provence
[376] => 05 - Hautes-Alpes
[377] => 06 - Alpes-Maritimes
[378] => 07 - Ard?che
[379] => 08 - Ardennes
[380] => 09 - Ari?ge
[381] => 10 - Aube
[382] => 11 - Aude
[383] => 12 - Aveyron
[384] => 13 - Bouches-du-Rh?ne
[385] => 14 - Calvados
[386] => 15 - Cantal
[387] => 16 - Charente
[388] => 17 - Charente-Maritime
[389] => 18 - Cher
[391] => 20 - Corse
[392] => 21 - C?te-d'Or
[393] => 22 - C?tes-d'Armor
[395] => 24 - Dordogne
[396] => 25 - Doubs
[397] => 26 - Dr?me
[398] => 27 - Eure
[399] => 28 - Eure-et-Loir
[400] => 29 - Finist?re
[401] => 30 - Gard
[402] => 31 - Haute-Garonne
[403] => 32 - Gers
[404] => 33 - Gironde
[405] => 34 - H?rault
[406] => 35 - Ille-et-Vilaine
[407] => 36 - Indre
[408] => 37 - Indre-et-Loire
[409] => 38 - Is?re
[410] => 39 - Jura
[411] => 40 - Landes
[412] => 41 - Loir-et-Cher
[413] => 42 - Loire
[414] => 43 - Haute-Loire
[415] => 44 - Loire-Atlantique
[416] => 45 - Loiret
[417] => 46 - Lot
[418] => 47 - Lot-et-Garonne
[420] => 49 - Maine-et-Loire
[421] => 50 - Manche
[422] => 51 - Marne
[423] => 52 - Haute-Marne
[425] => 54 - Meurthe-et-Moselle
[426] => 55 - Meuse
[427] => 56 - Morbihan
[428] => 57 - Moselle
[429] => 58 - Ni?vre
[430] => 59 - Nord
[431] => 60 - Oise
[432] => 61 - Orne
[433] => 62 - Pas-de-Calais
[434] => 63 - Puy-de-D?me
[435] => 64 - Pyr?n?es-Atlantiques
[436] => 65 - Hautes-Pyr?n?es
[437] => 66 - Pyr?n?es-Orientales
[438] => 67 - Bas-Rhin
[439] => 68 - Haut-Rhin
[440] => 69 - Rh?ne
[441] => 70 - Haute-Sa?ne
[442] => 71 - Sa?ne-et-Loire
[443] => 72 - Sarthe
[444] => 73 - Savoie
[445] => 74 - Haute-Savoie
[446] => 75 - Paris
[447] => 76 - Seine-Maritime
[448] => 77 - Seine-et-Marne
[449] => 78 - Yvelines
[450] => 79 - Deux-S?vres
[451] => 80 - Somme
[452] => 81 - Tarn
[453] => 82 - Tarn-et-Garonne
[454] => 83 - Var
[455] => 84 - Vaucluse
[456] => 85 - Vend?e
[457] => 86 - Vienne
[459] => 88 - Vosges
[460] => 89 - Yonne
[461] => 90 - Territoire de Belfort
[462] => 91 - Essonne
[463] => 92 - Hauts-de-Seine
[464] => 93 - Seine-Saint-Denis
[465] => 94 - Val-de-Marne
[466] => 95 - Val-d'Oise
[468] => Belgique
[470] => Canada
[472] => Non renseign?
[467] => Outre-mer
)
|
|
#2
|
|||
|
|||
|
The problem is that $vbulletin->templatecache[] does not just contain the template html, it contains php code that produces the html when run through eval(). If you execute the query
Code:
SELECT template FROM template WHERE title='FORUMDISPLAY' Code:
$recherche_adop_fd = str_replace("'", "\'", $recherche_adop_fd);
just after the $newTemplate->render() line. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|