Adding slots for more than 20 slides

More
2 weeks 2 hours ago #47350 by Giorjoom
Is there any way to encrease the number of slots for the slides? Actually the extension has the limit of 20 and I would need 30 or more slides. Thanks.

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

More
1 week 6 days ago - 1 week 6 days ago #47352 by milos
Hello,

First of all it's not easy. You need some PHP experience. Make backups and if your site is broken after edits, restore original files.

1. You need to edit file mod_hot_swipe_carousel.xml and look for this part:
			<fieldset name="image20" label="LABEL_IMAGE20">
				<field name="enableSlide20" type="list" default="false" label="LABEL_ENABLE_SLIDE" description="DESC_ENABLE_SLIDE">
					<option value="true">Enable</option>
					<option value="false">Disable</option>
				</field>
				<field name="image20" type="media" default="" label="LABEL_IMAGE" />
				<field name="imageAlt20" type="text" default="" label="LABEL_IMAGE_ALT" />
				<field name="imageHeading20" type="text" default="" label="LABEL_HEADING" filter="raw" />
				<field name="imageText20" type="textarea" cols="30" rows="10" default="" label="LABEL_TEXT" description="DESC_TEXT" filter="raw" />
				<field name="priority20" type="list" default="20" label="LABEL_PRIORITY" description="DESC_PRIORITY">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
					<option value="11">11</option>
					<option value="12">12</option>
					<option value="13">13</option>
					<option value="14">14</option>
					<option value="15">15</option>
					<option value="16">16</option>
					<option value="17">17</option>
					<option value="18">18</option>
					<option value="19">19</option>
					<option value="20">20</option>
				</field>
			</fieldset>

You should add more option values:
					<option value="21">21</option>
					<option value="22">22</option>

etc.

You should copy this part of code multiply it, but in each instance change 20 with 21, 22, etc. This is example with for 21th slide (if you have overall 22 slides):
			<fieldset name="image21" label="LABEL_IMAGE21">
				<field name="enableSlide21" type="list" default="false" label="LABEL_ENABLE_SLIDE" description="DESC_ENABLE_SLIDE">
					<option value="true">Enable</option>
					<option value="false">Disable</option>
				</field>
				<field name="image21" type="media" default="" label="LABEL_IMAGE" />
				<field name="imageAlt21" type="text" default="" label="LABEL_IMAGE_ALT" />
				<field name="imageHeading21" type="text" default="" label="LABEL_HEADING" filter="raw" />
				<field name="imageText21" type="textarea" cols="30" rows="10" default="" label="LABEL_TEXT" description="DESC_TEXT" filter="raw" />
				<field name="priority21" type="list" default="20" label="LABEL_PRIORITY" description="DESC_PRIORITY">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
					<option value="6">6</option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
					<option value="11">11</option>
					<option value="12">12</option>
					<option value="13">13</option>
					<option value="14">14</option>
					<option value="15">15</option>
					<option value="16">16</option>
					<option value="17">17</option>
					<option value="18">18</option>
					<option value="19">19</option>
					<option value="20">20</option>
					<option value="21">21</option>
					<option value="22">22</option>
				</field>
			</fieldset>

2. Edit file mod_hot_swipe_carousel.php and in this code change 20 with your final number of slides:
for ($loop = 1; $loop <= 20; $loop += 1) {
	$enableSlide[$loop] = $params->get('enableSlide'.$loop,'');
}

for ($loop = 1; $loop <= 20; $loop += 1) {
	$image[$loop] = $params->get('image'.$loop,'');
}

for ($loop = 1; $loop <= 20; $loop += 1) {
	$imageAlt[$loop] = $params->get('imageAlt'.$loop,'');
}

for ($loop = 1; $loop <= 20; $loop += 1) {
	$imageHeading[$loop] = $params->get('imageHeading'.$loop,'');
}

for ($loop = 1; $loop <= 20; $loop += 1) {
	$imageText[$loop] = $params->get('imageText'.$loop,'');
}

for ($loop = 1; $loop <= 20; $loop += 1) {
	$priority[$loop] = $params->get('priority'.$loop,'');
}

3. Edit file /tmpl/default.php in this part change 20 with your final number of slides:
for ($priority_loop = 1; $priority_loop <= 20; $priority_loop += 1) {
            for ($loop = 1; $loop <= 20; $loop += 1) {

Change number 20 with new number of your slides in all instances.

Best regards,
Milos

p.s. If you are unable to make this, our developer can handle that for you and test it on your site for $30.
Last edit: 1 week 6 days ago by milos.
The following user(s) said Thank You: Giorjoom

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

More
1 week 6 days ago #47353 by Giorjoom
Best service EVER and with fair, reasonable option. Thanks!

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

Moderators: milos
Time to create page: 0.111 seconds