I'm editing Supersized module:

  1. First question is: is there anything that can help me to alter module file (supersized.run.inc) that will follow drupal principles (not editing directly module files), and putting edited file somewhere in my theme folder.

  2. I'm figuring it out how to use $page object to put code in a specific place in DOM. Default code (supersized.run.inc line 162):

    if ($settings['components']['thumb_links']) 
    $page['content']['region-content']['block-system']['supersized']['thumb_tray'] = array(
    '#type' => 'markup',
    '#markup' => theme('supersized_thumb_links'),

I'm looking for some resources how to figure it out cause my change:


until I put ['block-system'] after ['region-content']:


The supersized 'thumb_tray' html content is still in region-content:

<div class="region region-content">
  <div id="block-system-main" class="block block-system">
    <div class="content">
  <div id="thumb-tray" class="load-item" style="display: block; bottom: -320px;">
    <div id="thumb-back" style="display: none;"></div>
    <div id="thumb-forward" style="display: none;"></div>
    <ul id="thumb-list" style="width: 1135px;">
      <li class="thumb0 current-thumb">
        <img src="http://mysite/sites/default/files/styles/supersized-thumbnail/public/image.jpg?itok=i4AsHflj">
  • 1
    I think that 2 separate questions in the same post are something you don't do in this blog. Anyway I notice that Clive edited the question, so I guess it's all right. A few thoughts on the first question: the only way you could write a file to your theme's folder is to make it writable from the web server, and you should never do that because a lot of security issues may arise. You may read the file with fread() and write it to the public file folder. But you wouldn't be able to execute it because of security settings on that folder. Are you sure there's no other way to solve your problem? – pamatt Mar 2 '14 at 14:53
  • First and second question is about the same thing. All code in supersized.run.inc is a supersized_run() function. If I want to change just one line I've got to copy&cut all the function, with 170 including lines? Ther's no subfunctions, just if conditional statements. – maszynka Mar 5 '14 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.