The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help please displaying an image after reading a file
I've been trying to add some code in a Forum block to display a status image that shows on one of our download sites
Code:
www.openvix.co.uk Code:
'; ?> Code:
<?php $domain = 'http://openvix.co.uk/'; $StatusFile = "./feeds/status"; $states = array('stable', 'un-stable', 'updating'); if(($currentState = @file_get_contents($domain.$StatusFile)) !== false) { $currentState = intval(trim($currentState)); } else { $currentState = 2; } print '<img src="'.$domain.$states[$currentState].'.png" class="statusimage" alt="OpenViX status: '.$states[$currentState].'" />'; ?> Thanks in advance. |
#2
|
|||
|
|||
You want to create a "Custom HTML/PHP" block and make sure you select the "PHP" radio button in the Content Type section. Then you need to "return" the output instead of printing it.
Try using this code: PHP Code:
|
Благодарность от: | ||
Lynne |
#3
|
|||
|
|||
Thank you, just tested, no joy
See attached. |
#4
|
|||
|
|||
Sorry, my mistake, had HTML checked.
Massive thank you for your help |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|