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

Very great post. I just

Very great post. I just stumbled upon your blog and wished to mention that I've really loved browsing your blog posts. After all I will be subscribing to your rss feed and I am hoping you write once more soon!|

This website truly has all of

This website truly has all of the information and facts I wanted about this subject and didn't
know who to ask.

It's a shame you don't have a

It's a shame you don't have a donate button! I'd most certainly donate to this fantastic blog! I suppose for now i'll settle for book-marking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this website with my Facebook group. Chat soon!|

What's Going down i'm new to

What's Going down i'm new to this, I stumbled upon this I have discovered It positively helpful and it has aided me out loads. I'm hoping to contribute & help different users like its aided me. Great job.|

Great web site. A lot of

Great web site. A lot of useful info here. I am sending it to some friends ans additionally sharing
in delicious. And naturally, thanks in your sweat!

Hi! This is my first comment

Hi! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading through your blog posts. Can you recommend any other blogs/websites/forums that deal with the same subjects? Thank you!|

{

{

Greetings from Los angeles!

Greetings from Los angeles! I'm bored at work so I decided to
browse your blog on my iphone during lunch break. I love the info you
present here and can't wait to take a look when I get home.
I'm shocked at how fast your blog loaded on my cell phone ..
I'm not even using WIFI, just 3G .. Anyhow, awesome blog!

If you want to get much from

If you want to get much from this paragraph then you have to apply such techniques to your won weblog.|

Hey! I know this is kind of

Hey! 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!|

Hi there just wanted to give

Hi there just wanted to give you a brief heads up and let
you know a few of the images aren't loading correctly. I'm not sure why but I
think its a linking issue. I've tried it in two different internet browsers and both show the same results.

}

}

Hello, I enjoy reading all of

Hello, I enjoy reading all of your article post. I like to
write a little comment to support you.

Thank you for some other

Thank you for some other fantastic post. Where else may anyone get that type of info in such a perfect means of writing? I have a presentation subsequent week, and I'm on the look for such info.|

What's up i am kavin, its my

What's up i am kavin, its my first occasion to commenting anyplace, when i read this paragraph i thought i could also create comment due to this brilliant paragraph.|

Superb website you have here

Superb website you have here but I was curious if you
knew of any message boards that cover the same topics discussed here?
I'd really love to be a part of community where I can get responses from
other experienced people that share the same interest. If you have
any suggestions, please let me know. Thanks a lot!

This post offers clear idea

This post offers clear idea for the new viewers of blogging, that truly how to do blogging.|

You actually make it appear

You actually make it appear so easy with your presentation however I in finding this topic to be really one thing which I believe I'd by no means understand. It kind of feels too complicated and very vast for me. I am looking forward on your next submit, I'll try to get the hang of it!|

bookmarked!!, I love your web

bookmarked!!, I love your web site!

I read this piece of writing

I read this piece of writing completely about the comparison of most up-to-date and earlier technologies, it's awesome article.|

Simply wish to say your

Simply wish to say your article is as surprising.
The clarity in your post is simply great and i can assume you are an expert
on this subject. Fine with your permission allow me to
grab your RSS feed to keep up to date with forthcoming post.
Thanks a million and please carry on the gratifying work.

Nice response in return of

Nice response in return of this question with genuine arguments and explaining the whole thing regarding that.|

Thanks for the good writeup.

Thanks for the good writeup. It in fact used to be a enjoyment account it. Look advanced to more added agreeable from you! However, how can we be in contact?|

I feel that is one of the

I feel that is one of the most vital information for me.
And i am glad reading your article. But should remark on some common things, The site taste is wonderful, the articles
is truly nice : D. Just right task, cheers

Hey would you mind stating

Hey would you mind stating which blog platform you're using? I'm planning to start my own blog soon but I'm having a hard time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something unique. P.S Sorry for getting off-topic but I had to ask!|

Hi there very nice website!!

