The theme I am using (Green'N'Black) has multiple php files (page, node, template, etc.) and I cannot find the preprocess_page. Perhaps I am looking in the wrong place. Is it in a Drupal 5 php file. Please advise? Thank you.
The theme I am using (Green'N'Black) has multiple php files (page, node, template, etc.) and I cannot find the preprocess_page. Perhaps I am looking in the wrong place. Is it in a Drupal 5 php file. Please advise? Thank you.
Comments
Comment #1
toemaz commentedGood question. I use the zen theme a lot to do my theming and perhaps I made a mistake by assuming that the yourtheme_preprocess_page(&$vars) is in all themes available. My mistake.
For Drupal 5 & phptemplate based themes, you need to adjust or insert _phptemplate_variables function into your theme template.php file.
Could you test this?
If you succeed, I will adjust the install instructions for this module.
Comment #2
LynnLubell commentedI've had a lot of drupal brain damage today (pathauto bulk update) and would appreciate it very much if you could show me where to make the modification. The template.php file is below. Thanks!
------------------------------------------------------------------------------------
application/x-httpd-php template.php
PHP script text
Comment #3
LynnLubell commentedPerhaps it's in this file?
application/x-httpd-php page.tpl.php
HTML document text
@import "print $language " xml:lang="
print $language">print $head_titleprint $headprint $stylesprint $scriptsprint base_path() . path_to_theme()/ie6-fix.css"; $(document).ready(function(){ $(document).pngFix(); });}print $header;if ($logo) {print $base_path " title="
print $logo " alt="
print t('Home')">print t('Home')" />
print $base_path " title="}if ($site_name) {print t('Home')">print $site_name}if ($site_slogan) {print $site_slogan}if (isset($secondary_links)) {print theme('links', $secondary_links)}if (isset($primary_links)) {print theme('links', $primary_links)}print $sub_headerprint $search_boxprint $breadcrumbif ($content_top) { print $content_top; }if ($title) {print $title}if ($tabs) {print $tabs}print $helpprint $messagesprint $top_content;print $content;if ($sidebar_left) {print $sidebar_left;}if ($sidebar_right) {print $sidebar_right;}print theme('links', $primary_links); print greenNblack_footer($footer_message);print $closureComment #4
toemaz commentedBe carefull you don't pass on your brain damage to me with throwing all this php code ;-)
Could you add the following function into your template.php file:
Comment #5
LynnLubell commentedsorry about that & thanks a million. is there a particular place to ad it? thank you!!
Comment #6
toemaz commentedSo I may presume it worked of for you? If not, please let me know. In the meantime I put the issue on fixed.
Comment #7
LynnLubell commentedI haven't tried it yet. I was hoping to hear back from you on where to place it within the file. Thanks.
Comment #8
toemaz commentedHi Lynn,
There is no specific place to put this in. Anyway, you can try these things and see whether php crashes or not. If so, just restore the file. Don't be afraid of playing a bit with the code.
Comment #9
LynnLubell commentedThanks for your help but I am not there yet. I was able to add the php code without a problem. And I added & enabled the module and input the ad slot I created with admanager and my adsense code. However, when I try to view the blocks I get a white screen. I tried to increase memory but that did not work. What do you suggest? Thank you.
Comment #10
toemaz commentedI propose you look into the webserver (e.g. apache) error log files or ask professional help from a Drupal coder.
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.