Hello All,

Ive searched for ages, looking everywhere for a solution but till now no success.
Maybe i just dont understand how it works but I really hope someone can help me out.

Ive made a story and want to edit the "source" code of this new "story".
I want to add php code like print swf file.. so it shows... But i cant even find how the code...
Can anyone of you tell me how to edit a code for a specific story (node?)

Thanks in advance,
Regards,
Samed

Comments

vm’s picture

you do not edit core.

if you've already created a story node. Edit it using the edit tab when visiting the node. add your new content.

to use PHP in a node, you must use the php input format provided by the phpfilter.module in core.

a.samed’s picture

Hi, thanks for the answer but I dont think we understand eachother.

When i use the edit tab, I can only edit the body or the title of the story, the input format is already set on php.
I dont want to edit the body, i want to edit the code related to this page..

Like in this screenshot: http://img246.imageshack.us/img246/2830/edittplphp.jpg

This is a screenshot taken from a videotutorial: http://mustardseedmedia.com/podcast/episode17

If you wonder why I need this, I want to be able to do this: (http://drupal.org/project/swftools)

SWF Tools allows you to easily embed flash content on your pages using filter syntax like [swf file="mymovie.swf"], or by PHP using print swf('mymovie.swf');. The module consists of a number of components that you can choose to install. For example, you can choose a variety of embedding methods, such as direct embedding markup, or SWF Object 2 JavaScript. You can also enable support for a number of common media players, such as Wijering Player or FlowPlayer. When you enable those you can easily add video and audio content to your site simply by writing [swf file="myAudio.mp3"] or [swf file="myVideo.flv"]. SWF Tools will take of everything to create your player.

Can pleeaaasee someone help me with this...

JayNL’s picture

Use a CCK field for it. If you don't know what that is, you still got a long way to go, sorry.

Also, check out the handbook for "anatomy of a drupal theme" to see how you can add a custom template for a certain page, node or content type.

vm’s picture

I understand but can't be sure you do.

[swf file="mymovie.swf"] = syntax that goes into the body of a node and is rendered when the proper filter is enabled in the input format in use.

print swf('mymovie.swf'); is a PHP statement that goes into a custom tpl.php. This is explained in a step by step fashion in the mustardseedmedia.com video @ 3:20

The video is an extension of a previous video, that you should watch where the narrator explains how to set up a field using CCK before using jquery to render the vids. Both videos should be watched and learned from.