![]() |
Display the result of a query in postbit
1 Attachment(s)
Hi all,
I'm wanting to display in the postbit, the result of a query but that doesn't work and I don't understand why. So, this is my table fournisseurs : SC1 Here is where I want to display its phone number (alt of the img) : SC2 This is the hook I added for showpost_start : PHP Code:
And this is the little part that displays the phone picture and should display the number, but it doesn't :( Code:
<vb:if condition="$post[usergroupid]==10 || $post[usergroupid]==11"> Thank you:up: |
It's kind of tricky selecting hooks just based on the name. Anyway, I would use postbit_display_complete instead of showpost_start.
You don't want to return from your plugin, because that could keep other plugins on the same hook from running. What you want to do is register your variable to the postbit template. Here's an article on rendering templates: https://vborg.vbsupport.ru/showthread.php?t=228078 But your code would be something like: PHP Code:
|
Quote:
I had tried with preregister function, but had no success, so I tried the return with no more ... I try again :up: --------------- Added [DATE]1438595546[/DATE] at [TIME]1438595546[/TIME] --------------- It works fine :) Code:
global $vbulletin; But you said Quote:
I tried recording in an array and check them with in_array but no success :confused: |
What I meant is something like this:
PHP Code:
But I remembered a better way that might work without adding a query. You can add on to the existing post query in showthread.php using a plugin on hook showthread_query_postids and code like this: PHP Code:
|
All times are GMT. The time now is 12:27 PM. |
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:
|