I am trying to hack the image.module though I am not familiar with drupal's apis or core structures. My goal is to display the full-size version embedded image when viewing single node and to display the thumb-size version while viewing page listing several nodes (with teasers probably). So I must get the $main in the filter_process() function for the conditional process. It seems that the $main is NOT a global. Then, how can I get it or is it impossible in the current stage of drupal? Any guy can help? thanks.

Comments

gábor hojtsy’s picture

You need to tweak node_prepare() to make that information global, or pass it on to check_output() and then check_output() needs to pass it on to the filter() hook and then it needs to pass it on to the process part.

UGlee’s picture

Thank you very much. That's exactly what I need. It works great when I made the $main global in node_prepare().