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

Greetings! Very helpful

Greetings! Very helpful advice in this particular article! It's the little changes that make the biggest changes. Many thanks for sharing!|

May I just say what a relief

May I just say what a relief to discover somebody who genuinely understands what they're discussing on the net. You actually know how to bring an issue to light and make it important. A lot more people ought to check this out and understand this side of the story. I was surprised you aren't more popular since you surely have the gift.|

It's truly very difficult in

It's truly very difficult in this full of activity life to listen news on Television, so I only use world wide web for that purpose, and take the most recent news.|

You ought to be a part of a

You ought to be a part of a contest for one of the highest quality websites on the internet. I most certainly will recommend this website!|

Way cool! Some very valid

Way cool! Some very valid points! I appreciate you writing this write-up and the rest of the site is really good.|

sildenafil reviews

sildenafil reviews http://sildenafig.com/ erection pills that work Xwpcuq pcemqn

I savor, result in I found

I savor, result in I found exactly what I used to be taking a look for. You have ended my four day lengthy hunt! God Bless you man. Have a nice day. Bye|

wonderful submit, very

wonderful submit, very informative. I wonder why the opposite specialists of this sector do not notice this. You should continue your writing. I'm sure, you have a huge readers' base already!|

Thanks to my father who

Thanks to my father who informed me about this webpage, this weblog is in fact remarkable.|

I got this website from my

I got this website from my buddy who informed me
regarding this web site and now this time I am browsing this site
and reading very informative posts at this time.

We're a group of volunteers

We're a group of volunteers and starting a new scheme in our community. Your website provided us with valuable info to work on. You have done a formidable job and our whole community will be thankful to you.|

I think this is among the

I think this is among the most important info for me. And i'm glad reading your article. But should remark on few general things, The website style is wonderful, the articles is really great : D. Good job, cheers|

Helpful info. Lucky me I

Helpful info. Lucky me I discovered your site by chance, and
I'm shocked why this twist of fate didn't took place in advance!
I bookmarked it.

Heya i'm for the first time

Heya i'm for the first time here. I came across this board and I to find It really useful & it helped me out a lot. I hope to present something again and help others like you helped me.|

What a information of

What a information of un-ambiguity and preserveness of precious know-how about unexpected emotions.|

Hey I am so thrilled I found

Hey I am so thrilled I found your webpage, I really
found you by error, while I was researching on Digg for something
else, Anyhow I am here now and would just like
to say many thanks for a marvelous post and a all round entertaining blog (I also love
the theme/design), I don’t have time to browse it all at
the moment but I have saved it and also added your RSS feeds, so when I have time
I will be back to read a lot more, Please do keep up the excellent jo.

After looking into a number

After looking into a number of the articles on your web page, I truly appreciate your way of writing a blog. I saved as a favorite it to my bookmark webpage list and will be checking back in the near future. Please visit my web site as well and tell me your opinion.|

Hi there, all the time i used

Hi there, all the time i used to check website posts here early in the break of day, for the reason that i like to learn more and more.|

Unquestionably believe that

Unquestionably believe that which you said. Your favorite reason appeared to be on the net the easiest thing to be aware of. I say to you, I certainly get annoyed while people consider worries that they just do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks|

Excellent blog you have got

Excellent blog you have got here.. It's hard to find excellent writing like yours these days. I seriously appreciate individuals like you! Take care!!|

sildenafil online

sildenafil online prescription free http://sildepills.com/ ed medication Huiinh xhjngc

Right now it sounds like

Right now it sounds like Drupal is the best blogging platform available right now.

(from what I've read) Is that what you're using on your blog?

vardenafil online pharmacy

vardenafil online pharmacy http://supervardp.com/ best treatment for ed Ezzwde sgnmsw

levitra online

levitra online http://levitrosx.com/ male ed pills Vzuucd oukmlb

バレンシアガ靴コピー品 China 40kw

ガガミラノコピー Chinese Tea Set

50m Led

スーパーコピーエルメス Granule

At this moment I am going to

At this moment I am going to do my breakfast, after having my breakfast coming over again to read other
news.

Hello there, I discovered

Hello there, I discovered your site by means of Google even as looking for a comparable matter, your web site got here up, it seems good. I have bookmarked it in my google bookmarks.

My relatives every time say

My relatives every time say that I am wasting my time here at web, except I know I am getting know-how all the time by reading thes fastidious posts.|

ミュウミュウ靴コピー Xcmg Crane Manual

always i used to read smaller

always i used to read smaller posts that also
clear their motive, and that is also happening with this article which
I am reading here.

Hi there, I discovered your

Hi there, I discovered your site by means of Google at the same time as searching for a comparable matter, your web site got here up, it seems great. I have bookmarked it in my google bookmarks.

Magnificent goods from you,

Magnificent goods from you, man. I have have in mind your stuff previous to and you are simply too magnificent. I actually like what you've received right here, certainly like what you are stating and the best way in which you assert it. You make it enjoyable and you continue to take care of to keep it smart. I cant wait to read much more from you. That is really a tremendous website.|

Great article, just what I

Great article, just what I was looking for.|

I like the helpful

I like the helpful information you provide in your articles. I'll bookmark your blog and test again here regularly. I'm quite sure I'll be informed lots of new stuff proper here! Good luck for the following!|

I blog quite often and I

I blog quite often and I truly appreciate your content. This article has really peaked my interest. I'm going to take a note of your blog and keep checking for new details about once a week. I subscribed to your Feed too.|

I couldn't resist commenting.

I couldn't resist commenting. Exceptionally well written!|

高品質グッチ指輪コピー Heart Necklace

Hello there! This is kind of

Hello there! This is kind of off topic but I need some help from an established blog. Is it tough to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to start. Do you have any ideas or suggestions? With thanks|

My relatives every time say

My relatives every time say that I am wasting my time here at web, however I know I am getting knowledge all the time by reading thes pleasant articles or reviews.|

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.