pp képe

Nem, nem léptél csapdába. Rossz a hozzáállásod. Weboldalt nem lehet készíteni, csak működtetni. Vagyis sose lesz vége. :D A másik probléma, mint fentebb írtam egy tanulási folyamatban vagy amikor is a produktum maga lényegtelen. Ha meg akarod tanulni akkor készülj fel rá, hogy többször teljesen újracsinálod az oldalt. Ilyenkor ne aggódj, hogy "jajj, pedig én azt hittem ez gyorsan megy", mivel egyrészt itt a befektetett energia nagy része a képzésedre, önoktatásodra megy el és nem az adott feladat elkészítésére. Másrészt ezt a melót úgy se lehet befejezni, csak abbahagyni. :D

Szóval ha meg akarod tanulni a Drupalt használni, és tudsz is ebbe időt és energiát fektetni akkor használd ki a nagyszerű alkalmat, hisz van egy játéktered konkrét és az életben használható feladatokkal. :D

A morzsamenüt / breadcrumb-ot meg kitörölheted a sminekd page.tpl.php fájljából, de a javaslatom az, hogy inkább barátkozz meg vele, mivel az egy olyan eleme az oldaladnak ami része kell hogy legyen egy modern használható weboldalnak. Olvad el a "Ne törd a fejem!" c. könyvet.

pp

0
0
leonidasz képe

Nagyon köszönöm a tippet drifter!

Az utókornak, ha webáruházat készít valaki a termékek kilistázását viewsal oldja meg, taxonomyval oldja meg a kategóriákat és sok menün, almenün keresztül visz az útja, de emellé kéne működő breadcrumb.
Megoldás:
Menu Trails
http://drupal.org/project/menutrails

1. telepítés
2.bekapcsolás
3.http://euromagnet.hu/admin/build/menu/trails
4. Menutrails menu: amelyik menünél szeretnéd alkalmazni ezt a funkciót. Kérdés még az mivan ha több menü van :) majd ha lesz ilyen kitaláljuk...
5. Categories: Webshop (így neveztem el a szótárat.) Ez alatt fel lesz sorolva az összes kifejezés. Cikis a több100 van :) Majd itt a none helyett kiválasztod azt ami annak a menüje.
pl: kutya kifejezés a kutya menü, a cici kifejezés a cica menü és így tovább :)

Mégeggyszer nagyon köszi a tippet ez vezetett egy olyan megoldáshoz mivel már elég sokat bajlódtam.
Szép napot mindenkinek!

0
0
Csete Attila képe

<?php
// $Id: template.php,v 1.1.2.2 2008/04/20 23:25:07 johnalbin Exp $
 
/**
 * @file
 *
 * OVERRIDING THEME FUNCTIONS
 *
 * The Drupal theme system uses special theme functions to generate HTML output
 * automatically. Often we wish to customize this HTML output. To do this, we
 * have to override the theme function. You have to first find the theme
 * function that generates the output, and then "catch" it and modify it here.
 * The easiest way to do it is to copy the original function in its entirety and
 * paste it here, changing the prefix from theme_ to phptemplate_ or zen_. For
 * example:
 *
 *   original: theme_breadcrumb()
 *   theme override: zen_breadcrumb()
 *
 * DIFFERENCES BETWEEN ZEN SUB-THEMES AND NORMAL DRUPAL SUB-THEMES
 *
 * The Zen theme allows its sub-themes to have their own template.php files. The
 * only restriction with these files is that they cannot redefine any of the
 * functions that are already defined in Zen's main template files:
 *   template.php, template-menus.php, and template-subtheme.php.
 * Every theme override function used in those files is documented below in this
 * file.
 *
 * Also remember that the "main" theme is still Zen, so your theme override
 * functions should be named as such:
 *  theme_block()      becomes  zen_block()
 *  theme_feed_icon()  becomes  zen_feed_icon()  as well
 *
 * However, there are two exceptions to the "theme override functions should use
 * 'zen' and not 'mytheme'" rule. They are as follows:
 *
 * Normally, for a theme to define its own regions, you would use the
 * THEME_regions() fuction. But for a Zen sub-theme to define its own regions,
 * use the function name
 *   eneklesponthu_alap_regions()
 * where eneklesponthu_alap is the name of your sub-theme. For example, the zen_classic
 * theme would define a zen_classic_regions() function.
 *
 * For a sub-theme to add its own variables, instead of _phptemplate_variables,
 * use these functions:
 *   eneklesponthu_alap_preprocess_page(&$vars)     to add variables to the page.tpl.php
 *   eneklesponthu_alap_preprocess_node(&$vars)     to add variables to the node.tpl.php
 *   eneklesponthu_alap_preprocess_comment(&$vars)  to add variables to the comment.tpl.php
 *   eneklesponthu_alap_preprocess_block(&$vars)    to add variables to the block.tpl.php
 */
 
 