Hi there very nice website!! Man .. Beautiful .. Wonderful .. I'll bookmark your web site and take the feeds also? I'm happy to search out numerous useful information here in the publish, we need develop more strategies in this regard, thanks for sharing. . . . . .|

Genuinely when someone

Genuinely when someone doesn't know after that its up to other visitors that
they will assist, so here it occurs.

Quality posts is the key to

Quality posts is the key to invite the people to pay a quick visit the website, that's what this site is providing.|

Fine way of telling, and good

Fine way of telling, and good paragraph to take information regarding my presentation topic, which i am going to deliver in school.|

Hi it's me, I am also

Hi it's me, I am also visiting this web site regularly, this web page is really fastidious and the people are really
sharing fastidious thoughts.

Do you have a spam issue on

Do you have a spam issue on this site; I also am a blogger, and I was curious about your situation; many of us have created some nice practices and we are looking to swap solutions with others, why not shoot me an email if interested.|

I like the helpful

I like the helpful information you provide on your articles.
I'll bookmark your blog and test once more here regularly.

I'm fairly certain I will learn plenty of new stuff proper right here!
Good luck for the following!

I think this is one of the

I think this is one of the most significant information for me.
And i am glad reading your article. But wanna remark on some general things,
The site style is ideal, the articles is really nice
: D. Good job, cheers

It is in point of fact a

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

houseyorgrim. raviraj.

It's the best time to make

It's the best time to make some plans for the longer term and it is time to be happy. I've learn this post and if I could I want to counsel you some interesting things or advice. Perhaps you could write subsequent articles relating to this article. I desire to learn even more things approximately it!|

I savor, result in I

I savor, result in I discovered just what I was having a look for. You have ended my 4 day lengthy hunt! God Bless you man. Have a great day. Bye|

Hmm it seems like your

Hmm it seems like your website ate my first comment
(it was extremely long) so I guess I'll just sum it up what I submitted
and say, I'm thoroughly enjoying your blog. I too am an aspiring blog blogger but I'm still new to everything.
Do you have any tips for inexperienced blog writers? I'd genuinely appreciate it.

For most up-to-date news you

For most up-to-date news you have to pay a visit web and on world-wide-web I found this web page as a finest web site for most up-to-date updates.|

Hello it's me, I am also

Hello it's me, I am also visiting this web page regularly, this web page is actually fastidious and the people are in fact sharing nice thoughts.|

Right away I am ready to do

Right away I am ready to do my breakfast, afterward having my breakfast coming again to
read other news.

It's going to be end of mine

It's going to be end of mine day, however before end I am reading this fantastic article to improve my experience.|

This site truly has all of

This site truly has all of the information I needed concerning this subject and didn't know who to ask. |

Attractive part of content. I

Attractive part of content. I simply stumbled upon your site and in accession capital
to assert that I acquire actually loved account your weblog posts.
Anyway I will be subscribing to your augment or even I success you get entry
to constantly fast.

Hello! I understand this is

Hello! I understand this is kind of off-topic but I had to ask. Does managing a well-established blog such as yours require a lot of work? I'm completely new to writing a blog however I do write in my diary every day. I'd like to start a blog so I will be able to share my personal experience and thoughts online. Please let me know if you have any ideas or tips for new aspiring blog owners. Thankyou!|

Hi! Someone in my Facebook

Hi! Someone in my Facebook group shared this site with us so I came to take a look. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers! Wonderful blog and excellent design and style.|

Please let me know if you're

Please let me know if you're looking for a article writer for your blog.
You have some really great articles and I think I would
be a good asset. If you ever want to take some of the load off,
I'd really like to write some material for your blog in exchange for a link
back to mine. Please shoot me an e-mail if interested.
Thanks!

Fine way of telling, and

Fine way of telling, and pleasant piece of writing to get data concerning my presentation topic, which i am going to deliver in college.|

Pretty great post. I just

Pretty great post. I just stumbled upon your weblog and wished to mention that I've truly enjoyed surfing around your weblog posts. In any case I'll be subscribing for your feed and I'm hoping you write once more soon!|

Generally I don't read post

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

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.