Inserting php code Frontpage slideshow on CMS Home Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mondy
    Senior Member
    • Apr 2008
    • 199
    • 3.6.x

    [CMS] Inserting php code Frontpage slideshow on CMS Home Page

    I apologise in advance for asking a question which may have been raised a million times before - not being able to find the answer...

    I want to include Frontpage Slideshow on our CMS Home page in the location show graphically on the attachment. I imagine I will have to modify a template to insert the following out-of-box and unmodified code:

    <?php
    // START of "Frontpage Slideshow" settings
    $nameOfSlideshowToDisplay = "myslideshow"; // Enter the name of your slideshow. Slideshows are in folders inside /fpss/slideshows/.
    $URLofyoursite = "http://www.mysite.com"; // Enter your site's URL.
    $AbsoluteServerPathofyoursite = "/home/user/public_html"; // Enter the root path of your site on the server.

    // do not edit below this line
    include_once($AbsoluteServerPathofyoursite."/fpss/mod_fpslideshow.php");
    // END of "Frontpage Slideshow" settings
    ?>
    Could anyone provide a helping hand by telling me where exactly this code must be inserted - what template and what location?

    Also, do I need to add lines to this code to have it work with vb-code?

    Finally, I raise these questions because I don't believe it's possible to insert a widget with this code into the location shown in the attachment. However, if it IS possible to capture this code in a widget, and to insert that widget on top of the Home Page's Main Content than that would be my preferred option by far.

    Appreciate your wisdom!

    Thanks.
    Attached Files
    http://gblcg.com - The Business of Your Future - Strategy Redefined.
  • bruneiguru
    New Member
    • Jul 2010
    • 23
    • 4.0.x

    #2
    Bump. I have the same issue. Its installed fine on my site on the example.php page but I don't know how to configure the php widget. Can anybody help with that please?

    Comment

    • bszopi
      Senior Member
      • Nov 2009
      • 839
      • 4.1.x

      #3
      I don't have Frontpage Slideshow installed, so I can't test it out, but you should just be able to paste the code MINUS THE "<?php" and "?>" into a PHP widget and get it to work. I'm not sure if the PHP widget is the same as the PHP Direct Eval content type, but in order to get that to display something, you need to have the last bit of code be what you want out in the following syntax: $output = "Whatever you want shown". Looking at the above code, I don't necessary know if that would be required or not, but it may be. And how to make it work, I can't tell you without trying some things. I would try taking out what I mentioned above and see if that works. Otherwise, you'll need to figure out how to integrate the $output into the mix.

      Comment

      • bruneiguru
        New Member
        • Jul 2010
        • 23
        • 4.0.x

        #4
        Hi there, after lots of trial and error and a couple of threads here, I came up with this code for frontpage slideshow which gets the php widget functioning:

        ob_start();
        $slideshow = "latest";
        $siteURL = "http://www.esltweets.com";
        $sitePath = "/home/esltweet/public_html";
        include_once($sitePath."//fpss/fpss.php");
        <br />\n";
        $output .= ob_get_contents();
        ob_end_clean();


        Works just fine EXCEPT for an "array" message at the top of the widget. Hope somebody can help finish the last piece of the jigsaw

        PS I've only changed the first two slides for testing but you can see it here http://esltweets.com/content.php

        Please help to finish this

        Comment

        • bszopi
          Senior Member
          • Nov 2009
          • 839
          • 4.1.x

          #5
          Instead of
          PHP Code:
          $output .= ob_get_contents(); 
          try
          PHP Code:
          $output ob_get_contents(); 

          Comment

          • bruneiguru
            New Member
            • Jul 2010
            • 23
            • 4.0.x

            #6
            Yes! Worked perfectly. Amazing what one small dot can do Thanks very much for your help

            Comment

            • ananto
              New Member
              • Feb 2008
              • 14

              #7
              Hi guys,
              i have a little question, frontpage slideshow creates automatically a slideshow of my article based on the photo and the description of it or i must create manually the slideshows?

              Comment

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