Show entries via JavaScript

Creating and modifying plugins.
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Show entries via JavaScript

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Show entries via JavaScript

Post 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
# 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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# 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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# 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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# 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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post 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
Brendon K
Regular
Posts: 44
Joined: Thu Feb 23, 2006 10:35 pm
Location: Saratoga Springs, NY, USA
Contact:

Post 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.
They say, "Practice makes perfect," yet they also say, "Nobody's perfect." I don't get it.
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post by mcurley »

That worked perfectly! Thanks for your help. It's greatly appreciated.

MC
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Options: categories

Post by mcurley »

Can you specify more than one category in the following? If so how to you do it?

category=s9y
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Options: categories

Post by garvinhicking »

Hi!

It does not work with categorynames, but with categoryids:

categoryid=17,18,19

(seperate them with a comma)

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/
Post Reply