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
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

acdtrp - September 26, 2008 - 03:34

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

rszrama - October 11, 2008 - 16:29
Status:active» postponed (maintainer needs more info)

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

joachim - February 5, 2009 - 14:08
Version:5.x-1.3» 5.x-1.4
Status:postponed (maintainer needs more info)» needs review

Seeing this on 1.4.

The culprit is this line:

    var output = "<?php\n\n$settings = array(\n";

change to:

    var output = "&lt;?php\n\n$settings = array(\n";

 
 

Drupal is a registered trademark of Dries Buytaert.