Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi, so I've dropped the kfunctions.php into the root of my website, I've placed a youtube link in the format of:

[youtube video="http://www.youtube.com/watch?v=z7o7RFoTtw0" /] as a test into a rich text edit box using the admin page and when I refresh the actual page all I see is the shortcode itself. I've gone to the site and tried http://mysite.local/kfunctions.php and it is there, so that's fine. I'm stumped.

I'm using Middleman toolchain / framework with .html pages rather than .php, with :

AddType application/x-httpd-php .html

... in my .htaccess. I don't think that is causing it, but I guess it may help someone figure it out ;)

It seems so simple it should work easily, so I'm leaning towards a configuration issue, either that or I just goofed up and didn't read something properly :)

Any help much appreciated!
Hi Vizzyx! Actually the kfunctions.php location is in your couch/addons folder and not in your website root. Also, you are using a wrong format for YouTube video embeding, you should use [youtube video="z7o7RFoTtw0" /] only.
Hope this help.
Hi and welcome @Vizzyx,

Have you perhaps overlooked that you need to wrap the output of your richtext tag with the do_shortcodes tag?
Code: Select all
<cms:do_shortcodes><cms:show my_richtext/></cms:do_shortcodes>

@atisz, both the root and couch/addons locations should work just fine for kfunctions.php. Also, the youtube shortcode from the documentation will be able to handle the full URL - it has been coded to extract the video id.
As it seems I should read more carefully the docs :) I knew I forgot something, but until I remembered what, your post was already here :)
atisz wrote: Hi Vizzyx! Actually the kfunctions.php location is in your couch/addons folder and not in your website root. Also, you are using a wrong format for YouTube video embeding, you should use [youtube video="z7o7RFoTtw0" /] only.
Hope this help.


Thanks for that great note! I couldn't get shortcodes to work until I saw that. I had followed instructions to put the k_functions.php in my root folder. However, there already was another on in the couch/addons folder that made couch ignore mine in the root. So if you already have one in the addons folder, put your shortcodes in there!
5 posts Page 1 of 1
cron