Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: slider construction  (Read 909 times)

mehmetsarr

  • Newbie
  • *
  • Karma: 0
  • Posts: 1
slider construction
« on: December 05, 2017, 05:24:43 pm »

Hi, I want to make a slider. I have a responsive html theme with a slider, how do I make it into a module.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: slider construction
« Reply #1 on: March 24, 2018, 02:06:04 am »

Sorry it's been a long time since you've had a reply. I assume your theme package includes the html slider script and any jquery file(s) included with it. If so, the next step would be to create a PHP function to generate the slider ... using the html slider script as the foundation. Doing it this way you would then be able to add the function tag into your index.php file where you want the slider to appear.

For example:
The new function:
Code: [Select]
function slider () {
// escape PHP
?>
(....... add your slider's html script here ......)
<?php // back to PHP
}

The function tag to be added to your index.php file (where you want the slider to display:
Code: [Select]
<?php slider(); ?>

Can you provide a link to the actual theme package you are using?
« Last Edit: March 24, 2018, 02:18:32 am by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU