![]() |
Display a variable in my template
Hello,
I created a php file, the display is correct, except the variable $out that doesn't display where it should ... with a echo, it display well the result of my query, but I can't display it directly in my template. Could someone help me ? This is my php file : Code:
<?php Code:
{vb:stylevar htmldoctype} |
In the template it should be:
Code:
{vb:raw out} That's if you want the name to be able to contain html, or if you're sure it doesn't contain any special characters. If you think it could contain special characters (or if you're getting the field from a user so you're not sure what it might contain) you could use {vb:var out} instead. |
Try this:
Code:
articles : {vb:raw out} {vb:raw item} |
I'm so stupid .... I'll try ! :)
Thank you for helping, I'm back to vbulletin after about 10years without coding, and it's really not easy, everything has so much changed !!! This code is prety simple, but I have to understand how ever This was my old account : https://vborg.vbsupport.ru/search.php?searchid=22636405 I'll b back :) --------------- Added [DATE]1433801253[/DATE] at [TIME]1433801253[/TIME] --------------- It works ! thank you, but now I've another problem :D |
1 Attachment(s)
So, my page fournisseurs.php is now finished and it works well, thanks to you :)
Now I need, when a user is in the wanted forum, to display a select box to choose the type of product he needs. I added it to the newthread template : Code:
<vb:if condition="$foruminfo['forumid']=='7'"> Code:
$liste=" Code:
<option value="1">1</option> |
1 Attachment(s)
Pfiouuuuuuuuuuuu, I did it ....
In the newthread template, added : Code:
<vb:if condition="$foruminfo['forumid']=='7'"> Code:
$listes_produits = $vbulletin->db->query_read(" Code:
{vb:raw liste} |
Thank you for taking the time to post your solution...others who may face a similar situation will benefit from your post. :D
|
That's why I do it ;)
--------------- Added [DATE]1434660501[/DATE] at [TIME]1434660501[/TIME] --------------- I get an other problem. So I get this in newthread https://vborg.vbsupport.ru/external/2015/06/6.png which is, in HTML : HTML Code:
<label for="subject" class="full">Produit concern? :</label> Code:
if(THIS_SCRIPT == newthread AND $post['produit'] == '') Could someone help me ? --------------- Added [DATE]1434661051[/DATE] at [TIME]1434661051[/TIME] --------------- Solved ! The hook used has to be linked to newpost_process :) --------------- Added [DATE]1434661142[/DATE] at [TIME]1434661142[/TIME] --------------- Not solved :D It always display the error, even if the select box is filled ... :rolleyes: --------------- Added [DATE]1434662169[/DATE] at [TIME]1434662169[/TIME] --------------- I added in a hook linked to newthread_start : Code:
$vbulletin->input->clean_array_gpc('p', array( |
All times are GMT. The time now is 05:30 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|