Page 1 of 2

Light-weight here...Embedding issue

Posted: Thu Jan 19, 2006 7:26 pm
by DragonFly
I presently have a blogsite (blogger.com format) but have no way to allow visitors to post directly from it.
Site address: http://www.politicallyoutspoken.com

Thus, I've turned to the advanced blog (Serendipity) over at aplus.net.

The kink in my hose here is that I am loathe to surrender my present site as I now have it, and only wish to embed Serendipity into it somehow.
My preference would be to have a link to the public posting page, yet have the title links and posts of my visitors show up on my present index page.

The other kink is that I'm devoid of knowledge when it comes to .php and my html skills are rudimentary. :(

Could someone please save me from myself so that I can save the world from greed and corruption.

Posted: Thu Jan 19, 2006 8:32 pm
by judebert
Doing that in any way other than embedding is difficult. The two blogs just don't have the same database for posts.

Embedding is done two ways: embed something in Serendipity (easy, because you just edit the index.tpl to call the other thing), or embed Serendipity in something else (harder, because you have to call Serendipity with some wrapping).

This post provides the basic details for the second embedding option. If you need any other search, I recommend searching for "embed" in these forums.

Posted: Fri Jan 20, 2006 12:26 am
by DragonFly
Ah judebert, you know all this stuff so well that you can't help miss the gulf between us.

"...you just edit the index.tpl to call the other thing..."

My interpretation: "...you just edit the index.tpl (entire template?) in Serendipity :roll: to the other :?

