August 2008

Reset CSS

WC3 validering: 
CSS
Kode (XHTML, PHP, CSS etc.): 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } /* remember to define focus styles! */ :focus { outline: 0; } /* remember to highlight inserts somehow! */ ins { text-decoration: none; } del { text-decoration: line-through; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; }

Joomla udvidelser

Udvidelser til Joomla

Joomla og Quick Icons

Joomla og Quick Icons - Joomla 1.0x - desværre ikke Joomla 1.5x

Forside nyheder i Joomla - Avis

Skal man vise nyheder fra sections og kategorier på forsiden .... som en avis eller portal er dette lille modul ganske fint.

Flyt Drupal side fra en server til en anden

Gamle webhotel:
1. Download alle dine filer fra webhotellet.
2. Lav et SQL-dump af din database.

Nyt webhotel:
1. Upload alle dine filer til webhotellet.
2. Importér SQL-dumpet i din database
3. Tilret din settings.php med database oplysningerne
4. Giv de rigtige rettigheder på din files mappe, eller hvad den nu heder i dit system.

Indsæt link og billeder i page.tpl.php Drupal

Kode (XHTML, PHP, CSS etc.): 
****Stil til billed i theme mappen images - når der skal indsættes billeder direkte i page.tpl.php**** ****Link til forside**** FORSIDE

page.tpl.php - Drupal

Content
<?php print $tabs ?>
<?php print $messages ?>
<?php print $help ?>
<?php print $content; ?>

eks.
<?php print $right ?>
eller
<?php print $footer_message . $footer ?>

Til sidst indsætte lige før /body
<?php print $closure ?>

Kode (XHTML, PHP, CSS etc.): 
<?php ?> <?php print $head_title ?> <?php print $head ?> <?php print $styles ?> <?php print $scripts ?>

Drupal theming

Gendan password i Joomla

  • Login i phpMyadmin og vælg databasen
  • Udskift hvad der står i password feltet med = 226776f356d7ecf58b60bab12a05d38
  • Det nye password er nu joomla

TinyMCE og IMCE (WYSIWYG og BILLEDER)

Drupal med WYSIWYG-editor og mulighed for at indsætte og uploade billeder.
Kode (XHTML, PHP, CSS etc.): 
<?php function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) { static $access, $integrated; if (!isset($access)) { $access = function_exists('imce_access') && imce_access(); } $init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running); if ($init && $access) { $init['file_browser_callback'] = 'imceImageBrowser'; if (!isset($integrated)) { $integrated = TRUE; drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline'); } } return $init; } ?>