/*
 * Initialize theme settings
 */
include_once 'theme-settings-init.php';
 
 
/*
 * Sub-themes with their own page.tpl.php files are seen by PHPTemplate as their
 * own theme (seperate from Zen). So we need to re-connect those sub-themes
 * with the main Zen theme.
 */
include_once './'. drupal_get_path('theme', 'zen') .'/template.php';
 
 
/*
 * Add the stylesheets you will need for this sub-theme.
 *
 * To add stylesheets that are in the main Zen folder, use path_to_theme().
 * To add stylesheets thar are in your sub-theme's folder, use path_to_subtheme().
 */
 
// Add any stylesheets you would like from the main Zen theme.
drupal_add_css(path_to_theme() .'/html-elements.css', 'theme', 'all');
drupal_add_css(path_to_theme() .'/tabs.css', 'theme', 'all');
 
// Then add styles for this sub-theme.
drupal_add_css(path_to_subtheme() .'/layout.css', 'theme', 'all');
drupal_add_css(path_to_subtheme() .'/eneklesponthu_alap.css', 'theme', 'all');
 
// Avoid IE5 bug that always loads @import print stylesheets
zen_add_print_css(path_to_subtheme() .'/print.css');
 
 
 
/**
 * Declare the available regions implemented by this theme.
 *
 * @return
 *   An array of regions.
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_regions() {
  return array(
    'left' => t('left sidebar'),
    'right' => t('right sidebar'),
    'navbar' => t('navigation bar'),
    'content_top' => t('content top'),
    'content_bottom' => t('content bottom'),
    'header' => t('header'),
    'footer' => t('footer'),
    'closure_region' => t('closure'),
  );
}
// */
 
 
/**
 * Return a themed breadcrumb trail.
 *
 * @param $breadcrumb
 *   An array containing the breadcrumb links.
 * @return
 *   A string containing the breadcrumb output.
 */
/* -- Delete this line if you want to use this function
function zen_breadcrumb($breadcrumb) {
  return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .' ›</div>';
}
// */
 
 
/**
 * Override or insert PHPTemplate variables into all templates.
 *
 * @param $vars
 *   A sequential array of variables to pass to the theme template.
 * @param $hook
 *   The name of the theme function being called (name of the .tpl.php file.)
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_preprocess(&$vars, $hook) {
  $vars['sample_variable'] = t('Lorem ipsum.');
}
// */
 
/**
 * Override or insert PHPTemplate variables into the page templates.
 *
 * @param $vars
 *   A sequential array of variables to pass to the theme template.
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_preprocess_page(&$vars) {
  $vars['sample_variable'] = t('Lorem ipsum.');
}
// */
 
/**
 * Override or insert PHPTemplate variables into the node templates.
 *
 * @param $vars
 *   A sequential array of variables to pass to the theme template.
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_preprocess_node(&$vars) {
  $vars['sample_variable'] = t('Lorem ipsum.');
}
// */
 
/**
 * Override or insert PHPTemplate variables into the comment templates.
 *
 * @param $vars
 *   A sequential array of variables to pass to the theme template.
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_preprocess_comment(&$vars) {
  $vars['sample_variable'] = t('Lorem ipsum.');
}
// */
 
/**
 * Override or insert PHPTemplate variables into the block templates.
 *
 * @param $vars
 *   A sequential array of variables to pass to the theme template.
 */
/* -- Delete this line if you want to use this function
function eneklesponthu_alap_preprocess_block(&$vars) {
  $vars['sample_variable'] = t('Lorem ipsum.');
}
// */
 
 
/**
 * Override the Drupal search form using the search-theme-form.tpl.php file.
 */
/* -- Delete this line if you want to use this function
function phptemplate_search_theme_form($form) {
  return _phptemplate_callback('search_theme_form', array('form' => $form), array('search-theme-form'));
}
// */
 
/**
 * Generate the HTML representing a given menu item ID.
 *
 * An implementation of theme_menu_item_link()
 *
 * @param $item
 *   array The menu item to render.
 * @param $link_item
 *   array The menu item which should be used to find the correct path.
 * @return
 *   string The rendered menu item.
 */
