Example #1
0
/**
 * Image assist module support.
 * Using styles in IE
*/
function drupal_theme_80_img_assist_page($content, $attributes = NULL)
{
    $title = drupal_get_title();
    $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
    $output .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">' . "\n";
    $output .= "<head>\n";
    $output .= '<title>' . $title . "</title>\n";
    // Note on CSS files from Benjamin Shell:
    // Stylesheets are a problem with image assist. Image assist works great as a
    // TinyMCE plugin, so I want it to LOOK like a TinyMCE plugin. However, it's
    // not always a TinyMCE plugin, so then it should like a themed Drupal page.
    // Advanced users will be able to customize everything, even TinyMCE, so I'm
    // more concerned about everyone else. TinyMCE looks great out-of-the-box so I
    // want image assist to look great as well. My solution to this problem is as
    // follows:
    // If this image assist window was loaded from TinyMCE, then include the
    // TinyMCE popups_css file (configurable with the initialization string on the
    // page that loaded TinyMCE). Otherwise, load drupal.css and the theme's
    // styles. This still leaves out sites that allow users to use the TinyMCE
    // plugin AND the Add Image link (visibility of this link is now a setting).
    // However, on my site I turned off the text link since I use TinyMCE. I think
    // it would confuse users to have an Add Images link AND a button on the
    // TinyMCE toolbar.
    //
    // Note that in both cases the img_assist.css file is loaded last. This
    // provides a way to make style changes to img_assist independently of how it
    // was loaded.
    $output .= drupal_get_html_head();
    $output .= drupal_get_js();
    $output .= "\n<script type=\"text/javascript\"><!-- \n";
    $output .= "  if (parent.tinyMCE) {\n";
    $output .= "    document.write('<link href=\"' + parent.tinyMCE.getParam(\"popups_css\") + '\" rel=\"stylesheet\" type=\"text/css\">');\n";
    $output .= "  } else {\n";
    foreach (drupal_add_css() as $media => $type) {
        $paths = array_merge($type['module'], $type['theme']);
        foreach (array_keys($paths) as $path) {
            // Don't import img_assist.css twice.
            if (!strstr($path, 'img_assist.css')) {
                $output .= "  document.write('<style type=\"text/css\" media=\"{$media}\">@import \"" . base_path() . $path . "\";<\\/style>');\n";
            }
        }
    }
    $output .= "  }\n";
    $output .= "--></script>\n";
    // Ensure that img_assist.js is imported last.
    $path = drupal_get_path('module', 'img_assist') . '/img_assist.css';
    $output .= "<style type=\"text/css\" media=\"all\">@import \"" . base_path() . $path . "\";</style>\n";
    $output .= '<link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.css" type="text/css" />' . "\n";
    $output .= '<!--[if IE 6]><link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.ie6.css" type="text/css" /><![endif]-->' . "\n";
    $output .= '<!--[if IE 7]><link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.ie7.css" type="text/css" /><![endif]-->' . "\n";
    $output .= "</head>\n";
    $output .= '<body' . drupal_attributes($attributes) . ">\n";
    $output .= theme_status_messages();
    $output .= "\n";
    $output .= $content;
    $output .= "\n";
    $output .= '</body>';
    $output .= '</html>';
    return $output;
}
Example #2
0
function art_submitted_worker($submitted, $date, $name)
{
    $output = '';
    ob_start();
    ?>
<img class="metadata-icon" src="<?php 
    echo get_full_path_to_theme();
    ?>
/images/PostDateIcon.png" width="17" height="18" alt="PostDateIcon"/> <?php 
    $output .= ob_get_clean();
    $output .= $date;
    $output .= '&nbsp;|&nbsp;';
    ob_start();
    ?>
<img class="metadata-icon" src="<?php 
    echo get_full_path_to_theme();
    ?>
/images/PostAuthorIcon.png" width="14" height="14" alt="PostAuthorIcon"/> <?php 
    $output .= ob_get_clean();
    $output .= $name;
    return $output;
}
Example #3
0
<div class="art-Post">
    <div class="art-Post-body">
<div class="art-Post-inner">
    
	<div class="comment<?php 
if ($comment->status == COMMENT_NOT_PUBLISHED) {
    echo ' comment-unpublished';
}
?>
">
<div class="art-PostMetadataHeader">
		<h2 class="art-PostHeader"><img src="<?php 
echo get_full_path_to_theme();
?>
/images/PostHeaderIcon.png" width="27" height="25" alt=""/> 
			<?php 
if ($picture) {
    echo $picture;
}
?>
				<?php 
if ($title) {
    echo $title;
}
?>
				<?php 
if ($new != '') {
    echo $new;
}
?>
<?php

if ($node->nid == 4) {
    ?>
    <div class="map-holder">
      <?php 
    print simpleGmap();
    ?>
      <div id="lotus-map-expand">
        <img src="<?php 
    print get_full_path_to_theme();
    ?>
/images/large-down-arrow.gif" width="28" height="28" alt="Large Down Arrow"/>
        <span><?php 
    print t('Espandi Mappa');
    ?>
</span>
      </div>
    </div>
    <?php 
    print $node->content['body']['#value'];
    ?>
    <?php 
    return;
}
if ($node->nid != 12) {
    ?>
<div class="page-top-images">
<?php 
    loadPrettyPhotoHelpers();
    $imgs = array();
function drupal_13584_img_assist_page($content, $attributes = NULL)
{
    $title = drupal_get_title();
    $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
    $output .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">' . "\n";
    $output .= "<head>\n";
    $output .= '<title>' . $title . "</title>\n";
    $output .= drupal_get_html_head();
    $output .= drupal_get_js();
    $output .= "\n<script type=\"text/javascript\"><!-- \n";
    $output .= "  if (parent.tinyMCE && parent.tinyMCEPopup && parent.tinyMCEPopup.getParam('popups_css')) {\n";
    $output .= "    document.write('<link href=\"' + parent.tinyMCEPopup.getParam('popups_css') + '\" rel=\"stylesheet\" type=\"text/css\">');\n";
    $output .= "  } else {\n";
    foreach (drupal_add_css() as $media => $type) {
        $paths = array_merge($type['module'], $type['theme']);
        foreach (array_keys($paths) as $path) {
            if (!strstr($path, 'img_assist.css')) {
                $output .= "  document.write('<style type=\"text/css\" media=\"{$media}\">@import \"" . base_path() . $path . "\";<\\/style>');\n";
            }
        }
    }
    $output .= "  }\n";
    $output .= "--></script>\n";
    $path = drupal_get_path('module', 'img_assist') . '/img_assist_popup.css';
    $output .= "<style type=\"text/css\" media=\"all\">@import \"" . base_path() . $path . "\";</style>\n";
    $output .= '<link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.css" type="text/css" />' . "\n";
    $output .= '<!--[if IE 6]><link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.ie6.css" type="text/css" /><![endif]-->' . "\n";
    $output .= '<!--[if IE 7]><link rel="stylesheet" href="' . get_full_path_to_theme() . '/style.ie7.css" type="text/css" /><![endif]-->' . "\n";
    $output .= "</head>\n";
    $output .= '<body' . drupal_attributes($attributes) . ">\n";
    $output .= theme_status_messages();
    $output .= "\n";
    $output .= $content;
    $output .= "\n";
    $output .= '</body>';
    $output .= '</html>';
    return $output;
}
function art_compatible_scripts($scripts)
{
    $result = preg_replace('~(<script[^>]+misc/jquery.js)([^<]*)(</script>)~', '<script type="text/javascript" src="' . get_full_path_to_theme() . '/jquery.js$2$3', $scripts);
    return $result;
}
function art_real_path($match)
{
    list($str, $start, $quote, $filename, $end) = $match;
    $full_path = get_full_path_to_theme() . '/images';
    return $start . $quote . $full_path . '/' . $filename . $quote . $end;
}
function art_submitted_worker($date, $author)
{
    $output = '';
    if ($date != '') {
        ob_start();
        ?>
    <img class="art-metadata-icon" src="<?php 
        echo get_full_path_to_theme();
        ?>
/images/PostDateIcon.png" width="17" height="18" alt=""/> <?php 
        $output .= ob_get_clean();
        $output .= $date;
    }
    if ($author != '') {
        ob_start();
        ?>
    <img class="art-metadata-icon" src="<?php 
        echo get_full_path_to_theme();
        ?>
/images/PostAuthorIcon.png" width="18" height="18" alt=""/> <?php 
        if ($output != '') {
            $output .= '&nbsp;|&nbsp;';
        }
        $output .= ob_get_clean();
        $output .= $author;
    }
    return $output;
}
                print ' selected-old';
            }
            ?>
">
                                <span class="color-swatch<?php 
            !processColorSwatch($node->attribute_option_hex_colors[$option->oid][0]) ? print ' dark' : '';
            ?>
" style="background:#<?php 
            print $node->attribute_option_hex_colors[$option->oid][0];
            ?>
;">
                                  
                                  <?php 
            // check if 2 colors are supplied. if so lets make a split color swatch, otherwise print out a space
            if ($node->attribute_option_hex_colors[$option->oid][1]) {
                print '<img class="split-color" src="' . get_full_path_to_theme() . '/color-swatch.php?color1=' . $node->attribute_option_hex_colors[$option->oid][0] . '&amp;color2=' . $node->attribute_option_hex_colors[$option->oid][1] . '&amp;width=15&amp;height=15" />';
            }
            ?>
                                </span>
                                <span class="color-name"><?php 
            print $option->name;
            ?>
</span>
                              </div>

                         <?php 
        }
    }
}
?>
    	               </div>
Example #10
0
function lotusPD_preprocess_page(&$vars, $hook)
{
    $menu_l = menu_tree_all_data("primary-links");
    //$tree = menu_tree_all_data($menu_l);
    $tO = menu_tree_output($menu_l);
    $vars['primary_links'] = $tO;
    $theme_settings = array('themePath' => get_full_path_to_theme());
    drupal_add_js(array('theme' => $theme_settings), "setting");
}