Page 1 of 2

Show entries via JavaScript

Posted: Fri May 25, 2007 6:26 pm
by mcurley
I'm trying to use the following:

Added new Plugin: serendipity_event_backend
which is a backend plugin which shows entries via javascript on external websites.

The read me file is at the following link:
http://php-blog.cvs.sourceforge.net/php ... tby=author

I'm confused. It says I just have to insert the script "to your external website at exactly the place, where the entries should appear". I did that. But I'm confused about what the URL in the script should actually say.

This is the script: "<script src=[URL]></script>"

[URL] should be something like:
http://your.blog.com/plugin/[BACKEND_URL]?[OPTIONS]

Where [BACKEND_URL] is the name which you've entered in the plugin-configuration in your blog-administration.

When I downloaded the plug-in (serendipity_event_backend.zip) I unzipped it. I then dragged and dropped the folder and its contents into serendipity/plugins/. So the files are now in serendipity/plugins/serendipity_event_backend/. Then I uploaded them to the remote site. Is that correct?

Thanks.

Re: Show entries via JavaScript

Posted: Fri May 25, 2007 11:00 pm
by garvinhicking
Hi!

Ypou only need to install the plugin on your blog server. Install it properly like any plugin: Coipy the files, and then go to the admin "Configure plugins" to install it.

When you installed the plugin you can configuredthe URL backend name.

That resulting URL is what you enter into the <script> part of your external site. On the external site, no files of the plugin are required because it all comes from the remote host.

Regards,
Garvin

Posted: Tue May 29, 2007 2:35 pm
by mcurley
I went to "configure plugins" and installed it. It says "Done: The new settings have been saved at 08:28:31". In the URL box on the "configure plugins" page it says "backend". My site name is www.insidesevierheights.com. On the page where I want the text to appear, I inserted this:

<script src="http://insidesevierheights.com/index.ph ... "></script>

Is this correct? It's still not working.

Thanks for your assistance.

MC

Posted: Wed May 30, 2007 10:29 am
by garvinhicking
Hi!

Where's your blog installed at?

It's sure not:

http://insidesevierheights.com/index.ph ... in/backend

because that URL does not exist. You must use the URL of where you installed Serendipity into, the index.php is the one from Serendipity.

Regards,
Garvin

Posted: Wed May 30, 2007 2:27 pm
by mcurley
http://insidesevierheights.com/serendipity is where the blog is installed. Within the serendipity folder, there's a "plugins" folder. Within that folder, there are many folders one of which is "serendipity_event_backend".

This is what it says when I go to the "configure plugins" page:

Backend URL
The URL to the backend when called from an extern website (http://your.blog.com/index.php?/plugin/[BACKEND_URL]).

Then it has a text box. The default text within it is "backend".

So that's where I got this:

<script src="http://insidesevierheights.com/index.ph ... "></script>

I've tried a number of combinations for the URL, and I can't get it to work.

MC

Posted: Wed May 30, 2007 2:28 pm
by mcurley
Hooray! No sooner did I post that last comment, and I finally got it to work.

This is what worked:

<script src="http://www.insidesevierheights.com/sere ... "></script>

Posted: Wed May 30, 2007 2:30 pm
by garvinhicking
Hi!

Then you must use

http://insidesevierheights.com/serendip ... in/backend

You need to substitute the example URL with your real URL. Your real URL is where Serendipity is installed.

However when calling it, I get a blank page.

Please post a screenshot of how your configuration page for the 'serendipity_event_backend' looks. In that box you need to enter "backend" for example only. Do NOT enter a URL there. The final URL you only need to use in your foreign webpage.

Regards
Garvin

Posted: Wed May 30, 2007 2:40 pm
by mcurley
So sorry. I changed "backend" to "inside" on the "configure plugins" page. It should actually read:

<script src="http://www.insidesevierheights.com/sere ... "></script>

I sent you the wrong one.

Thanks for all your help.

Now where do I go to change to look of the entries appearing on my home page (www.insidesevierheights.com). Those entries don't look like my blog (insidesevierheights.com/serendipity).

MC

Posted: Wed May 30, 2007 3:02 pm
by garvinhicking
Hi!

You're welcome :)
Now where do I go to change to look of the entries appearing on my home page (www.insidesevierheights.com). Those entries don't look like my blog (insidesevierheights.com/serendipity).
Those are emitted via the javascript and simple document.writeln() calls, you can style them via CSS on your output if you look into the source of the javascript output you know which CSS selectors to use.

If you wanted to display your entries exactly like in the blog, then this might be more what you'Re looking for: http://www.s9y.org/206.html

Best regards,
Garvin

Posted: Wed May 30, 2007 3:05 pm
by mcurley
Thanks so much, Garvin. I'll take a look at that. Again, I appreciate your assistance. Just be prepared, I might have more questions once I get into it some more :)

MC

Posted: Wed May 30, 2007 10:01 pm
by mcurley
Okay, I need more assistance. I'm not that familiar with php, so I'm thinking the first option might be easier.
Those are emitted via the javascript and simple document.writeln() calls, you can style them via CSS on your output if you look into the source of the javascript output you know which CSS selectors to use.
Can you give me some more info re: the above?

Thanks.

MC

Posted: Wed May 30, 2007 11:10 pm
by Brendon K
It looks like you'll need to style the following classes in your main site's CSS file:

.blog_title
.blog_body
.blog_body a
hr .blog_hr

Take note that anchor tags ("a") can have visited, active, hover, and link attributes.

Posted: Thu May 31, 2007 2:27 pm
by mcurley
That worked perfectly! Thanks for your help. It's greatly appreciated.

MC

Options: categories

Posted: Thu Jun 07, 2007 8:24 pm
by mcurley
Can you specify more than one category in the following? If so how to you do it?

category=s9y

Re: Options: categories

Posted: Fri Jun 08, 2007 11:15 am
by garvinhicking
Hi!

It does not work with categorynames, but with categoryids:

categoryid=17,18,19

(seperate them with a comma)

Regards,
Garvin