/* -- Delete this line if you want to use this function
function zen_menu_item_link($item, $link_item) {
  // If an item is a LOCAL TASK, render it as a tab
  $tab = ($item['type'] & MENU_IS_LOCAL_TASK) ? TRUE : FALSE;
  return l(
    $tab ? '<span class="tab">'. check_plain($item['title']) .'</span>' : $item['title'],
    $link_item['path'],
    !empty($item['description']) ? array('title' => $item['description']) : array(),
    !empty($item['query']) ? $item['query'] : NULL,
    !empty($link_item['fragment']) ? $link_item['fragment'] : NULL,
    FALSE,
    $tab
  );
}
// */
 
/**
 * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
 */
/* -- Delete this line if you want to use this function
function zen_menu_local_tasks() {
  $output = '';
 
  if ($primary = menu_primary_local_tasks()) {
    $output .= '<ul class="tabs primary clear-block">'. $primary .'</ul>';
  }
  if ($secondary = menu_secondary_local_tasks()) {
    $output .= '<ul class="tabs secondary clear-block">'. $secondary .'</ul>';
  }
 
  return $output;
}
// */
 
/**
 * Overriding theme_comment_wrapper to add CSS id around all comments
 * and add "Comments" title above
 */
/* -- Delete this line if you want to use this function
function zen_comment_wrapper($content) {
  return '<div id="comments"><h2 id="comments-title" class="title">'. t('Comments') .'</h2>'. $content .'</div>';
}
// */
 
/**
 * Duplicate of theme_username() with rel=nofollow added for commentators.
 */
/* -- Delete this line if you want to use this function
function zen_username($object) {
 
  if ($object->uid && $object->name) {
    // Shorten the name when it is too long or it will break many tables.
    if (drupal_strlen($object->name) > 20) {
      $name = drupal_substr($object->name, 0, 15) .'...';
    }
    else {
      $name = $object->name;
    }
 
    if (user_access('access user profiles')) {
      $output = l($name, 'user/'. $object->uid, array('title' => t('View user profile.')));
    }
    else {
      $output = check_plain($name);
    }
  }
  else if ($object->name) {
    // Sometimes modules display content composed by people who are
    // not registered members of the site (e.g. mailing list or news
    // aggregator modules). This clause enables modules to display
    // the true author of the content.
    if ($object->homepage) {
      $output = l($object->name, $object->homepage, array('rel' => 'nofollow'));
    }
    else {
      $output = check_plain($object->name);
    }
 
    $output .= ' ('. t('not verified') .')';
  }
  else {
    $output = variable_get('anonymous', t('Anonymous'));
  }
 
  return $output;
}
// */
 
<?php
function SMINKEDNEVE_random_header() {
  $image_num = random(10); //vagy amennyi képed van
  return 'style="background: transparent url(' . base_path() . path_to_theme() . '/header/' . $image_num . '.jpg) no-repeat scroll left top;"';
}
?>

Attila

0
0

Ultimate Gallery

mib képe

Köszönet e cikkért mib kollégának.

Elöljáróban annyit szeretnék megjegyezni, hogy nagyon sok galéria leírás van, viszont egyik sem elégítette ki azt a tudást amit elvárnék, így nekiálltam megcsinálni a sajátomat, amit ugyancsak lehetne még tökéletesíteni (és hogy mit azt majd a végén részletezem), de a célnak megfelel.

Drupal verzió: 
edgarpe képe

A Drupal mindenképpen kell, mert rengeteg funkcióját ki fogjuk használni. Csak éppen lesz néhány olyan oldal amit kézzel szeretnének összerakni.

Én idáig jutottam a megoldásban:

Ennek a funkciónak egy külön tartalomtípus, ahol a HTML tartalmat vagy a body field-be írják bele szép html syntax highlight-tal, vagy egy file field-be feltöltik. Egy másik fieldben (field_html_attachments) pedig beledobálják a css/js/kép fájlokat.

A megjelenítés pedig úgy néz majd ki, hogy a node--static.tpl.php teljesen ki van ürítve, és egyszerűen a html tartalmat (body field vagy feltöltött fájl) jeleníti meg.

A page.tpl.php-bam vannak dolgok, amelyeket adott esetekben el akarnak majd rejteni ezeken az oldalakon:
- title
- breadcrumb
- messages
- sidebars

Ezeknek egy-egy pipát beteszek ebbe a tartalomtípusba és hook_preprocess_page alatt szépen elrejtem ezeket, ha bepipálták az elrejtést.

