-
AuthorPosts
-
Rob Hawthorn Friend
Rob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 24, 2009 at 3:50 pm #144564Hi,
I’ve got a problem with the JA Slideshow module, I need to have two slideshow’s along side each other not the standard of just one.I’ve tried copying the JA slideshow module but one displays below the other and I need side by side. To illustrate the point please see the two images below.
I’m guessing I need a line of code in index.php but I’m not sure what to add (I might be completely wrong with that comment)
-
prakash Friend
prakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 25, 2009 at 1:58 am #318507Hi
The problem occurs because of this
<div id="ja-slideshow" class="wrap">
<div class="main clearfix">
<jdoc:include type="modules" name="ja-slideshow" style="raw" />
</div>
</div>here if you see the linke div class main clearfix :
now the main class has a width of 960 px and hence it uses up the entire space for each module
what you will need to do is create a new class with say % width of say 49% and float the module inside this div hence your code could be something like this<div id="ja-slideshow" class="wrap">
<div class="main clearfix">
<div class="newleftposition">
<jdoc:include type="modules" name="ja-slideshow" style="raw" />
</div>
<div class="newrightposition">
<jdoc:include type="modules" name="ja-slideshow" style="raw" />
</div>
</div>
</div>Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 25, 2009 at 10:42 am #318548Thanks prbalge I really appreciate your help, just one thing though I’ve done very very basic work on classes how would I make the code the % of width?
I put the code in you said but without the % width it’s still (obviously) appearing below the first slideshow mod instead of to the right.
Thank you for your help!
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 25, 2009 at 10:56 am #318549to give you an example say for the newleftposition and newrightposition you would need to say
.newleftposition{
float: left;
width: 49%;
}.newrightposition{
float: right;
width: 49%;
}this is just a raw code, you would need to refine it to your requirements
Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 25, 2009 at 11:29 am #318553Ok I’ve tried to make as much progress as possible so I don’t hassle you too much I’ve done the following things but it’s still appearing on different lines
template.css
/* JA Slideshow left */
#ja-slideshow-left {
float: left;
margin: 0;
width: 45%;
padding: 0;
z-index: 10;
}/* JA Slideshow right */
#ja-slideshow-right {
float: right;
margin: 0;
width: 45%;
padding: 0;
z-index: 10;
}index.php
<div id=”ja-slideshow” class=”ja-slideshow-left”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>Should it be 2 divs or 1 div with two elements?
P.s. Sorry for the hassle but I think it’s almost there
Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 25, 2009 at 11:33 am #318554*
index.php
[PHP]
<div id=”ja-slideshow” class=”ja-slideshow-left”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/PHP]prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 25, 2009 at 11:55 am #318556Hi the code u have written would give you wrong result
this would be the right one
<div id="ja-slideshow" class="wrap">
<div class="main clearfix">
<div class="ja-slideshow-left">
<jdoc:include type="modules" name="ja-slideshow-left" style="raw" />
</div>
<div class="ja-slideshow-right">
<jdoc:include type="modules" name="ja-slideshow-right" style="raw" />
</div>
</div>
</div>——————-
<em>@rob_hawthorn 146238 wrote:</em><blockquote>*
index.php
[PHP]
<div id=”ja-slideshow” class=”ja-slideshow-left”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/PHP]</blockquote>Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 25, 2009 at 2:22 pm #318566I’m afraid it’s not showing up at all now
template.css
.ja-slideshow-left{
float: left;
width: 49%;
}.ja-slideshow-right{
float: right;
width: 49%;
}
index.php
[PHP]
<!– //HEADER –>
<?php if ( $this->countModules(‘ja-slideshow’) ) { ?>
<div id=”ja-slideshow” class=”wrap”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/PHP]I’ve got 2 slideshow’s in the Joomla “module manager”>”position”=”ja-slideshow-left” and “ja-slideshow-right”
I’ve got no idea on how to sort this (apart from re-uploading the backup of index.php)
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 25, 2009 at 3:32 pm #318570ofcourse it wont show up because of this line
<?php if ( $this->countModules('ja-slideshow') ) { ?>
you will need to change it to
<?php if ( $this->countModules('ja-slideshow-left') ) { ?>
Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 25, 2009 at 4:13 pm #318577[PHP]
<?php if ( $this->countModules(‘ja-slideshow-left’) ) { ?>
<div id=”ja-slideshow” class=”wrap”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div><?php if ( $this->countModules(‘ja-slideshow-right’) ) { ?>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/PHP]I’ve definitely messed something up now as the site won’t load due to a syntax error
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 26, 2009 at 2:31 am #318628hi
its really difficult to explain without a live site link
if you can give me a live site link then i can let you know where to add what
thanks
Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 26, 2009 at 7:35 am #318642<em>@prbalge 146338 wrote:</em><blockquote>hi
its really difficult to explain without a live site link
if you can give me a live site link then i can let you know where to add what
thanks</blockquote>
Thanks so much. The site’s currently at a temporary location: http://www.cloudwf.com/PMZ/
Rob
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 26, 2009 at 2:33 pm #318714hi
there is an error opening the page…
can you pm me the index.php – copy the entire index.php into a text file and PM me .. I will have a look
Thanks
1 user says Thank You to prakash for this useful post
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
September 26, 2009 at 3:49 pm #318718[php]
<?php if ( $this->countModules(‘ja-slideshow-left’) ) { ?>
<div id=”ja-slideshow” class=”wrap”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div><?php if ( $this->countModules(‘ja-slideshow-right’) ) { ?>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/php]You need to close the IFs and you need an ELSE or ELSEIF.
Running two slideshow at the same time is going to cause hell on your visitors CPU and could even crash older machines/browsers. Be warned!
1 user says Thank You to scotty for this useful post
Rob Hawthorn FriendRob Hawthorn
- Join date:
- September 2014
- Posts:
- 190
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 38
- Thanked:
- 3 times in 1 posts
September 28, 2009 at 9:26 am #318852<em>@scotty 146439 wrote:</em><blockquote>[php]
<?php if ( $this->countModules(‘ja-slideshow-left’) ) { ?>
<div id=”ja-slideshow” class=”wrap”>
<div class=”main clearfix”>
<div class=”ja-slideshow-left”>
<jdoc:include type=”modules” name=”ja-slideshow-left” style=”raw” />
</div><?php if ( $this->countModules(‘ja-slideshow-right’) ) { ?>
<div class=”ja-slideshow-right”>
<jdoc:include type=”modules” name=”ja-slideshow-right” style=”raw” />
</div>
</div>
</div>
[/php]You need to close the IFs and you need an ELSE or ELSEIF.
Running two slideshow at the same time is going to cause hell on your visitors CPU and could even crash older machines/browsers. Be warned!</blockquote>
Thanks for the advice scotty I wasn’t aware of that. A quick slick site is definitely a preference to a gimmick.Because of that I tried to upload an index.php backup and it’s still giving me an error on the site. But I’m confused because shouldn’t a working backup ensure the site functions. I’ve performed quite a bit of work on the site so would really appreciate any help.
-
AuthorPosts
This topic contains 21 replies, has 3 voices, and was last updated by Rob Hawthorn 15 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum