I thought Drupal was supposed to make things easier. Getting discouraged.

work77 - October 28, 2009 - 18:58

I've been trying for days just to get my drupal form elements to display in a simple table as is done in admin/content/node with nice zebra rows and a floating header, but have found no answers. Unfortunately, the generous volunteers on this forum really do seem to be spread too thin to address the thousands of unanswered questions sitting in the queue. Any suggestions?

http://drupal.org/node/616442

=-=

VM - October 28, 2009 - 19:00

creating multiple posts about the same issue dosen't help those who are spread thin. In future consider commenting on your original thread and bump it back to the top of the lists.

have you looked through these threads? http://www.google.com/search?hl=en&source=hp&q=drupal+zebra+tables&aq=0&...

-

work77 - October 29, 2009 - 01:13

Hi. Yes I've been googling those keywords along with many others for three days :( I still can't figure out why my theme function below is being ignored. This form returns all the correct data but just in a big blob, ignoring the theme func.
I took out all the fat below just for easier readability here.

Thanks.

<?
function group_node_admin_menu() {
$items['gna'] = array(
'title' => 'Content',
'description' => "Assign/unassign individual nodes to individual group members all in one fell swoop.",
'page callback' => 'drupal_get_form',
'page arguments' => array('group_node_admin_form'),
'access arguments' => array('access content'),
);
return $items;
}

...

function group_node_admin_form() {

$form = array();
...

$form['#theme'] = 'group_node_admin';

return $form;

}

function theme_group_node_admin($form) {

echo 'see me yet?'; //this never displays

...

}

?>

=-=

VM - October 29, 2009 - 02:30

this is being placed in the template.php file?

why don't i see a theme name being called anywhere or is that just preprocess functions?

I believe theme in the last function needs to be the name of your theme.

Sorry your getting

callison - October 29, 2009 - 07:04

Sorry your getting discouraged. Drupal definitely has a high learning curve. Keep at it - it is definitely rewarding once you figure something out.

I'm not exactly sure what you are trying to accomplish. I don't even understand if you're writing a module or a theme or what. If you would, please, start at the beginning of what you're trying to do and explain to us in more detail where you want the zebra stripes, etc. We really do want to help. Don't get discouraged.

Drupal certainly has a very,

Harpo - October 29, 2009 - 15:37

Drupal certainly has a very, very steep learning curve. Even trying to do the simplest things will often have you smashing your face into your keyboard in frustration. Also, the vast majority of useful documentation is for Drupal 5 and not 6, and lots of modules/code will have very unhelpful or non-existant documentation. However, the payoff is that once those basics are learnt (read: trial and error until you figure it out yourself) you can build a website with unending functionality... only your imagination is the limit.

A basic CMS like Wordpress is equivalent to Snap; easy to learn and easy to play, but quite limited in the long run. Drupal is like Poker; harder to learn, even harder to play "properly" but much, much more rewarding.

I've been working with Drupal 6 full-time for over 6 months and I've only just become comfortable with it's basic workings. The key thing to realise is that Drupal core in itself won't really do that much, you really should add extra modules to get functionality - like Views, CCK, ImageCache etc.

Keep at it! If really can't stomach it, leave it to us and we'll charge you £200 a day for our services. ;-)

Good point

MichaelBrown - October 30, 2009 - 07:40

"The key thing to realise is that Drupal core in itself won't really do that much, you really should add extra modules to get functionality"

That's a really important point Harpo.

As another new guy, I spent my first few months thinking that the core program was the heart of Drupal. I saw modules as add-ons or plug-ins, which are often cumbersome and unreliable.

After a while, I realized that Drupal is not the skyscraper...it's the ugly iron skeleton. It really is the modules that make the whole thing so beautiful.

That attitude makes Drupal so much less frustrating. (but not completely frustration-free!)

-

work77 - October 29, 2009 - 17:17

Thanks for all the responses. Just to clarify - this is my first time trying to build my own module. It probably doesn't need to be an actual module, but it's just for learning purposes. Since I want it to resemble the form at http://yourdrupalsite.com/admin/content/node (with each zebra row containing a checkbox) , I actually took the code from node.admin.inc and just copied it into my new "modules/group_node_admin/group_node_admin.module" file and renamed the functions.

The form function executes just fine grabbing the db data rows and populating the $form array. In the code above, you can see that I set the $form["#theme"] attribute to the name of my theme function (minus the 'theme_'). The problem is that the theme function is ignored. Obviously I'm doing something wrong. I just don't know what. Any observations?

Thanks.

-

work77 - October 29, 2009 - 22:23

Bumping, as suggested.

OK

ludo1960 - October 29, 2009 - 22:40

Only a suggestion, as there are far more smarter folks here to help than me.

So you want Zebra striping? Surely this is a CSS issue!

What theme are you "playing" with?

Don't give up just yet!

+1 Drupal is for site

Harpo - October 30, 2009 - 11:02

+1

Drupal is for site behaviour, CSS is for styling and looks. Check out CSS Zen Garden (www.csszengarden.com) for the beginnings of what's possible CSS-wise.

hook_theme?

dman - October 30, 2009 - 08:34

Your original post contained nowhere near enough detail for anyone to help. This is the most common reason why things get left unanswered in the queue. VeryMisunderstood & I have got good at some psychic debugging, but sometimes it's just not worth the effort. You really needed to explain what you are trying to do and how you are currently going about it.

Looks to me like you need to have a look at the Module Developers Guide. I think the first point on that page describes something rather important that is missing from the code you pasted here. :-)
hook_theme only gets called ONCE when the module is installed. You need to rebuild the theme registry repeatedly during development, that can be a little frustrating, but there is a button for it, under 'performance' IIRC, but submitting the module admin form also does it.

'echo' is not much good for debugging. Use drupal_set_message() instead. Or get devel.module and use dsm() which is shorthand for that.

.dan.

-

work77 - November 2, 2009 - 23:47

Thanks tons. That's exactly the help I needed. :)

With so many questions and so few volunteers, I can see where exhaustion would definitely occasionally set in. I also understand that some people just want others doing their work for them. I honestly thought I was providing enough information. As for, "sometimes it's just not worth the effort", it's pretty demoralising to think your posts aren't even acknowledgement-worthy. I wanted to respectfully offer a little reminder that often even the smallest of acknowledgements can go a very long way in keeping someone from jumping off a bridge in frustration, not to mention limit repeat posts.

Thanks again. Much appreciated.

some "posts aren't even acknowledgement-worthy"

dman - November 3, 2009 - 10:15

Mmm. But how much coaching do you think a question like this will take before it even approaches something that can be answered?

It would be half a dozen posts before anyone has any idea what they want to actually do, and what they are able do, because they failed to give any context, explanation, history, or even try to ask the question clearly or look at any of the available documentation!
(There may be a short answer to the technical question, but it's probably not what the poster actually wants to do. - I can see it coming)

This sort of post is clearly a "Help Vampire" because you just know that even if a partial answer is eventually found and they are hand-held through it, they are going to immediately follow-up with another, unrelated question in the same thread :-/ Like this ghoul.
This is because responding to that just encourages that leeching, tiring behaviour. .. Sometimes I've received personal help requests just because I showed a little guidance on threads - even if only pointing out that the Q. was unclear!

I'm not saying that your initial post was quite in that category! - we were able to figure out what the actual question was after only 3 cycles of Q & A :-)
... But yeah I need to take it easier sometimes too ;-)

.dan.

-

work77 - November 3, 2009 - 20:14

"How to submit a form from another page and display the result in that page? Which drupal function to be used for this? If anyone have idea plz suggest me"

Ha Ha. What do you mean? That's an awesome question!! Lots of specifics ;-) . I think questioners have the responsibility to display that they've invested some time in coming up with the answer themselves. This clearly doesn't do that. So yes, I totally understand. I guess for something like this, one might be tempted to respond with something like "research the forms api. Then be more specific," but what you say it true. Sometimes just by acknowledging such a post is encouraging more just like it.

The Ghoul: "Please tell me the procedure of ecommerce module in drupal."

Ha Ha. That's Classic!

 
 

Drupal is a registered trademark of Dries Buytaert.