"...or embed Serendipity in something else (got that part alright) (harder, because you have to call :shock: Serendipity with some wrapping)." :(

I'm feeling terribly, terribly ignorant.

Actually judebert, I did read through some of the posts on this topic prior to embarrassing myself here. However, I had the same problem understanding them as well.

If you want to give up on me, I'll understand. :cry:

Posted: Fri Jan 20, 2006 5:40 am
by judebert
Sorry. Didn't mean to lose you; I'll try to be more clear.

You're trying to embed Serendipity in Blogger (the "other thing" :)). To do this, you'll need a bit of programming. To start, find where Blogger creates the page you want to embed Serendipity in. (I don't know Blogger, so I can't really help with that.) Then add a call (how programmers say running a program from another program) to Serendipity where you want it to show up. But wait! It can't be that easy! Serendipity needs to be run from its base directory. So you add some extra programming statements (the "wrapper") around the Serendipity call. It looks a lot like that last bit of code in the post I directed you to:

Code: Select all

<?php
chdir("<serendipity_dir"); // Change to the Serendipity directory
require ("index.php"); // Run Serendipity, print everything
chdir("<blogger_dir>"); // Switch back to Blogger directory
?>
The post I gave you actually stores everything up, instead of printing it.

Second option: call Blogger from Serendipity. For that, you just go to your index.tpl, and add the call to Blogger wherever you want it. It's pretty much the same sort of thing, but I don't know how to call Blogger, so you'd need to get help from them. If they need to change directories, it's going to be very similar.

Easiest option: Serendipity can import Blogger posts. Just go to your admin page, Import Data, and choose Blogger. Then you can work on modifying a template to match your current site. (More on that later, if you need additional help.)

Inching closer

Posted: Sat Jan 21, 2006 12:20 am
by DragonFly
Hello,

Here is the template that I started with. It was written to be compatible with the blogger.com site.

I've stripped away the 'css' for purposes of saving space. Is there anything in this that would give me the 'directory info' that you refered to in your previous post? "...find where Blogger creates the page you want to embed Serendipity in."

Unfortunately, blogger.com support is anything but responsive. But then again, it is a free webserver and online doumentation is about all one can expect.

I will snoop about over there for information regarding 'the page'. Is there a name for this page/directory that I could use in order to search more effectively?

Meanwhile, please find stipped down template below. This is what I used to create my index page with over at "http://www.politicallyoutspoken.com".


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><$BlogPageTitle$></title>

<$BlogMetaData$>

<style type="text/css">

/***********************************************/
/* thur broeders */
/* september 2005 */
/* template tb_b_20050917_darkblue.dwt */
/* using FLOATING sidebars */
/* */
/* http://www.thurboeders.nl/ */
/* postmaster@thurbroeders.nl */
/***********************************************/

</style>
</head>
<body>

<!-- start header -->
<div id="header">

<h1 id="blog-title">
<ItemPage><a href="<$BlogURL$>"></ItemPage>
<$BlogTitle$>
<ItemPage></a></ItemPage>
</h1>
<p id="description"><$BlogDescription$></p>

</div>
<!-- end header -->

<!-- start content -->
<div id="content">

<!-- start left sidebar -->
<div id="leftbar">
<div class="side">

<div class="sidebar-title">Something</div>

<p>Put some text here ...</p>
<p>Put some text here ...</p>
<p>Put some text here ...</p>

<div class="sidebar-title">Something else</div>

<p>Put some text here ...</p>
<p>Put some text here ...</p>
<p>Put some text here ...</p>

</div>
</div>
<!-- end left sidebar -->

<!-- start right sidebar -->
<div id="rightbar">
<div class="side">

<!-- start #profile-container -->

<$BlogMemberProfile$>

<!-- end #profile -->

<h2 class="sidebar-title">Previous Posts</h2>
<ul id="recently">
<BloggerPreviousItems>
<li><a href="<$BlogItemPermalinkURL$>"><$BlogPreviousItemTitle$></a></li>
</BloggerPreviousItems>
</ul>

<MainOrArchivePage>
<h2 class="sidebar-title">Archives</h2>
<ul class="archive-list">
<BloggerArchives>
<li><a href="<$BlogArchiveURL$>"><$BlogArchiveName$></a></li>
</BloggerArchives>
</ul>
</MainOrArchivePage>

<h2 class="sidebar-title">Links</h2>
<ul>
<li><a href="#" target="_blank">Link 1</a></li>
<li><a href="#" target="_blank">Link 2</a></li>
<li><a href="#" target="_blank">Link 3</a></li>
</ul>

<p id="powered-by"><a href="http://www.blogger.com"><img src="http://buttons.blogger.com/bloggerbutton1.gif" alt="Powered by Blogger" border="0" /></a></p>

</div>
</div>
<!-- end right sidebar -->

<!-- start main -->
<div id="main">
<Blogger>

<BlogDateHeader>
<h2 class="date"><$BlogDateHeaderDate$></h2>
</BlogDateHeader>

<!-- start .post -->
<div class="post"><a name="<$BlogItemNumber$>"></a>
<BlogItemTitle>
<h3 class="post-title">
<BlogItemUrl><a href="<$BlogItemUrl$>" title="external link"></BlogItemUrl>
<$BlogItemTitle$>
<BlogItemUrl></a></BlogItemUrl>
</h3>
</BlogItemTitle>

<div class="post-body">
<div>
<table><tr><td><$BlogItemBody$></td></tr></table>
</div>
</div>

<p class="post-footer">
<em>posted by <$BlogItemAuthorNickname$> at <a href="<$BlogItemPermalinkUrl$>" title="permanent link"><$BlogItemDateTime$></a></em>
<MainOrArchivePage><BlogItemCommentsEnabled>
<a class="comment-link" href="<$BlogItemCommentCreate$>"<$BlogItemCommentFormOnclick$>><$BlogItemCommentCount$> comments</a>
</BlogItemCommentsEnabled></MainOrArchivePage> <$BlogItemControl$>
</p>

</div>
<!-- end .post -->

<!-- start comments -->

<ItemPage>
<div id="comments" style="border:1px solid #036; padding: 10px; margin: 10px; font-size: smaller">

<BlogItemCommentsEnabled><a name="comments"></a>
<p class="comment-timestamp">Comments on "<span style="color: #900;"><$BlogItemTitle$></span>"</p>
<p> </p>
<dl id="comments-block">
<BlogItemComments>
<dt class="comment-poster" id="<$BlogCommentNumber$>"><a name="<$BlogCommentNumber$>"></a>
<$BlogCommentAuthor$> said ... (<$BlogCommentDateTime$>) :<$BlogCommentDeleteIcon$>
</dt>
<p><$BlogCommentBody$></p>
<p> </p>
</BlogItemComments>
</dl>
<a class="comment-link" href="<$BlogItemCommentCreate$>" <$BlogItemCommentFormOnClick$> title="post a comment on '<$BlogItemTitle$>'">post a comment</a>
</BlogItemCommentsEnabled>
</div>

</ItemPage>

<!-- end commenta -->

</Blogger>
</div>
<!-- end main -->

</div>
<!-- end content -->

</body>
</html>

Posted: Sat Jan 21, 2006 5:33 am
by judebert
Oooooh, ick. Looks like Blogger is parsing $var$ and custom XML to insert its data in the appropriate place. Unless it's got something to parse php, we may be in trouble.

It's possible we could use this page. Try inserting the code block we discussed earlier after the <div id="main"> and see what happens. If we're lucky, it'll insert the Serendipity blog. If we're not, it'll get printed with the rest of the output.

Did you consider importing the Blogger entries and running a straight Serendipity blog? You can install Serendipity in a different directory and try it there at low risk. It won't break your Blogger.

Posted: Sat Jan 21, 2006 10:35 am
by DragonFly
Yes, I have considered running through Serendipity.
I wouldn't mind reloading my articles if I knew that I could make this endeavor yield results.

My main concern is wrapped around losing the look and layout of my present index page. If only I knew how to strip blogger from the template. :? Then I could just slip the embed Serendipity template version in it's place...perhaps?
Or is it possible to rework one of Serendipity's templates to look just like mine?

Also, would the homepage then become www.politicallyoutspoken.com/cblog instead of just www.politicallyoutspoken.com?
Or is there some way to convert it to the latter?

I suppose I could get creative and put it on a redirect if necessary.

One other wee issue, is there some way to wrap text around images in Serendipity? That is a concern as well.

Am I the question lady or what!

Posted: Sun Jan 22, 2006 2:25 am
by judebert
The text wrapping is an HTML/CSS standard thing, so Serendipity can do it, too.

Reloading the articles is simple; Serendipity can do it automatically, so you won't have to do any typing at all (or hardly at all).

It is possible to make a Serendipity template that looks just like yours. I'll bet Carl could do it in a day, but I know he's extremely busy right now. (In fact, everybody is. After the winter holidays, I believe our employers all expect us to work extra-hard or something.)

The CSS is one of the two main ingredients. The template structure is the second.

Here's what I'd do in your place:
1) Try embedding like we talked about in the previous post. If it works, you're golden. If not, we'll have to try step 2.
2) Import my Blogger entries to Serendipity in the /cblog directory. Fool with the template, asking as many questions as necessary on these forums (we're experts, we can help), until I liked it. Save the template and either redirect (like you said) or reinstall in the root directory.

In any case, you can get your blog done, the way you want it. It will take some trial and error (lots of error), but we'll definitely get you there.

Posted: Sun Jan 22, 2006 3:06 am
by judebert
In fact, if you go to themes.carlgalloway.com and check out the Blue Haze theme, you'll see it's pretty close to yours.

Posted: Sun Jan 22, 2006 4:57 am
by judebert
Okay, okay... I've got a couple of extra seconds. I modified the Blue Haze theme to match your Blogger site, including the banner. I got rid of some of the cruft and simplified while I was at it; now your 9/11 banner doesn't overlap your environmental message in FF. (CSS absolute positioning really needs to be used carefully.)

You can view it by going to Judebert.com and switching the theme to "Outspoken". You can download it from http://judebert.com/wasted_youth/media/outspoken.tgz.

Phew. I haven't tested it in Carl's tester, or even in IE. It doesn't include all your sidebar items (you'll have to add those yourself from Serendipity admin). You'll probably have to make modifications. But it should be enough to get you started. If you have any problems, just ask, and I (or somebody else) will be happy to help you out.

