Teljesítménygyilkosok 1. - Főoldal kialakítása

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Leírás

Miután jó ideje foglalkozok teljesítmény optimalizálással (is), gondoltam legyen egy sorozat a könnyen elkövethető hibákról. Már csak legyen kedvem tovább írni. :)

Az első részben egy olyan hibával foglalkozunk, amibe olyan könnyen bele lehet szaladni, mint Frisco Joe Bud Spencer öklébe.

A feladat a következő, írjuk át a drupal főoldalát, egyáltalán nem kell az y mennyiségű node teaser lista, teljesen egyedi felépítésre van szükségünk, mint például az index.hu címplapja.

Ennek az egyik lehetséges módja (amivel teljesen nem értek egyet, mert oldszkúl, nehezen skálázható, nehezen karbantartható, könnyen lehet benne hibázni), hogy saját page-front.tpl.php-t (d6) készítünk, szépen összerakjuk benne a layoutot, és mindenki boldog - csak a rendszergazda veri a fejét a falra, hogy ventillátor kiszédül a szerverből.

És itt jön a gáz: Hogyha a site configuration-ben nem állítunk semmit, az alapértelmezett 'node' oldal marad a főoldal.

Gondold csak végig!

Amikor beindul a drupal, szépen lekérdei az adatokat, amiket a főoldalra neki működési logika alapján ki kell írnia, lerendereli, ezek ott vannak futás során a memóriában, eljut a sminkrétegig és? - Egyszerűen nem csak nem lesz kiírva, mert nincs benne a saját .tpl.php-nkban! Magyarul vagy 20 node-ot elmaszatoltunk sminkrétegből.
Ez azért főleg drupal6-on drága mulatság tud ám lenni, ha pl van 5-6 content type 20-30 mezővel, amik folyamatosan a főoldalra küldenek tartalmakat.

Tehát ha egyedi főoldalad van, és az Oldalbeállításoknál node a főoldal, akkor bizony erőforrást pazarolsz, ami jelentős oldalgenerálási idő növekedést okozhat.

Ebből következik a megoldás is, így vagy úgy takarítsd el a node oldalt a főoldalról:

Panels + Page Manager

Használj panels + page_managert! (d7-en mindenképpen) Skálázható, könnyen módosítható, fenntartható, hosszú távú megoldás (igen valószínű, hogy lesz hozzá update path d8-ra), exportálható, bővíthető. Egyébként a panels részét nem is muszáj használni, ha létrehozol egy mezei home oldalt page managerrel, és nem adsz hozzá variantot, már működni fog.

Node használata

Küldj be egy page típusú node-ot, és állítsd be főoldanak. Ezt csak a nálam is lustábbaknak, egy page típusú node is tartalmaz jónéhány olyan dolgot, amire itt nincs szükségünk, pl felesleges body mező, de akkor már jár hozzá node szintű jogosultság ellenőrzés, lesz egy rakás felesleges tabod.

Saját modulból

Csinálj egy saját modulban saját útvonalat, ami nem csinál semmit. Nekem ez a személyes kedvencem, ha panelsfóbiás oldalon kell dolgozni. Hogy miért? Ezért. Pontosan azt csinálja, ami nekünk kell, se többet, se kevesebbet.

Ehhez mindössze ennyit kell kódolni:

[geshifilter-drupal6]function MYMODULE_menu() { $items = array(); $items['my-home-path'] = array( 'title' => t('Home'), 'description' => t('Home page of MODULE'), 'page callback' => 'MODULE_home', 'access callback' => TRUE, ); return $items; ); function MODULE_home() { return 'Home page'; #csak ha netán valami gyász lenne, tudjuk, ne egy tök pucér oldalunk legyen }[/geshifilter-drupal6]

Temészetesen az ilyen-olyan módon létrehozott path-et ne felejtsd el beállítani kezdőlapnak!

Ezzel a példával azt is próbálnám szemléltetni, hogy milyen könnyű elcseszni valamit drupalban. Sokszor van találkozik az ember egy problémával, kiguglizza/megkérdezi fórumon, ám nem gondol bele a mellékhatásokba.

Hozzászólások

Terrific article! That is the

Terrific article! That is the type of info that should be shared across the net.
Shame on the seek engines for now not positioning this publish higher!
Come on over and consult with my site . Thanks =)

We are a bunch of volunteers

We are a bunch of volunteers and opening a brand new scheme in our community.
Your site offered us with useful info to work on. You have performed an impressive
process and our entire community will be thankful to you.

tadalafil generic cialis

tadalafil generic cialis http://edpll.com/ write me a paper Nlzdls plamut

Hey there! I could have sworn

Hey there! I could have sworn I've been to this site before but after checking through some of the
post I realized it's new to me. Nonetheless, I'm definitely delighted I
found it and I'll be book-marking and checking back frequently!

Great blog! Do you have any

Great blog! Do you have any recommendations for
aspiring writers? I'm hoping to start my own site soon but I'm a little lost on everything.
Would you suggest starting with a free platform like Wordpress or go for a paid option? There
are so many choices out there that I'm completely overwhelmed
.. Any recommendations? Appreciate it!

cialis canadian

cialis canadian http://ciapili.com/ edit letter Hgvxwm juvcjm

ampicillin generic

ampicillin generic http://abiotab.com/ pay for paper writing Eptefn nvopad

order stromectol online

order stromectol online http://antibitc.com/ essays writing Cupopf jprygp

writing dissertation service

writing dissertation service http://writexessays.com/ helpwithassignment Iukirw pjnluh

affordable essays

affordable essays http://payxessays.com/ pay for essay writing uk Otnncl muxdcj

Wonderful post however , I

Wonderful post however , I was wondering if you could write a litte more on this subject?

I'd be very grateful if you could elaborate a little bit more.
Appreciate it!

online casino real money usa

online casino real money usa http://realgamescas.com/ get assignments done online Xwxjiz wcekmh

cialis canadian pharmacy

cialis canadian pharmacy http://strongpha.com/ buy a essay online Romxee bufsdl

What a data of un-ambiguity

What a data of un-ambiguity and preserveness of precious familiarity on the topic of
unexpected feelings.

walmart pharmacy

walmart pharmacy http://phapll.com/ term papers for sale Auptnh gmhdhs

ed pills for sale

ed pills for sale http://pllsed.com/ assignment sites Khrbon elwkwe

Pretty section of content. I

Pretty section of content. I just stumbled upon your site and in accession capital to assert that I get
in fact enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I
achievement you access consistently fast.

Hey there! This is my first

Hey there! This is my first visit to your blog!
We are a collection of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work on. You
have done a outstanding job!

Ridiculous quest there. What

Ridiculous quest there. What occurred after? Good luck!

Excellent blog you have here

Excellent blog you have here but I was curious if you knew of any community forums that cover the same topics talked about here?
I'd really like to be a part of group where I can get feedback from other knowledgeable people that share the same interest.

If you have any recommendations, please let me know.

Thank you!

Great delivery. Solid

Great delivery. Solid arguments. Keep up the amazing
work.

After going over a few of the

After going over a few of the blog posts on your web page, I truly appreciate your way of blogging.

I bookmarked it to my bookmark webpage list and will
be checking back in the near future. Please
check out my web site as well and tell me what
you think.

Hi there, i read your blog

Hi there, i read your blog from time to time and i own a similar one and i was just curious if you get a lot
of spam responses? If so how do you protect against it, any plugin or anything you can suggest?
I get so much lately it's driving me insane so any support is very much appreciated.

seldenafil

seldenafil http://usviagpll.com/ write my term paper Pezwxg dkmpsr

グッチベルトコピー Spc Vinyl

tadalafil 5 mg

tadalafil 5 mg http://edsilap.com/ top essay writers Rbnuxs nuywou

buy tadalafil online

buy tadalafil online http://edsilap.com/ pay essay writing Sgmurw yccljw

Incredible story there. What

Incredible story there. What occurred after? Take care!

I have been surfing online

I have been surfing online more than 4 hours today, yet I never found any interesting article like yours.
It is pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the web will be much more useful
than ever before.

cialis buy overnight

cialis buy overnight http://pisiapills.com/ essay writing assistance Tfmled nhnfaz

Hi there superb website! Does

Hi there superb website! Does running a blog such as this require a great deal of work?
I've very little expertise in computer programming but I was hoping to start my own blog soon. Anyhow, should
you have any suggestions or tips for new blog owners please share.
I know this is off subject but I just had to ask.
Cheers!

China 100l

cialis brand

cialis brand http://edppharmacy.com/ essay writing assistance Jyzhzl njfzff

Greate post. Keep writing

Greate post. Keep writing such kind of information on your page.

Im really impressed by your blog.
Hi there, You've performed a great job. I'll definitely
digg it and individually suggest to my friends. I'm sure they'll be
benefited from this website.

Hey very interesting blog!

Hey very interesting blog!

China Human Use Test Kits For

PRADAバッグコピー Automatic

list of antibiotics for

list of antibiotics for cellulitis http://antibiopll.com/ my father essay writing Oiecby vdnbzu

buy antibiotics kennel cough

buy antibiotics kennel cough http://antibioticxp.com/ write my paper Wvadjg aealby

uti antibiotics

uti antibiotics http://antibioticpl.com/ my best friend essay writing Uyyjnk lnxbmr

Hi there everyone, it's my

Hi there everyone, it's my first pay a quick visit at this website, and post is actually fruitful designed for
me, keep up posting such articles.

silicone tracheostomy tube

buy aristocort fir sale

buy aristocort fir sale http://allergicxl.com/ buy custom research paper Ljjmwk qcvfir

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.