Hello,
I have a problem with Custom Package Previews with XML:
Fatal error: Call to undefined function build_package_preview () in / xxxxxx / preview_builder.php on line 22
A line 22 of preview_builder.php would include:
If ($ html = build_package_preview ($ package [ 'id'], $ package [ 'key'])) (
In build_package_builder would include:
<? PHP
Build_package_preview function ($ packageid, $ packagekey) (
/ / Get XML formatted package info from Pando services
If ($ xml = get_package_info ($ packageid, $ packagekey)) (
/ / Load up a new SimpleXML object from the retrieved XML
If ($ = new package SimpleXMLElement ($ xml)) (
/ / Get number of days to / since expired, set "expired" status
$ Days = round ((strtotime ($ package-> expirationDate) - time ()) / (60 * 60 * 24));
($ Days <0)? $ Expired = TRUE: $ expired = FALSE;
Days = $ abs ($ days);
/ / Only wrap title / thumbnail links as if we have a key and package is not expired
If ($ expired | | empty ($ packagekey)) (
$ $ Title = package-> title;
$ Expirestr = " $ Expired days days ago ";
)
Else (
$ Title = " packageURL '> $ package-> title ";
$ Thumb = " packageURL '> thumbnailURL' alt =''>";
$ Expirestr = " $ Expires in days days ";
)
/ / Generate the entire output HTML
$ Html = <<
packageURL "> thumbnailURL" alt ="">
title
Downloaded $ package-> downloads times
$ Expirestr
HTML;
Return $ html;
)
)
/ / Something went wrong
Return FALSE;
)
?>
Please tell me, or is the problem,
Thanks in advance,
ZeToF
ZeToF, I'm having a hard
ZeToF,
I'm having a hard time reading your code as formatted in the comments. Could you please email me the code at scott@pando.com so I could review it?