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.
  • 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

order methylprednisolone

order methylprednisolone online http://allergicpls.com/ write research paper for me Bjrkro pcytxo

essay writers online

essay writers online http://essaynyc.com/ buy an essay paper Jbdkys hctjbx

Thanks for every other

Thanks for every other informative site. The place else could I get that kind
of information written in such an ideal manner? I have a project that I'm just now operating on, and I have been at the glance out for
such information.

Hey! I know this is somewhat

Hey! I know this is somewhat off topic but I was
wondering which blog platform are you using for this website?
I'm getting tired of Wordpress because I've had problems with
hackers and I'm looking at options for another platform.
I would be awesome if you could point me
in the direction of a good platform.

term papers help

term papers help http://essay2y.com/ write thesis Skvmxf yhfxmp

Fantastic items from you,

Fantastic items from you, man. I've take into account your stuff previous to and you're just too wonderful.
I really like what you've got here, really like what you are stating
and the best way by which you assert it. You are making it entertaining and you continue to
take care of to stay it sensible. I can't wait to learn much more from you.
This is actually a terrific web site.

I am regular reader, how are

I am regular reader, how are you everybody? This piece of
writing posted at this web site is actually
good.

betfair casino online

betfair casino online http://casinomnx.com/ gambling games Yvelxn wddbmb

Color Uv Printer goy-026

play casino online

play casino online http://slotsgamb.com/ slot games online Pqrsvf pqrxrj

A111G49PRS New Jewellery Ring

Fendi財布コピー Basin Faucet

is cialis generic

is cialis generic http://cicilisp.com/ vitality ed pills Psprsq uioopg

cialis women

cialis women http://ciardos.com/ cure ed Drhnio qbwtjg

384250-5005 Bamboo Bristles

sildenafil generic name

sildenafil generic name http://shpilipills.com/ home remedies for erectile dysfunction Pulwmk hfzzwl

101873RSP27BR 3m Disposable

178588-3002 100 Percent

cvs pharmacy

cvs pharmacy http://pharmedplls.com/ ed solutions Ilvhub prtzwa

continuously i used to read

continuously i used to read smaller articles or reviews which as well clear their motive,
and that is also happening with this article which I am reading
now.

ブライトリングETA7750搭載 Industrial

Hello! I know this is kind of

Hello! I know this is kind of off topic but I was wondering if
you knew where I could locate a captcha plugin for my comment form?

I'm using the same blog platform as yours and I'm having trouble finding one?
Thanks a lot!

IW371445 Cash Safe Security

China Column Pillar セイコー偽物

グッチバッグスーパーコピー Air Filter

buy tadalafil online reddit

buy tadalafil online reddit http://taedfil.com/ mens ed pills Vqpmyw btirzb

tadalafil 10mg

tadalafil 10mg http://tadstrong.com/ best over the counter ed pills Dljksu kqmzab

It is in point of fact a

It is in point of fact a great and useful piece of information. I'm happy that you shared this helpful info with us. Please stay us informed like this. Thanks for sharing.|

Heya this is kinda of off

Heya this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience. Any help would be enormously appreciated!|

Valuable information.

Valuable information. Fortunate me I found your website unintentionally, and I'm stunned why this twist of fate did not happened in advance! I bookmarked it.|

Asking questions are actually

Asking questions are actually good thing if you are not understanding anything completely, however this post provides nice understanding yet.|

I think the admin of this

I think the admin of this website is in fact working hard in support of his website, for the reason that here every data is quality based data.|

Very descriptive post, I

Very descriptive post, I liked that bit. Will there be a part 2?|

Way cool! Some extremely

Way cool! Some extremely valid points! I appreciate you writing this post plus the rest of the website is extremely good.|

Your style is really unique

Your style is really unique compared to other people I've read stuff from. Thanks for posting when you have the opportunity, Guess I will just book mark this blog.|

Hey! I know this is somewhat

Hey! I know this is somewhat off topic but I was wondering if you knew where I could locate a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having trouble finding one? Thanks a lot!|

If you are going for most

If you are going for most excellent contents like me, just pay a visit this web page daily because it presents feature contents, thanks|

Hi, after reading this

Hi, after reading this remarkable post i am too cheerful to share my knowledge here with friends.|

Generally I don't read

Generally I don't read article on blogs, but I wish to say that this write-up very forced me to check out and do it! Your writing taste has been surprised me. Thanks, very great post.|

Nice weblog right here! Also

Nice weblog right here! Also your web site a lot up fast! What host are you the use of? Can I get your affiliate link for your host? I desire my website loaded up as fast as yours lol|

Thanks for another excellent

Thanks for another excellent post. Where else could anybody get that kind of info in such a perfect way of writing? I've a presentation next week, and I am at the look for such info.|

Hi there, its pleasant piece

Hi there, its pleasant piece of writing about media print, we all be familiar with media is a great source of facts.|

This is very interesting,

This is very interesting, You're a very skilled blogger. I've joined your feed and look forward to seeking more of your excellent post. Also, I have shared your web site in my social networks!|

Hi there, I discovered your

Hi there, I discovered your web site by way of Google at the same time as searching for a related matter, your website came up, it appears good. I have bookmarked it in my google bookmarks.

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.