sNews Forum

sNews 1.7 (current stable version) => sNews 1.7 themes => Topic started by: mehmetsarr on December 05, 2017, 05:24:43 pm

Title: slider construction
Post by: mehmetsarr 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.
Title: Re: slider construction
Post by: Keyrocks 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?