By Hubbo on
I've written a PHP script (which searches a directory for images and displays them) that I want to include in some of my posts . The problem I am facing is that the teaser function won't work when I'm posting in PHP mode. What I would want to do is write some text, put the --break-- tag at the end of the text and then include my script which only should display the images if the user clicks on the "Read more" link.
The --break-- tag works great when I post with Filtered or Full HTML. I've read somewhere that you should print the --break-- tag within your PHP-code but that doesn't seem to work either.
Anyone have an idea to what's wrong?
Comments
Version
And I'm using Drupal 4.5.2 =)
excerpt.module
Well. After looking around a little I found the excerpt module. It works great but I would still want to know more about why the --break-- tag is buggy when posting in PHP mode.
Not supported
The break tag won't work with PHP code, this is by design.
--
If you have a problem, please search before posting a question.
solution
so only one solution is using excerpt module when using PHP in nodes?
I have the same problem, excerpt module solve this, but I don't think this is the best way.
The point of using the php
The point of using the php filter is that there will be no filter. You can always create a new filter for your site that will honor the 'break' tag if you want.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide