0
Welcome Guest! Login
0 items Join Now

Check out our new Ministry Site- - Mobius

  • Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Hey fellow members,

      Please check out our new site http://www.thefoundry.tv  and tell us what you think about it.

      We used the rt_slideshow from sporticus and modified the code to work with the width selector.

      Also, if you click on Gallery on the menu we also are using monoslideshow to show our galleries then we are using litebox for our gallery pics.

      The site is not completely done, we are working on getting community builder up soon too!

      Thanks,

      Clint
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Nice job! I was just looking at Mobius for a new site and was wondering about using the rt_slideshow with it. Any chance you can post the code/files you modified to make it work with Mobius?
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Sweet site. What's the calendar module you're using, I really want to use it on my site.
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Edwin Turner wrote:
      Sweet site. What's the calendar module you're using, I really want to use it on my site.


      Look at the bottom of the components' screen ;)
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Anyway, here's my comment:

      Great site! Very clean and easy to follow!
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • I modified the module mod_rt_slideshow.php in the modules folder. Based on a session I set in index.php on the mobius module, I am able to adjust the module. You have to have two seperate image folders that it is pointing to. One with the short images and one for the longer images.

      here is the module code. Once you have installe the slideshow, replace the code in mod_rt_slideshow.php with this.


      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      <?php
      /**
      * @version $Id: mod_whosonline.php 2726 2006-03-09 14:01:19Z stingrey $
      * @package Joomla
      * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
      * @license www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
      * Joomla! is free software. This version may have been modified pursuant
      * to the GNU General Public License, and as distributed it includes or
      * is derivative of works licensed under the GNU General Public License or
      * other free or open source software licenses.
      * See COPYRIGHT.php for copyright notices and details.
      */

      // no direct access
      defined( '_VALID_MOS' ) or die( 'Restricted access' );



      $showmode = $params->get( 'showmode', 0 );

      $showDescription = $params->get( 'showDescription', 1 );
      if($_SESSION == 'w-thin'){
      $width = 605 ;
      $height = 160 ;

      $imagePath = cleanDir('images/slideshow_small');
      }else{
      $width = 755 ;
      $height = 160 ;
      $imagePath = cleanDir('images/slideshow_large');
      }
      $duration = $params->get( 'duration', 9000 );
      $speed = $params->get('speed', 700);
      $jslib = $params->get('jslib', 1);
      $sortcriteria = $params->get('sortcriteria', 0);
      $sortorder = $params->get('sortorder', 'asc');

      $images = imageList($imagePath, $sortcriteria, $sortorder);
      if (count($images) > 0) {
      $imgcount = 0;
      if ($jslib == 1) {
      echo '<script src="modules/rt_slideshow/mootools.release.83.js" type="text/javascript"></script>' . "\n";
      }
      echo '<script src="modules/rt_slideshow/timed.slideshow.js" type="text/javascript"></script>' . "\n";
      echo '<div class="timedSlideshow jdSlideshow" id="mySlideshow" style="width:' . $width . 'px;height:' . $height . 'px"></div>' . "\n";
      echo '<script type="text/javascript">' . "\n";
      echo ' var mySlideData = new Array();' . "\n";

      foreach($images as $img) {
      $info = getInfo($imagePath, $img);
      echo "mySlideData[" . $imgcount++ . "] = new Array(\n";
      echo "'$imagePath$img',\n";
      echo "'" . trim($info[0]) . "',\n";
      echo "'" . trim($info[1]) . "',\n";
      echo "'" . trim($info[2]) . "'\n";
      echo ");";
      }
      echo '</script>
      <script type="text/javascript">
      function startSlideshow() {
      var slideshow = new timedSlideShow($("mySlideshow"), mySlideData, ' . $duration . ', ' . $speed . ');
      }

      addLoadEvent(startSlideshow);
      </script>';
      }

      //echo $output;


      //helper functions
      function imageList ($directory, $sortcriteria, $sortorder) {
      $results = array();
      $handler = opendir($directory);
      $i = 0;
      while ($file = readdir($handler)) {
      if ($file != '.' && $file != '..' && isImage($file)) {
      $results[$i][0] = $file;
      $results[$i][1] = filemtime($directory . "/" .$file);
      $i++;
      }
      }
      closedir($handler);

      //these lines sort the contents of the directory by the date
      // Obtain a list of columns

      foreach($results as $res) {
      if ($sortcriteria == 0 ) $sortAux[] = $res[0];
      else $sortAux[] = $res[1];
      }

      if ($sortorder == 0) array_multisort($sortAux, SORT_ASC, $results);
      else array_multisort($sortAux, SORT_DESC, $results);

      foreach($results as $res) {
      $sorted_results[] = $res[0];
      }

      return $sorted_results;
      }

      function getInfo($imagePath, $file) {
      global $iso_client_lang;

      $langext = "";
      $fileext= ".txt";

      if (isset($iso_client_lang) && strlen($iso_client_lang)>1) $langext = "." . $iso_client_lang;

      $file_noext = substr($file, 0, strrpos($file,"."));
      $info = array();

      $infofile = $imagePath . $file_noext . $langext . $fileext;

      if (!file_exists($infofile)) $infofile = $imagePath . $file_noext . $fileext;

      if (file_exists($infofile)) {
      $imginfo = file ($infofile);
      foreach ($imginfo as $line) {
      $info[] = addslashes($line);
      }
      return $info;
      }
      return array('#','','');
      }

      function isImage($file) {
      $imagetypes = array(".jpg", ".jpeg", ".gif", ".png");
      $extension = substr($file,strrpos($file,"."));
      if (in_array($extension, $imagetypes)) return true;
      else return false;
      }

      function cleanDir($dir) {
      if (substr($dir, -1, 1) == '/')
      return $dir;
      else
      return $dir . "/";
      }

      ?>
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

      Now in your template index.php set this session by placing this code right after the </head> statement.

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////
      <?php $_SESSION = $widthstyle; ?>
      //////////////////////////////////////////////////////////////////////////////////////////////////////////

      now based on what you click, the slideshow should pull from the appropriate image folders. See the module code for the path to the images.

      This is the code you will want to change to point to your image directories that you create.

      cleanDir('images/slideshow_small');

      cleanDir('images/slideshow_large');

      Or just create two folders by those names under your root images folder (not the images folder in the template) but the one just underneath the public_html folder (root) and this should work for you.

      Hope this helps.
  • Re: Check out our new Ministry Site- - Mobius

    Posted 18 years 1 month ago
    • Thats a great use of the Mobius template, the slideshow just tops it off

      Great job!
    • James Spencer / Developer & Support / Hull, UK

Time to create page: 0.072 seconds