I'm humbled by your kindness

Posted: Mon Jan 23, 2006 1:11 am
by DragonFly
I'm fairly removed from modern conveniences on the weekends. Coyotes, my garden, my dogs, and campfires are mostly the only focus I have when I traipse up to my little piece of land.

So, I didn't see your posts until I came back to my other reality late this Sunday afternoon.

I'm utterly impressed by your dedication to helping others. I love what you did with my website.

But before I wax too euphoric, I will see if I can even accomplish the steps required.

Ah alas, if only I had a fraction of the knowledge that you possess.

I'll be back for more of your guidance...no doubt.

With much gratitude,
DragonFly

Posted: Mon Jan 23, 2006 3:41 am
by judebert
Coyotes, my garden, my dogs, and campfires are mostly the only focus I have when I traipse up to my little piece of land.
Sounds marvelous. I lived on ten-and-a-quarter acres on Cold Mountain for my formative years. There are times when I wish I could go back.
I'm utterly impressed by your dedication to helping others. I love what you did with my website.
Aw, shucks. I just hope it works for you.
I'll be back for more of your guidance...no doubt.
I'll be happy to help. Of course, if you need help on a specific issue, we'd best open another thread for it. Keep everything easy and searchable for the other newcomers.

Good Luck!

I've been trying.

