![]() |
Use of output on php code
I?ve read this manual (https://www.vbulletin.com/forum/show...L-or-PHP-Block) but I don?t understand very well how to implement this on my custom code.
I need to show this php code on a block, but I don?t know how to use $output variables: Code:
<?php pd: I will pay if you want money :) |
Try changing the word "echo" to "$output .= ", so that the line looks like this:
Code:
$output .= ' Edit: you may also have to remove the <?php and ?> from the beginning and end - I can't remember if they're allowed or not. |
Can?t get this work :(
|
OK, what happened? Did you try my suggestion, and if so, did you get any errors?
|
I?m using borbole?s mod (http://www.forumservices.eu/vb/threa...ustom-Pages-15) and I receive an error) and I?m inserting php inside html code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
I don't understand what that mod has to do with this, I thought you were trying to create a php type forum block. In that case you'd be entering that code (from the first post) in the Forum Block manager when you create a new "Custom HTML/PHP" block. But one thing I forgot is that using $output is for widgets. For forum blocks you need to return the value, so you'd also have to add
Code:
return $output; as the last line. |
If I understand, you want this:
PHP Code:
|
I will make things clear, sorry guys.
From the beginning I said that was for a forumblock to don?t give more details about the situations (it seems complex but it is not) Actually, I want implement a sponsor wall on my forum, using a custom page created with Borbole?s mod: http://tutorialzine.com/2010/03/spon...ip-jquery-css/ What I need to do is adapt the code of the index.php file (http://demo.tutorialzine.com/2010/03...y-css/demo.php) to work on vBulletin... That php file has html inside, but to work with php on vbulletin you need to use $output variables and that?s my main problem, I don?t know how can I adapt this code. |
Should'nt be "return $output"?
PHP Code:
Sorry for ++, i copied text from my iPad and it looked like that :confused: |
I don't mean to threadcrap, but is there a consensus on this?
I have php code that works fine, and the only way I've found to use it in a cms widget is using an html iframe to the php file because I'm not really sure what needs to change for it to be usable in a php widget? |
All times are GMT. The time now is 12:32 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:
|