Igazából ez már majdnem az amit én akartam, "mindössze" annyi a gond, hogy a html/css/js szerkesztése macerás így, illetve csere esetén átneveződik, emiatt aztán hivatkozni nehéz rá a html-ből. Ha az egyszer már feltöltött fájlokat, mondjuk WebDav-val, utólag szerkeszteni lehetne, az tökéletes megoldás lenne.

0
0
Drufan képe

Na, ezt megnézem, hogy a Field Group-ba hol tudok egyedi html elemeket megadni, nem tudtam, hogy van ilyen benne.

Nem, nincs bajom a saját CSS-sel, sőt. Bár eleinte kerültem - nem csak azért, mert nem tudtam a CSS-t :-) - de amikor csináltam egy teljesen sajátot, fantasztikus érzés volt az a szabadság, hogy mindent úgy csinálok, ahogy akarok, nem vagyok kötve. Vagyis ez nem teljesen igaz, mert a Drupal html szerkezetéhez kötve voltam, azt még nem tanultam meg kiváltani, főleg, mivel PHP file-ban van, igaz html kód többnyire a tpl.php.

Aztán meg a CSS-t Flexbox megoldással csináltam, a Drupal viszont még a régi Float megoldást használja, ami nincs ínyemre - nem kell azt használnom, de ha meglévő témát változtatok, akkor értelmezni kell.

Ami miatt nem tetszett a dolog, a saját megjelenés kialakítása, hogy leírás híján a böngésző Webfejlesztő eszközének segítségével kutattam ki, hogy mik a Drupal formázó osztályai, ID-i, ráadásul miután az alap rendszerrel nagyjából végeztem, majd feltettem egy új modult, kezdhettem annál is kideríteni, mit hol állít be, így pedig egy végtelen történet lett volna belőle.

De ez már új fórum téma lenne...

Ui.: Igen, nekem is feltűnt, hogy jé, saját sminkkel nem kell pl. a Menu Breadcrumb modul, stb.

0
0
airzsolt képe

Csinált már valaki az acidfreehez magyar nyelvű fordítást? A modul könyvtárán belüli hu.po fájlra gondolok természetesen. Nem egy nagy meló, de hátha megcsinálta már valaki..

A másik problémám, hogy ha egy több szintű mappába belemegyek, akkor a generált breadcrumbs "Címlap" utáni első része mindig "Albums" lesz, holott a menüpont szövegét "Fotó és videó albumok"-ra változtattam és ez is jelenik meg az első oldalon (a /acidfree linken). Lehet ezen segíteni? Itt a bűnös: még jó nem jó
Úgy látom, az acidfree.module forrásban a acidfree_make_breadcrumbs() fv. csinálja:

function &acidfree_make_breadcrumbs(&$node) {
    $crumbs = Array(l(t('Home'), NULL));
    $parents = _acidfree_get_ancestors($node);
    if (count($parents) > 0) {
        $crumbs[] = l(t('Albums'), 'acidfree');
    }
    if (count($parents) > 1) {
        foreach ($parents as $parent) {
            if ($parent->nid != acidfree_get_root())
            $crumbs[] = l($parent->title, "node/{$parent->nid}");
        }
    }
    return $crumbs;
}

Nagyon kicsit konyítok még a php-hez és a drupalhoz is, de itt az l()-nek és t()-nek van ugye fontos szerepe? Gondolom valami lokalizálás és sminkelés, jól gondolom?

0
0
Nagy Gusztáv képe

Ha modul okozza a gondot, akkor ezek közül valamelyik esélyes

  • AddThis 6.x-2.10
  • Administration menu 6.x-1.6
  • Advanced help 6.x-1.2
  • Backup and Migrate 6.x-2.4
  • CAPTCHA 6.x-2.4
  • Chaos tool suite 6.x-1.8
  • Computed Field 6.x-1.0-beta5
  • Content Construction Kit (CCK) 6.x-2.9
  • Custom Breadcrumbs 6.x-1.5
  • Date 6.x-2.7
  • External Links 6.x-1.11
  • FileField 6.x-3.10
  • ImageAPI 6.x-1.10
  • ImageCache 6.x-2.0-beta12
  • ImageField 6.x-3.10
  • Lightbox2 6.x-1.11
  • Link 6.x-2.9
  • Localization update 6.x-1.0-beta1
  • Masquerade 6.x-1.6
  • Override Node Options 6.x-1.12
  • Pathauto 6.x-1.5
  • Poormanscron 6.x-2.2
  • Profile Privacy 6.x-1.2
  • Protect Critical Users 6.x-1.1
  • Register with Picture 6.x-1.7
  • SpamSpan filter 6.x-1.6
  • Tagadelic 6.x-1.3
  • Token 6.x-1.16
  • Transliteration 6.x-3.0
  • Views 6.x-2.12
  • Wysiwyg 6.x-2.3
