Page 2 of 2
Posted: Tue Nov 21, 2006 9:51 pm
by siringo
Thanks Garvin, that's removed that excess text, it's perfect.
I'm still unclear on how I can add the text I want from that php script into the Sticky Posting?
The external php plugin says that the output from the included file needs to end in .htm or .html. But I want to include it on my blogs index.php page.
Any advice or ideas?
Thanks.
Posted: Wed Nov 22, 2006 10:29 am
by garvinhicking
Hi!
I'm still unclear on how I can add the text I want from that php script into the Sticky Posting?
Ah! You can't do that easily. Sticky Postings are for entries only, not for plugins!
You have three options for placing code there:
1. Install the smartymarkup plugin, transform your PHP-code into a Smarty Code include by editing your templates config.inc.php (see "Doing more with smarty" on
www.s9y.org Technical Docs) and call the smarty function in a sticky entry you create.
2. You edit your "entries.tpl" or "index.tpl" template, use the Smarty-Approach from solution 1.) and then place the smarty call into a HTML container that you can align via CSS to put it where you need it.
3. You create a custom PHP event nugget. You can base it on the "HTML Page Nugget" event plugin, and just change the plugin where it emits code to include your PHP file. Once having that event plugin, you could also go the approach from 2.) and use a plugin aPI hook call in your template (instead of the smarty function call) to show your PHP content.
As you can see, all three options require you to know some PHP/Smarty - but sadly there's no way around that if you want that level of customization.
Best regards,
Garvin
Posted: Wed Nov 22, 2006 11:02 am
by siringo
Thanks for your help again Garvin.
I haven't had a look at the resources you mentioned yet, but to someone who had a fair knowledge of PHP etc (that's not me), would that all be quite a bit of work or not?
I'm just trying to gauge how hard it all is.
Posted: Wed Nov 22, 2006 11:16 am
by garvinhicking
Hi!
Well, it would not be done in an instant, but it would take someone like me, Judebert or Matthew 30 - 60 minutes...maybe if you already prepared a dummy HTML on how it should look like, it could be done faster depending on the method that the programmer would choose.
HTH,
Garvin