"Done! Now it works AND looks good" - Mads
"Just like the EchoDitto Dev team." - Dan
A Poor Coder's Devel Themer Port for Drupal 5
Let me start by saying I’m not proud of this, it is one of those awful awful hacks which I should be ashamed of and appalled that I would even consider, one of those hideous violations of every coding standard known to good coders throughout the world.
What is this horrid, monstrous bit of code hackery I’m referring to? It’s a simple hack to the theme function which provides a very rudimentary version of some of the theme-level information so elegantly and profoundly usefully exposed by Moshe Weitzman’s Devel Themer module. For various reasons, this hack actually isn’t that egregious; for one it is ONLY FOR USE ON DEVELOPMENT SITES, and therefore does not all into that more loathsome category of coding dark secrets which are injected into codebases in the 11th hour to make Drupal conform to non-Drupal-tuned functional specifications. In addition, the hack allows custom processing of theme output to be included in the info dump for themed blocks, and therefore makes incredibly arduous tasks like finding the source of a missing </div> tag a great deal less awful. Let’s face it (with relish): sometimes hacking core is just the best way to debug difficult problems.
So, enough stalling, just what is this horrible, awful, shameful hack I’ve devised. Well, it’s anticlimactically simple, actually. Just insert the following code into the function theme() declaration in theme.inc just above the return call_user_func_array($functions[$function], $args) call:
<?php
/* BEGIN: poor coders devel themer hack to determine where content is being generated */
if (is_string($rtn)) {
$odivs = substr_count($rtn, '<div');
$cdivs = substr_count($rtn, '</div');
$ne_divs = ($odivs!=$cdivs)?" NE_DIV_TAGS":'';
return "<div class=\"THEMER-DUMP\" style=\"display:none\">\nSTART: " .
$functions[$function] . " ($odivs,$cdivs)$ne_divs\n</div>" . $rtn .
"<div class=\"THEMER-DUMP\" style=\"display:none\">\nEND: " .
$functions[$function] . " ($odivs,$cdivs)\n</div>";
} else {
return $rtn;
}
/* END: poor coders devel themer */
?>This code is tuned for finding unclosed div tags: at the end of every themer output dump is a count of open and close div tags. This was what I needed at the time, but there is no reason why additional data cannot be included. The code should be commented out except when needed and NEVER PUT ON PRODUCTION WEB SITES, but hopefully will be useful to some people (at least until a real port of the Devel Themer functions emerges for Drupal 5).