Posted: Wed Jan 25, 2006 3:31 pm
by DragonFly
Welp Judebert, I think I've blown a valve in my cerebral cortex while working on the template that you'd so generously given your time to on my behalf.

One of the problems that I'm having is that I've never written using 'tables' before. No doubt, it's easier than I'm making it out to be for anyone who has 'html' under their belt, or more simply, doesn't have a tendency to expect it to be more 'complicated' than it really is.

Also, I use 'CoffeeCup' software and although I've been working in the 'code editor' only, whenever I go to 'preview', I have to pass through a lot of "An error has occurred on this page" windows before I can review.

So far, I’ve proven to myself that I've a long way to go before I'll be able to assemble the type of website that I desire and that will allow for quick, easy access to those who have something to say about our woeful state of affairs.

I have not overlooked your suggestion of moving this topic over to another forum where 'newbies' will be more likely to find it, it's just that I didn't see any value in this particular post for others as the substance is mostly weeping and wailing :cry:

Posted: Wed Jan 25, 2006 10:41 pm
by judebert
I'm really sorry you've been having such problems.

Tables can be very complicated. They've got lots of options. The basics aren't too hard, though.

You use <table> to start a new table. Everything you start needs an end; the end of the table looks like </table>. Everything inbetween those two tags is a part of the table.

Tables consist of rows and columns. Every row has the same number of columns, even if you mess up and make one different. You start a new row with <tr> and end it with </tr>. (TR stands for Table Row.) Since they all have the same number of columns, naturally the longest row determines how many columns this table will have.

To make a new column in this row, you use <td> and </td>. (TD stands for Table Data.) You can put pretty much anything you want in there: text, pictures, HTML, even other tables. Even nothing. If you mess up and make one TR shorter than the others (by forgetting to put enough <td></td> in it), it'll get blank TDs at the end.

By default, all the columns will be the same width. That's where you start with the complicated stuff. You can specify how wide you really want each column, and how high you want each row, and whether you want borders, and... whew. I need references to keep track of all that stuff.

Google tells me 'CoffeeCup' is an FTP program or an HTML editor. I assume you're talking about the HTML editor. I'm kinda surprised you're using one. I assume you're not using it for your blog entries (on Blogger or Serendipity), so I guess you're trying to make an example of what you want your page to look like? Or maybe making some static pages?

Serendipity already allows comments, and even has a forum plugin, so you should be able to get your site working with others posting their comments in no time.

Here's what you do:
1) Download that theme file I linked to earlier. Use WinZip to extract all the files. Use some FTP program to put all the files on your webpage under cblog/templates/outspoken.
2) Go to your Serendipity admin page and choose "Manage Themes". There should now be an "Outspoken" theme. Select it to make it your default.
3) Choose "Import" to import all your existing Blogger entries.
4) Go to www.politicallyoutspoken.com/cblog to see it in action. If your entries didn't get imported, let us know.

If you want to allow others to post entries on your blog, there are a few other things you'll have to do. Come back and ask, and we'll help you out.

Posted: Fri Jan 27, 2006 11:17 am
by DragonFly
I've been up since 3am trying to merge two different templates, (Serendipity's and mine) in the hopes of crafting the look and functionality that I want.

I sorta got something.
However, it's a bit like the fly and the scientist that took a trip together in the transporter.
Not real pretty.

I did what you suggested and uploaded the 'outspoken' template.
I also went ahead and entered an old post just for the heck of it.
However, if you'll take a gander over at www.politicallyoutspoken.com/cblog, you'll see that it is only two columns for some odd reason.

Thus, I'm sitting here all blurry-eyed in front of my monitor in the wee hours making yet another mess.

Now on a more cosmetic note... regarding the header... is there someway to adjust the banners back to the way I have them on my original? I tried by entering their original pixal location, which worked of course, but it also pulled the 'body' up over it's belt.

Oh, the trials and tribulations of an amateur.

You know ... that might make for an interesting website.

I'll call it - "In Over Her Head".
Follow an obsessed woman attempting to construct a website that is way out of her technical league.
Watch as she dissolves into a state of absolute madness trying to save the very site she now neglects.
You'll laugh... you'll cry, you'll wonder 'why', as she fetters away hour upon hour, destroying keyboard after keyboard in multiple fits of rage.
Will she reign victorious?
Or will she end up in a crumpled ball a top a heap of battered computer parts, drooling on what used to be her 'cpu' while making wild, threatening gestures at the ceiling.

Stay tuned.