This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

How can I write PHP code to check category OR node id?

I need to display a nav block based on category OR a node id. I've got the category part working, but when I view the content for this node (http://www.example.com/?q=node/1), the block is not displayed. Any ideas on what I'm missing?

Display Navigation Based on Category Not Working

I am working on displaying a custom menu block based on all of the pages belonging to an assigned category. The problem is that the block is showing up on every page, not just the pages in the category. I've selected the correct option and put in the code below - "Show if the following PHP code returns TRUE (PHP-mode, experts only)".

Since I only need 1 category specified, I'm using this code with the category specified as "my_category". Then in my list of categories, I have a category named "my_category". (no quotes)

My BBCode Filter

I've written a BBCode filter for drupal and while I'm waiting to get CVS access I thought I'd do a quick post here so that people can test my parser if they want.

Advanced Aggregator Module

I just recently got serious about Drupal after leaving Joomla ... Drupal rocks!!!

The only feature I am disappointed in (and probably just because of my needs, not because of the module) is the aggregator module.

I would like an aggregator similar to Joomla's in that the aggregator block shows the link (which links back to the news supplier) ALONG WITH the text supplied with that link. Joomla allowed for (and were able to customize the choices) the display of the name of the syndicator, their logo image if supplied, and images related to the news feature. I really do not want my readers to click on a link, simply to be taken to another local page to read one line of text and have to again click on a link to be taken to the full story.

Since I know I have a tendency to ramble, maybe I should show graphically what I want.

A block which shows:

-- Name of Syndicator (if option selected) --
-- Image of Syndicator (if option selected) --

-- image with story --
-- link to full story at syndicator site --
-- text supplied by syndicator --

-- link to full story at syndicator site--
-- text supplied by syndicator --

-- link to full story at syndicator site --
-- text supplied by syndicator --

...

End Block

The number of links should be selectable too (which is how it is now)

Is there such a module out there, or is someone out there able to edit the aggregator module to do that? I am proficient with php, but need to learn the mechanics of Drupal yet.

CCK - using field-based and node-based templates together?

hello everybody,

I am using the CCK module and have a question regarding theming: is it possible to use field-based templates together with node templates?

I have a content-type "content_test" which has a field called "field_test".
Now I want to theme the field "field_test" and therefor have created a template file called "field-field_test.tpl.php". I also have template "node-content-test.tpl.php" for general styling.

Now, when I call $field_test[0]['view'] in "node-content-test.tpl.php" my customized field template does not seem to be called.

debugging php module errors

Hello all,
i'm new in drupal, and i'm developing my "hello world" module.
The main problem i'm experiencing is that when i do a php mistake such a missing ";" or an unclosed "{" i can't see the error anywere,

if this error is in the help hook, the admin page of drupal wich displays all modules just goes blank, no error is given in the page neither in the event log of drupal.

if the error is in the rendering of a page, the page will display blank too

Am i doing something wrong or there are debugging or testing methods wich i unknow.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions