Keyword

Slides within K2 item

  • Cheche
  • Cheche's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #80045 by Cheche
Slides within K2 item was created by Cheche
I recently did some hack-ish modification of my k2 template and wanted to get some feedback.  I wanted to include a slide from the module "tabs and slides" from joomlaworks inside of my k2 items.  This way I could include an image gallery within a slide on the item view page and not have a bunch of thumbnails unless someone open the slide.  I am using simple image gallery pro in the items, and wanted to make it easy for my client to utilize the built in gallery upload within k2, but have it end up inside a slide.  In order to do this I downloaded and installed the tabs and slides module and proceeded to break it apart to use within the k2 template. I then added the necessary code to the item.php file within my k2 template overrides, within my js_inspirion template. 1)  I had to add the necessary javascript and css files so at the top of item.php, underneath the //no direct access line,  I placed &lt;?php/** * @version        $Id: item.php 303 2010-01-07 02:56:33Z joomlaworks $ * @package        K2 * @author    JoomlaWorks www.joomlaworks.gr * @copyright    Copyright (c) 2006 - 2010 JoomlaWorks Ltd. All rights reserved. * @license        GNU/GPL license: www.gnu.org/copyleft/gpl.html */// no direct accessdefined('_JEXEC') or die('Restricted access');?><!-- added scripts and stylesheet for slides to work here--><?php JHTML::script($filename='tabs_slides_comp.js', $path = 'plugins/content/plugin_jw_ts/')?><?php JHTML::script($filename='tabs_slides.js', $path = 'plugins/content/plugin_jw_ts/')?><?php JHTML::script($filename='tabs_slides_opt_loader.js', $path = 'plugins/content/plugin_jw_ts/')?><?php JHTML::stylesheet($filename='tabs_slides.css', $path = 'plugins/content/plugin_jw_ts/')?><?php JHTML::script($filename='speed_info.js', $path = 'plugins/content/plugin_jw_ts/')?><!-- end additions for slides --><!-- Start K2 Item Layout --> . . . This adds the javascript that is included for "tabs and slides", the stylesheet and a new .js file that I created to hold the speed variables that are normally passed from the plugin admin to the code.  I am not that good so I just hard coded the values into the .js at the speed that I wanted them.  I didn't want the sliding effect, so i made it fast.  the only code within that file isvar jwts_slideSpeed="10000"; var jwts_timer="1";  2) Then where the gallery is called to the page I placed   <?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>          <!-- Item image gallery -->          <a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>          <!-- added to include slides in gallery -->          <div class="jwts_title"><div class="jwts_title_left"><a href="javascript:void(null);" title="Click to open!" class="jwts_title_text"><?php echo $this->item->title; ?>'s Photo Gallery</a></div></div><div class="jwts_slidewrapper"><div></p>          <!--  end added to include slides in gallery -->          <div class="itemImageGallery">      <?php echo $this->item->gallery; ?>      </div>      <!-- closing tags slides in gallery -->      <p></div></div></p>      <!-- end closing tags slides in gallery -->      <?php endif; ?>I have commented around the areas that I added, but the code is what gets added automatically by the "tabs and slides" plugin when it replaces the {slide},{/slide} tags that get entered into an article.  Some modifications to the css later and I have a fully functioning gallery slide within my content items.  I have been working with Joomla for a while now, and really want to hear some feedback as to whether this is a good idea or not, I know that it has worked for me so far, still need to do some testing, but wanted to throw it out there.  Feedback would be great, I think this is a nice thing to have within a k2 item, and when I get some time want to develop it as an extension. I can't help but feel that I have made this more difficult than it needed to be, but I have learned a lot about the power of k2 in the process.   Would love some feedback.  It's on a local server and won't run it live for a few days unless someone is really interested in seeing it. 

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #80046 by FeSys
Replied by FeSys on topic Slides within K2 item
Hi.. " Cheche Dalforno".
Very Cool..
I am indeed interested to see your work.
Please share it.. This is very promising.
Thank you..

Please Log in or Create an account to join the conversation.

  • Cheche
  • Cheche's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #80047 by Cheche
Replied by Cheche on topic Slides within K2 item
Just about ready to put it live, hopefully tonight or tomorrow. I have to support IE6 and and you all know how fun that is. I will post a link once it is up and running.

Again, the whole thing is pretty hacky so if you do use it, please know what it is doing as upgrading to later versions may be an endeavor. Was hoping to hear some feedback about the approach I took. It really should be made as a plugin, I just don't have the time right now.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #80048 by Simon Wells
Replied by Simon Wells on topic Slides within K2 item
Hi Cheche.

Look forward to the release.
Would also be interested to review this and provide another working demo on K2joom.com.

Send us a message, when you have a release.

Simon
K2Joom.com

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #80049 by Wolf Kuhlemeier
Replied by Wolf Kuhlemeier on topic Slides within K2 item
Interesting...but am wondering if anyone has put together something to work with FPSS? You'd think that JW would want to put something out that would integrate the capabilities of the image manipulation in K2 with the Frontpage Slide Show...

Anyone know of a solution? It would save tons of time to see it work in unison.

Thanks,

Wolf.

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #80050 by FeSys
Replied by FeSys on topic Slides within K2 item
Hi.."Wolf "
Would you mind trying this.. works fine...
URL: extensions.joomla.org/extensions/extension-specific/k2-extensions/12405?qh=YToxOntpOjA7czoyOiJrMiI7fQ%3D%3D

Wolf Kuhlemeier said:Interesting...but am wondering if anyone has put together something to work with FPSS? You'd think that JW would want to put something out that would integrate the capabilities of the image manipulation in K2 with the Frontpage Slide Show...
Anyone know of a solution? It would save tons of time to see it work in unison.

Thanks,

Wolf.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum