generated code not complete?
dropchew - September 1, 2008 - 16:51
| Project: | uBrowser |
| Version: | 5.x-1.4 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Hi I have tried the demonstration of ubrowser and loving it!
Tried to implement on my webpage and generate the code as below
'#ubrowser',
'class' => '',
'vid' => 19,
'nids' => 'true',
'search' => 'true',
'view' => 'true',
'window' => 'new',
'close' => 'true',
'multi' => 'true',
'categ' => 'Tag',
'nodesg' => '',
'nodepl' => '',
'filter' => '',
'select' => "",
);
print ubrowser($settings, 'ubrowser');
?>
It looks like its an incomplete code. I have read the documentation and it says that to show ubrowser I will have to paste the code as below
<?php
function ubrowser($settings, $id = 'ubrowser') {
// Adds CSS and JS files.
// Validates $settings.
// Returns the HTML output that displays the uBrowser.
}
?>How do I combine the 2 sets of codes? If possible can you please show me an example? Thanks

#1
the proper code should look like this:
<?php
$settings = array(
'div' => '#ubrowser',
'class' => '',
... and so on ...
My ubrowser also generated an incomplete code but I managed to figure it out.
#2
I'm not getting this issue with the latest uBrowser code on the Livetest. Is there some specific setup you guys are using to cause the incomplete PHP snippet to appear?
#3
Seeing this on 1.4.
The culprit is this line:
var output = "<?php\n\n$settings = array(\n";change to:
var output = "<?php\n\n$settings = array(\n";