Embedding planning for a new project - your advice please?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
adensmore
Regular
Posts: 7
Joined: Tue Jun 08, 2010 10:06 pm

Embedding planning for a new project - your advice please?

Post by adensmore »

Hi, thanks in advance for your time!

Here is my live website:
Gulf Coast - A Journal of Literature and Fine Arts
http://www.gulfcoastmag.org

I would be adding a blog, using s9y, and here is a comp of how we'd like that to look:

http://www.gulfcoastmag.org/blogcomp.jpg

Key issues are,

- s9y blog functionality should only appear embedded in that "margin" of the content area of the existing website as shown
- the left-hand navigation is built with php/mysql, so it's more than just a "css footer/header" to be added around s9y
- only the Gulf team will make posts, but ideally I need to get a variable about who's posting so I can create that bio pic and caption as shown next to the "margin" where s9y blog functionality is embedded.

Looking at this page, regarding embedding/integration,:
http://www.s9y.org/123.html

It would be a HUGE help if someone advised me as to the better route is to

A) "Embed Stuff In Serendipity"
or
B) "Embed Serendipity in Something Else"

Obviously my temptation as the handcoded-author of this live website is to B) embed s9y INTO my existing content area template, but I'm reading a lot about plug-in compatibility and the "smarty" improvements and how A) is the better route ideally.

Any general or specific advice, large or small, is greatly appreciated!

Thanks so much,
Alan
Last edited by adensmore on Wed Jun 09, 2010 9:59 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Embedding planning for a new project - your advice please?

Post by garvinhicking »

Hi!

If I were you, I'd go the easier route to NOT use Serendipity embedding, but embed your custom code into serendipity instead.

Just create a new template in serendipity, as templates/gulfcostmag/ for example. Copy the files info.txt, style.css and index.tpl over from templates/default. Then edit info.txt to give your template a unique name.

Then you create a config.inc.php in your templates/gulfcostmag/ and enter:

Code: Select all

<?php
$serendipity['smarty']->security = false;
This will make your template be able to use Smarty {php}...{/php} tags. This in turn allows you to open up index.tpl, go to the place/DIV where you want your HTML header/footer to show up, and use {php}include '/path/to/footer.php'; ...{/php} to embed your current code. Also you might directly want to use {include_file} from smarty (check http://smarty.net/).

Tell me if that helps you further! :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
adensmore
Regular
Posts: 7
Joined: Tue Jun 08, 2010 10:06 pm

Re: Embedding planning for a new project - your advice please?

Post by adensmore »

This looks like an awesome start Garvin thank you so much for your time and help -

And what I really wanted before I got to deep into it was just for someone to look at the existing site, who also knows s9y well, and just tell me that what I want to do would/should work! So if it will, and sounds like it will, then I need to start installing before I'd have any more questions, thanks again for the encouragement to get started -

If I can bother you further, would you happen to know if user "Amy Smith" creates a blog post, if she might have an identifying ID variable from s9y that my php could detect (and manually know is Amy) so that I can use my own PHP/mysql to put Amy's photo and bio on our blog next to the s9y content?

http://gulfcoastmag.org/blogcomp.jpg
(see how Ian Stansel's photo/bio is treated in this comp?)

I'm being greedy now asking about this fancier/harder issue, but worth a shot!
Thanks again,
Alan

p.s. Final question -- if I get knee deep in this and can't get something to work, can you recommend yourself or someone that would be available for paid support, and could I get details on that? Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Embedding planning for a new project - your advice please?

Post by garvinhicking »

Hi!

Sure, you can do that with Serendipity :)
If I can bother you further, would you happen to know if user "Amy Smith" creates a blog post, if she might have an identifying ID variable from s9y that my php could detect (and manually know is Amy) so that I can use my own PHP/mysql to put Amy's photo and bio on our blog next to the s9y content?
Yes, serendipity would store such information in the Smarty variables, for example {$entry.authorid} or {$entry.author} which you can pass to any PHP script you may want.

Serendipity even has a plugin for that, the serendipity_event_userprofiles plugin.
p.s. Final question -- if I get knee deep in this and can't get something to work, can you recommend yourself or someone that would be available for paid support, and could I get details on that? Thanks!
My company actually does commercial support. Also there are many people here that are happy to help if money wants to be exchanged. ;)

I can especially recommend Yellowled and don.chambers here from the forums.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
adensmore
Regular
Posts: 7
Joined: Tue Jun 08, 2010 10:06 pm

Re: Embedding planning for a new project - your advice please?

Post by adensmore »

Wow you are great, absolutely 100% of what I needed to know! Thank you SO much, I'm all set to make it happen now ! : ) : ) : )
Post Reply