Comments
Thanks a lot for this. I like it.
Yeah, it is a bit dirt, but i need this hack :-)
Thanks!
Thanks a lot u kaptiniz benden gidiyonuz mk.: )
Give please. The toughest thing about success is that you've got to keep on being a success. Talent is only a starting point in this business. You've got to keep on working that talent. Someday I'll reach for it and it won't be there.
I am from Norway and , too, and now am writing in English, give please true I wrote the following sentence: "Essential form that if they have one withdrawal product per dependence, they are very embedded."
With love :P, Hank.
Good afternoon. The advantage of a classical education is that it enables you to despise the wealth that it prevents you from achieving. Help me! Help to find sites on the: Maxiglide by maxius hair straightener. I found only this - maxiglide official. Millington has even married in the house savings blade: the percent, as original blood investment, bolt. What investment advisers do. With respect :mad:, Kissa from Pakistan.
Just passing by, tripped over your site really. Still, looks nice.
I am from Antigua and now study English, please tell me right I wrote the following sentence: "Rihanna's stylefashion has n't been made as a fashion mixture."
THX :D, Yonah.
Hi guys. Guard your honor. Let your reputation fall where it will. And outlive the bastards.
I am from Denmark and learning to write in English, give true I wrote the following sentence: "Large facial eye body is plucking a effective area these seconds unlike in the day, that it was especially follicles who wanted most of their simple fact."
Thank you so much for your future answers 8-). Denna.
Hello. If you would be a real seeker after truth, it is necessary that at least once in your life you doubt, as far as possible, all things.
I am from Marino and learning to read in English, please tell me right I wrote the following sentence: "I temporarily rid it even and have not electric fever on facials, but removal like this."
Thanks for the help 8), Bente.
good guidelines
good guidelines
good guidelines the Devel Themer functions emerges for Drupal 5).
hi thanks for the guide
Greeting. Truly great madness cannot be achieved without significant intelligence.
I am from Portugal and now study English, give please true I wrote the following sentence: "Norihiko yokoya: yokoya directly involves in round iii, and is failed with money."
Thank you very much :-D. Lysa.
thenk you admin mcx
chat -As far as bluetooth goes,chat - you couldsohbet have it give you directions via headset when not in a phone call, butNetlog then switch to a display-only mode while on a call. Either way a docking station would definitely be a necessity, preferably with the option to charge through a power point in the vehicle while dockedsohbet - thenk you admin
very nice article.Thanks.
saol kanka hepsi cok iyi sohbetozel icin sohbet alem de canli muhabbet icin chat canli tv icin lifeyourlife canli tv good photos thanks you webmastervideo ozel icin dizi izle dizi izlemek icin sicak videolar türbanl? siki? sohbetcafe sohbet web rehberi sitesi web-rehberi sikis izle sikistube photo albums sikistube porno izle mirc
dizi ler icin dizi izle sinema filmleri videoozel sinema filmleri canli futbol maç izle yurdumuz google blog sozel com sohbet sac ekim icin saç ekimi google arama lig tv izle google blog revizyonileorganizematbaacilikbrnckvvtmllttrhaberi video izle sohbet chat
saol kanka hepsi cok iyi sohbetozel icin sohbet alem de canli muhabbet icin chat canli tv icin lifeyourlife canli tv good photos thanks you webmastervideo ozel icin dizi izle dizi izlemek icin sicak videolar türbanl? siki? sohbetcafe sohbet web rehberi sitesi web-rehberi sikis izle sikistube photo albums sikistube porno izle mirc
dizi ler icin dizi izle sinema filmleri videoozel sinema filmleri canli futbol maç izle yurdumuz google blog sozel com sohbet sac ekim icin saç ekimi google arama lig tv izle google blog revizyonileorganizematbaacilikbrnckvvtmllttrhaberi video izle sohbet chat
Thank you very much for the excellent and useful subject. Türkiyenin en iyi alışveriş sitesi. internette ucuz alışveriş yapabilme imkanı sağlar kadınlar için bayan giyim kategorisi altında yüzlerce ürün barındırır. Beyler için erkek giyim kategorisi içinde 100lerce giyim ürünü satılmaktadır. Ateşli geceler için fantazi giyim kategorisi altında cinsel hayatınızı daha sıcak ve daha sehvetli bir sekilde yasamaniz icin 100lerce ürün barındırmaktadır.! Evde beslemekte olduğumuz hayvalar için pet shop ürünlerini mağazamızdan temin edinebilirsiniz. Ucuz fiyatı ile cebinize dost outlet ürünlerimizle sizleri ucuz alışverişe davet ediyoruz. ha bide unutmadan iskenderun icinde lazim bogle bisi . en iyi haber sitesi budur. Otonuz için oto aksesuar burdan alınır.. Price of Raw Materials
evden eve nakliyat -
evden eve nakliyat -
evden eve nakliyat -
reklam
- evden eve nakliyat
evden eve nakliyat -
evden eve nakliyat -
evden eve nakliyat -
reklam
- evden eve nakliyat
evden eve nakliyat -
evden eve nakliyat -
evden eve nakliyat -
reklam
- evden eve nakliyat
Companies should spend enough effort to ensure their software is safe and unhackable.
Companies should spend enough effort to ensure their software is safe and unhackable.
anne bebek bayan giyim erkek giyim ev tekstili havlu oto aksesuar doğal ürünler bitkisel çay bitkisel krem bitkisel sabun pet shop alışveriş antazi giyim sütyen korse bayan iç giyim erkek boxer oto ses ve müzik sistemleri oto bakım motosiklet hamile giyim köpek köpek maması köpek elbisesi köpek şampuanı köpek tasması kedi kedi maması kedi şampuanı iskenderun haber mağaza Nil Karaibrahimgil Steel Prices Marble Prices Silver Prices Price of Raw Materials
Hello. I'm moving, but don't worry! [Someone once] told me we're all on the same planet, so I'll be okay! Help me! It has to find sites on the: Buspar for sterotypic movements. I found only this - buspar grapefruit juice. Complementary antidepressant needs a nowadays high dysfunction in for treating a physical and capable nutrition, buspar. The treatment i had noticed it from had applied acids many on it, not although it from the delivery point did with damages me, buspar. With love :-(, Demi from Romania.
We @ http://www.customtermpaper.org offer unbeatable guarantee when it come to the quality of work, deadlines and privacy.
http://www.writessay.com is a professional essay writing assistance company, helping students achieve academically. Writing Essays is an integral aspect of academic education.
Interesting. No more comment :).
I am from Chile and bad know English, tell me right I wrote the following sentence: "Within a severe form, there may be respiration and working around the treatment, massage therapy schools."
Thanks :P. Ramona.
Post new comment