Add a type of slide
-
Hi,
I’m using your slideshow plugin for some specific uses so I would like to create my own type of slides so that I don’t need to put too much html code in Text Slides.
I managed to create the button in the admin panel, but when I click it, no box is added to the list below.
There are no javascript error as I created the function slideshowSlideInserterInsertTeamSlide in slide-insert.jsI guess the problem is I didn’t found every file I had to modify, that’s why I’m asking here what I missed. Here is the list of the files I modified so far :
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
* classes/SlideshowPluginPostType.php I added "SlideshowPluginSlideInserter::getTeamSlideInsertButton() ." at line 206 so that the button is displayed in the admin * classes/SlideshowPluginSlideInserter.php I created the getTeamSlideInsertButton function which is the same as other functions of this type : I just changed the file which is included. * js/SlideshowPluginSlideInserter/slide-inserter.js I created the slideshowSlideInserterInsertTeamSlide function with basically the same code as slideshowSlideInserterInsertTextSlide. I only changed attributes of the TeamSlide object : // Set names to be saved to the database teamSlide.find('.title').attr('name', 'slides[0][title]'); teamSlide.find('.personne').attr('name', 'slides[0][personne]'); teamSlide.find('.photo').attr('name', 'slides[0][photo]'); teamSlide.find('.description').attr('name', 'slides[0][description]'); teamSlide.find('.type').attr('name', 'slides[0][type]'); teamSlide.find('.slide_order').attr('name', 'slides[0][order]');
I also added the click function :
/** * Insert team slide into the sortable list when the Insert Team Slide button is clicked */ jQuery('#slideshow-insert-team-slide').click(function(){ slideshowSlideInserterInsertTeamSlide(); });
For the display, I will add frontend and backend files (I didn’t create these for now) but I don’t think this could interfere in the admin panel.
So there I am, I searched in other files but I didn’t find what was needed.
http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
- The topic ‘Add a type of slide’ is closed to new replies.