Announcement

Collapse
No announcement yet.

How do I include php in Widget?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Steve Machol
    replied
    ZoDesigns.com, please start your own thread with all the relevant details. Thank you.

    Leave a comment:


  • ZoDesigns.com
    replied
    So I updated a 3.x site to v4 Suite and implemented the same exact code from my other site where this is working (same server). I now get this error:

    Warning: include() [function.include]: open_basedir restriction in effect. File(/home/xxx/domains/xxx.com/public_html/fpss.php) is not within the allowed path(s): (/home/xxx/:/tmp:/var/tmp:/usr/local/lib/php/) in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2

    Leave a comment:


  • steven s
    replied
    Originally posted by kyrgyz View Post
    Thank you. It looks awesome. I'll give it a try later on.
    Keep in mind, it's not a slideshow.

    Leave a comment:


  • kyrgyz
    replied
    Thank you. It looks awesome. I'll give it a try later on.

    Leave a comment:


  • steven s
    replied
    Originally posted by kyrgyz View Post
    P.S. Could you, please, share your script witn me, if it's ok? Or give me a link. Thanks
    I use this.
    http://www.dreamincode.net/code/snippet428.htm
    And in my header I use <img src="path_to/rotate.php">
    http://forum.nccbmwcca.org uses that script.

    Leave a comment:


  • kyrgyz
    replied
    I want to try Webassist PowerGallery, was hoping to use it to show landscape photos in the forum header. Really like its Control Panel.
    Below is from their site.
    PHP Code:
    Embed in PHP Page
    Insert the following code within an existing PHP page, exactly where you wish this PowerGallery to display:
     
    <?php
    $pg_id 
    '6';
    $pg_theme 'dark';
    include(
    '/powergallery/galleries/grid_lightbox/index.php');
    ?>
    Originally posted by steven s View Post
    I use a script that changes the photo with each refresh, but not a slide show.
    P.S. Could you, please, share your script witn me, if it's ok? Or give me a link. Thanks

    Leave a comment:


  • steven s
    replied
    Originally posted by kyrgyz View Post
    I am planning to have a slideshow in forum header. Can it be done with the above code if I put it in the header include?
    I'm going to say no.
    I use a script that changes the photo with each refresh, but not a slide show.

    Leave a comment:


  • kyrgyz
    replied
    Originally posted by steven s View Post
    What I would is create your slide show as a standalone file on your server to ensure that it works.

    public_html/path/mod_fpslideshow.php

    Then use

    PHP Code:
    ob_start();
    include(
    "/home/pathto/mod_fpslideshow.php");
    echo 
    "<br />\n"/* optional space */
    $output .= ob_get_contents();
    ob_end_clean(); 
    I am planning to have a slideshow in forum header. Can it be done with the above code if I put it in the header include?

    Leave a comment:


  • Ashley Pietersen
    replied
    Great ! I had the same issues -


    // UNTESTED
    ob_start();
    include("/packages/vbcms/rep-online.php");
    echo "<br />\n";
    $output .= ob_get_contents();
    ob_end_clean();

    the PHP code above made it happen finaly - thanks

    Leave a comment:


  • Lynne
    replied
    You may create a static html widget, yes. However, you question regarding iframes I can't answer since I have never done anything with them.

    Leave a comment:


  • ShyGuy82
    replied
    Lynne, thanks for your reply, if I want to create a widget for a static html? say I want to include an IFRAME (filling the rest of the browser's real estate (minus header and footer) with SRC of another page, can I do that?

    Thank you

    Leave a comment:


  • Lynne
    replied
    We are talking about a php widget here, so yes, you may only use php and the output is rendered html.

    Leave a comment:


  • ShyGuy82
    replied
    Does this work only with PHP??? Can I bring back ANY content from ANY site? Does the $output hold a raw php or a rendered html?

    Leave a comment:


  • alkrida
    replied
    Thank you Steven

    me 2

    Leave a comment:


  • manofphat
    replied
    This thread was very helpful in my setup of Frontpage Slideshow. Thanks!

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X