Ezt kell átalakítanod
Permalink Beküldte vikicica22 - 2014. augusztus 30. 00.15
- kérdés:
Ezt kell átalakítanod (azaz a smiked template.php fájljába bemásolod az egész függvényt, a függvénynévben a "theme" szót kicseréled a sminked nevére).
- function theme_date_nav_title($params) {
- $granularity = $params['granularity'];
- $view = $params['view'];
- $date_info = $view->date_info;
- switch ($granularity) {
- case 'year':
- $title = $date_info->year;
- $date_arg = $date_info->year;
- break;
- case 'month':
- $title = date_format_date($date_info->min_date, 'custom', $format);
- $date_arg = $date_info->year .'-'. date_pad($date_info->month);
- break;
- case 'day':
- $title = date_format_date($date_info->min_date, 'custom', $format);
- $date_arg = $date_info->year .'-'. date_pad($date_info->month) .'-'. date_pad($date_info->day);
- break;
- case 'week':
- $title = t('Week of @date', array('@date' => date_format_date($date_info->min_date, 'custom', $format)));
- $date_arg = $date_info->year .'-W'. date_pad($date_info->week);
- break;
- }
- // Month navigation titles are used as links in the mini view.
- $url = date_pager_url($view, $granularity, $date_arg, TRUE);
- }
- else {
- return $title;
- }
- }
- kérdés:
style.css - kell tenni- .calendar-calendar .today .mini-day-off {
- background: none repeat-x scroll left top #fff;
- color: #ff0000;
- }
- A hozzászóláshoz regisztráció és bejelentkezés szükséges
Akkor ez lehet egy jQuery-s
Akkor ez lehet egy cache-es jQuery-s megoldás, ha el nem rontom:
template.php-ba:
function SMINKEDNEVE_preprocess_html(&$variables) { if (drupal_is_front_page()) { } }
És kell maga a script fájl, amit ebben az esetben közvetlenül a smink könyvtárába kell tenni, és ez legyen benne (ez fapados lett, mert most nem szórakoztam a range segédfüggvénnyel):
script.js
(function ($) { Drupal.behaviors.classChanger = { attach: function (context, settings) { var c = ""; case 0: c = "grey"; break; case 1: c = "grey"; break; case 2: c = "grey"; break; case 3: c = "grey"; break; case 4: c = "grey"; break; case 5: c = "grey"; break; case 6: c = "grey"; break; case 7: c = "grey"; break; case 8: c = "yellow"; break; case 9: c = "yellow"; break; case 10: c = "yellow"; break; case 11: c = "yellow"; break; case 12: c = "blue"; break; case 13: c = "blue"; break; case 14: c = "blue"; break; case 15: c = "blue"; break; case 16: c = "orange"; break; case 17: c = "orange"; break; case 18: c = "orange"; break; case 19: c = "orange"; break; case 20: c = "black"; break; case 21: c = "black"; break; case 22: c = "black"; break; case 23: c = "gray"; break; } $("body").addClass(c); } } })(jQuery);
- A hozzászóláshoz regisztráció és bejelentkezés szükséges




Tudom, hogy nem nekem írtad,de most meg kell,hogy védjem Petiket
Tudom, hogy nem nekem írtad, de most speciel meg kell, hogy védjem Petiket, az általam linkelt jQuery plugin is ugyanúgy
marquee-taget használ (tehát látni bennemarquee-taget!), a hagyományoshoz hasonlóan, csak kicsit szebben testreszabható módon. :)Itt a kódjából a lényeg:
A
demoosztállyal ellátott diven belül van a lényeg igazából, szóval ott ismarquee-tag van.A hozzá tartozó jQuery-kód:
http://remysharp.com/2008/09/10/the-silky-smooth-marquee/
Itt még fontos infókat írnak: