PDA

View Full Version : Problem using print_standard_error and CSS is a file.


Tom M
01-03-2005, 11:50 PM
I'm trying to generate a message using print_standard_error. It works fine if the CSS info is embedded in the HTML. It displays but there's no CSS when the CSS is a file as the clientscript reference hasn't had a chance to be fixed up by the vba_cmps_include_bottom.php code.

Any way around this as I'd rather store the CSS as a file.

Brian
01-03-2005, 11:58 PM
Where exactly are you using the print_standard_error() function at?

Our Sponsors
 

Tom M
01-04-2005, 12:08 AM
It's in the Recommendations CMPS page I'm working on. At the moment it's just a stub in the processing. The fragment looks like
// Accept review form submission
elseif ($action == 'reviewsubmit')
{
// Future code goes here.
$thankyou = 'Thank You. Your review will be availalable as soon as it has been reviewed by the moderators.';
eval(print_standard_error($thankyou, false));
}
Since print_standard_error never returns I'm not sure what to do to rewrite the url's.

Brian
01-04-2005, 12:14 AM
Is that code maybe in a function or something? As long as it's after the call to global.php in the file (or if it's in a module) then the clientscript link should already be replaced...

Our Sponsors
 

Tom M
01-04-2005, 01:07 AM
It's just part of the Recommendations module I'm working on that get's called by CMPS when the page=recommend is activated.

Brian
01-04-2005, 02:38 AM
Ahh, that would be the problem then. If you look in your cmps_include_bottom.php file for this code:
// Replace $headinclude URL's
$headinclude = str_replace(
array(
'"clientscript',
'url(images/',
'name="generator" content="'
),
array(
'"' . $vboptions['bburl'] . '/clientscript',
'url(' . $vboptions['bburl'] . '/images/',
'name="generator" content="vBadvanced, '
),
$headinclude
);

And move it to right above this line:
// Process Active Modules

Then that should take care of it.

Tom M
01-04-2005, 02:57 AM
Excellent! That did the trick.

Thanks again for the outstanding support.