0
0

Nagy Gusztáv

Roland73 képe

Köszönöm a segítséget, most már jó is!
Na, erre nem gondoltam, pedig meg néztem már, de azt hittem arra adok jogot, hogy mások is babrálhassák.

Jó, de csak a címlapot tudom meg változtatni úgy, hogy mindenki ugyan azt látja. Nem tesz különbséget a bejelentkezett felhasználó és az anonimus felhasználók között.
Hiába adom meg a címlap útvonalát. Külön beállítottam minden csoport számára más más címlapot, de semmi változás.
?????
Hogyan tovább?

Leírom mit csináltam:

Be nem jelentkezett látogatók
You can paste in the full HTML code for a complete page and include a different style sheet in the HEAD of the document if you want a completely different layout and style to the rest of your site.

A szöveg mezőt üresen hagytam.

Select type:
FULL-ra állítottam

themed
means your default layout, theme and stylesheet will be loaded with your custom front_page.

full
allows you to have a completely different layout, style sheet etc.

redirect
will automatically redirect visitors already logged in to a specific page specified in the REDIRECT TO box.

Redirect to:
http://www.roland73.neobase.hu/node - ez az alapértelmezett címlap, próbáltam csak /node , próbáltam üresen hagyni is

If you have selected REDIRECT you need to specify where the user should be pointed to. If you are not using clean URLs, specify the part after "?q=". If unsure, specify "node".

Be jelentkezett látogatók
Szöveg mező üresen,
Select type: redirect-re
Redirect to:
http://www.roland73.neobase.hu/node/xx ezt akarom lásák bejelentkezés után

Override your HOME breadcrumb links
Redirect your site HOME links
Check this box if you want to redirect users who click on any HOME links (including the HOME breadcrumb link). Useful if you have a splash page you don't want users brought back to when they click on HOME links from within your site.

Redirect your site HOME links to: http://www.roland73.neobase.hu/node/xx

Specify where the user should be redirected to. An example would be node/12. Leave blank when you're not using HOME redirect.

Activate your front_page settings
Alapértelmezett címlap: http://www.roland73.neobase.hu/node
Change this setting to front_page to activate your front page settings.

"Röviden" ennyi. De se így se úgy nem működik.

0
0
pp képe

1.
Adva vagyon a két kategória piros/kék
Létrehozunk két tartalom típust: játékos és csapat néven.
Ezek után - mint a cikkben - létrehozzuk a kategóriákat és kategórizáljuk a tartalmainkat.
Beállítjuk, hogy a csapat mindig az oldalon elején kiemelten szerepeljen.
Ezek után már szerepel a csapat leírása is az adott listázó oldalon.

Én a sorrendezésben látom fő különbséget (ebből a szempontból) a két lehetőség(tax, book) között. A taxonomy-nál a felvitel sorrendjében fordítva jelennek meg a tagok (ráadásul az egy helyen, globálisan beállítható 10 tartalom per oldal limittel). A book modulnál ezt a sorrendet beállíthatom, de csak a címek jelenhetnek meg az egyéb adatok nem.

2. Szerintem ez a feladat(tudom, hogy csak példa!!!) nem igényel sem taxonomy-t sem book modult. Ugyanis az adatok lassan változnak, hisz a csapatok és játékosok oldalai nem frissülnek minden nap, jó ha egy hónap alatt ki lehet mindenkiből húzni a megfelelő szöveget. ;)
Létrehoznék egy menüt Csapatok néven(ez a breadcrumb miatt kell). Létrehoznék a két csapat és a játékosok számára egy-egy oldalt a megfelelő menübeállításokkal. Bekapcsolnám a tinymce-t és szépen behuzaloznám a kapcsolatokat. Megfelelő menüpontokba és almenükbe elhelyezném az oldalakat, a path auto-val meg normális útvonal álneveket rendelnék hozzájuk. Úgy néznének ki az oldalak ahogy nekem tetszik. Még jogot is lehetne adni a két csapatkapitánynak az adatok módosítására(ő lesz a node létrehozója;))

Nyílván egy rendszeres csapatbajnokság oldalát már ezzel a módszerrel nem lehetne megcsinálni, vagyis meg lehetne, de csinálja az akinek nincs jobb dolga. ;)

A lényeg az, hogy a cikk nagyon jó és igazi hiánypótló itt a druapl.hu-n.

pp