Need Help making a Drupal Subtheme

xarzu's picture

They have: 24 posts

Joined: May 2007

The theme I am using has a slider -- a panel of automatically changing images to display a topic that the user can choose -- but it only shows a few slides. I want to extend it to a dozen slides. I did simple text searches to determine which files in the theme are used code files to provide the functionality to the slider. That was the easy part. I was able to extend the code from the few slides to 12 slides.

Now comes the more difficult and hidden part. As I see it, each slide has two parts that are not hard coded. First, each slide has a caption -- a text description. Secondly, each slide has a URL associated with it that is where the browser goes if the user clicks on the slide. These two things are not hard coded in any of the PHP or other files, as far as I can tell. They can be edited by the admin in the drupal backend admin settings.

So I assumed that these fields are somehow set and retained in the database. But I did a search on a downloaded copy of the database and I did not find this text.

Please advise. What additional work do I need to do to complete this task?

I suppose I could just forge ahead. Obviously, this data is being stored somewhere. Maybe they are stored in the database in an encrypted form for security reasons. I could do an ftp upload of the site theme files. But then what? Do I uninstall the theme and then reinstall it? Do I just deactivate it and then reactivate it? How do I make my code changes work?

The theme is called "impact_theme" and as far as I can tell all the code for it resides in

sites\all\themes\impact_theme

The README.txt file for the theme is:

About Impact Theme
====================
Impact Theme is a Drupal 7 theme. The theme is not dependent on any
core theme. Its very light weight for fast loading with modern look.
Simple and clean design
Drupal standards compliant
Implementation of a JS Slideshow
Multi-level drop-down menus
Footer with 4 regions
A total of 10 regions
Compatible and tested on IE7, IE8, IE9+, Opera, Firefox, Chrome browsers

Browser compatibility:
=====================
The theme has been tested on following browsers. IE7+, Firefox, Google Chrome, Opera.

Drupal compatibility:
=====================
This theme is compatible with Drupal 7.x.x

Developed by
============
www.devsaran.com

Slideshow photos by http://www.flickr.com/photos/68666702@N00/

Help and Support Us
=====================
Please consider a small donation
Paypal ID : donation@devsaran.com

============================================================================

I made a subtheme according to this page: https://www.drupal.org/docs/7/theming/creating-a-sub-theme.

I logged in to the Administrative Dashboard and I made the subtheme as the default theme.

And then the website immediately crashed and I am unable to see anything apart from "HTTP ERROR 500".

What do you think I should do now?

For completeness sake, I will list here the screenshots I made when I was comparing my modifications to the original theme.

I am thinking what I should do now is try to step back and see if I can narrow down the point where the website crashes. But in order to do that, I wonder if it will do any good to just modify the files. I mean, the subtheme is already set as the default theme. How can I undo that without being able to log into the Admin Dashboard?

arguemax.com\images\30221819_10213444272035350_3379677097701146624_o.jpg

arguemax.com\images\30123766_10213444272355358_3182263611749826560_o.jpg

arguemax.com\images\29792681_10213444272435360_6669795223813488640_o.jpg

arguemax.com\images\29791776_10213444272995374_1613507621266915328_o.jpg

arguemax.com\images\29791466_10213444271875346_2211109040119873536_n.jpg

Megan's picture

She has: 11,419 posts

Joined: Jun 1999

I installed that theme on a test site to see what was going on here.

Really, this is not a very good way of implementing a slider. It works for an out of the box theme, but as you found out, it breaks down when you want to extend it. Those are just theme settings which are stored as variables. They aren't meant to be used for content.

It would be better to create a content type for your slides and a view to display them. Then there are many slideshow modules you could use to implement the slider (slick or views slideshow are good options). Copy the CSS classes from the theme implementation to your view to make it look the same.

What did you put in your subtheme? All of the code changes in that subtheme? Something is wrong there. It might just need a cache clear but you're not going to be able to do that if you can't log in. It might also be having an issue if it's trying to redeclare functions from the base theme. Try commenting out any custom PHP in your subtheme and try again.

If you're still having trouble, upload a copy of your subtheme and I'll take a look.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.