DrupalBin
Submit Code
About
Recent Posts
message i get when running openssl s_client -connect 150.203.86.21:443
Fix for Code
Code
add_to_cart_by_sku_contents()
Fix for page.tpl.php
Page.tpl
foreach is beeing disregarded dispite variable is array. Please help. Outside Drupal it works as standalone.php file
foreach is beeing disregarded dispite variable is array inside drupal. Please help. Outside Drupal it works as standalone.php
Fix for filefield implementation in an admin page. "An HTTP error 0 occurred. /drupal/?q=filefield/ahah///"
PHP Code custom.module
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
›
maybe a problem with accents on drupal 6 for theme-settings.php
Fix for maybe a problem with accents on drupal 6 for theme-settings.php
View
Fix
Fixes are not saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Show summary in full view
/** * template.php */ <?php /* * Initialize theme settings */ if (is_null(theme_get_setting('quem_somos_title'))) { global $theme_key; /* * The default values for the theme variables. Make sure $defaults exactly * matches the $defaults in the theme-settings.php file. */ $defaults = array( // <-- change this array 'who_we_are_title' => 'QUEM SOMOS', 'who_we_are_text' => 'Prestamos o <strong>melhor serviço</strong> na área de seguros com os melhores produtos das <strong>principais seguradoras</strong> do mercado', 'made_by' => 1, ); // Save theme settings with the defaults variable_set( str_replace('/', '_', 'theme_'. $theme_key .'_settings'), array_merge($defaults, theme_get_settings($theme_key)) ); // Force refresh of Drupal internals theme_get_setting('', TRUE); } function phptemplate_preprocess_page(&$vars) { $vars['who_we_are_title'] = theme_get_setting('who_we_are_title'); $vars['who_we_are_text'] = theme_get_setting('who_we_are_text'); $madeby = 'Desenvolvido por <a href="avante.com">avante.com</a>.'; $vars['made_by'] = (theme_get_setting('made_by'))? $madeby: ''; } /** * theme-settings.php */ <?php function phptemplate_settings($saved_settings) { /* * The default values for the theme variables. Make sure $defaults exactly * matches the $defaults in the template.php file. */ $defaults = array( 'who_we_are_title' => 'LOL', 'who_we_are_text' => 'LOL2', 'made_by' => 1, ); // Merge the saved variables and their default values $settings = array_merge($defaults, $saved_settings); $form['who_we_are_title'] = array( '#type' => 'textfield', '#title' => t('Title "QUEM SOMOS"'), '#default_value' => 'QUEM SOMOS', '#size' => 30, '#maxlength' => 64, '#description' => t('If is needed, you can change the title "QUEM SOMOS" localized on the front page.'), ); $form['who_we_are_text'] = array( '#type' => 'textarea', '#title' => t('Text of the title "QUEM SOMOS"'), //'#default_value' => 'Prestamos o <strong>melhor serviço</strong> na área de seguros com os melhores produtos das <strong>principais seguradoras</strong> do mercado.', '#default_value' => t('Prestamos o <strong>melhor servico</strong> na area de seguros com os melhores produtos das <strong>principais seguradoras</strong> do mercado.'), '#size' => 100, '#maxlength' => 255, '#description' => t('If is needed, you can change the text of the title "QUEM SOMOS" localized on the front page.'), ); $form['made_by'] = array( '#type' => 'checkbox', '#title' => t('Enable link to developer.'), '#default_value' => $settings['made_by'], '#description' => t('If enabled, the link to developer will appear close of message footer.'), ); return $form; } ?>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal 5
Drupal 6
HTML
INI
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.
See Also:
Order
Title:
URL:
-1
0
1
Title:
URL:
-1
0
1
Any links you'd like to have associated with the post (Drupal.org issue, Wikipedia article, etc).
File attachments
Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.
Attach new file:
The maximum upload size is
1 MB
. Only files with the following extensions may be uploaded:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp phps
.