Help with includeentry plugin

Having trouble installing serendipity?
Post Reply
taqi
Posts: 4
Joined: Mon Jan 29, 2007 12:30 pm

Help with includeentry plugin

Post by taqi »

Hi

1st Aplogies for being a newbie, but I have read the FAQs, searches the forums, searched google and have drawn a blank.

I want to insert a Google AdSense Javascript bit of code after an entry. I understand there are two ways of doing this:

1. Editing a file called entries.tpl. After having spent ages changing a file in the following directory ~/templates/default/entries.tpl - I eventually worked out that even erasing the file does not seem to make a difference. So I have given up on that angle. (I did not install any new templates and am just working of a default installation of s9y.

2. Using the plug in (includeentry): I have managed to install it by downloading the files and uploading the unzipped folder into the plugins directory. Then I went to the admin panel and configuration section for plugin and voila it had appeared. I installed or activated it.

Next I placed the following code into the body of a post [s9y-include-block:1]
I expected to see the entire contents of the first post to appear, instead I just get "[s9y-include-block:1]" appearing. I am not too sure what I am doing wrong, but I presume it something very trivial.

I would be grateful for any help with this issue. Hopefully the above detailed verbose newbie like question will help others too.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Help with includeentry plugin

Post by garvinhicking »

Hi!
1st Aplogies for being a newbie, but I have read the FAQs, searches the forums, searched google and have drawn a blank.
No apologies required. You did all you could, and a lot more than most people here. So you're heartly welcome! :-)
1. Editing a file called entries.tpl. After having spent ages changing a file in the following directory ~/templates/default/entries.tpl - I eventually worked out that even erasing the file does not seem to make a difference. So I have given up on that angle. (I did not install any new templates and am just working of a default installation of s9y.
It might be that you simply used a different template than the old default one. Presumably you need to use the file templates/carl_contest/entries.tpl instead, if you use the 'Serendipity 3.0' theme?
2. Using the plug in (includeentry): I have managed to install it by downloading the files and uploading the unzipped folder into the plugins directory. Then I went to the admin panel and configuration section for plugin and voila it had appeared. I installed or activated it.
Basically you did all of that right. I believe your problem could be related to a small oddity that exists in the 1.1 release.

Do you by chance have the plugin 'Extended properties of entries' installed and enabled the option to 'Cache entries'? If so, this might cause the problems for you, and maybe you could set that entry caching to "No"?

If that fixes your problem, the upcoming serendipity 1.1.1 release (or a recent nightly) will fix it for you.

If that does not help, please report back and I'll try to setup a test install to reproduce your problem?

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/
taqi
Posts: 4
Joined: Mon Jan 29, 2007 12:30 pm

Post by taqi »

Thanks for the quick reply,

I did not have the Extended Properties for Entries plugin installed.
(Info on installing that is here: http://www.s9y.org/168.html)

Anyway I installed it and tried cache both on & off, neither have worked.

I am going back to try and tinker with with the entries.tpl file now. Feedback on how I got on.

Taqi.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, I just installed the plugin and it does work for me. Here's what I did:

1. Install the plugin

2. Configuration of the plugin: All categories checked, Show random blocks: No, First entry: 1, Skip entries: 1, allow multiple blocks: no, entry: yes, extended entry: yes, comment: yes, html nuggets: yes

3. Saved the plugin configuration

4. Entered main menu > "Template-Blocks"

5. On the right hand dropdown I chose New Entry, clicked on Go!

6. I entered a title, a body and an extended body, clicked on save.

7. The dropdown top right now shows the created block into it. The left hand dropdown is unrelated.

8. I clicked on "New entry", I entered a title for the entry and inside the body of the entry I entered "[s9y-include-block:1]".

9. Then I saved the entry, viewed it on the frontend and it showed up

Did you maybe perform anything differently?

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/
taqi
Posts: 4
Joined: Mon Jan 29, 2007 12:30 pm

Post by taqi »

HI
Great News!

I skipped steps 4,5 and 6 and it worked fine. I still haven't understood Templates and Blocks and am giving them a bit of a miss for the moment.

I think I understand what went wrong, I had clicked no for the all the various boxes (Entry Body, Extended Body, Comment, HTML Nugget). I clicked "NO" because the little text next to it says "Apply markup to Entry (etc) Body". I assumed this meant literally Apply markup i.e. change the square bracket markup into HTML hence clicked on NO. A suggestion would be to change this to something more clearer such as "Allow inline markup to be used"



Just as a serendipitous aside:
I managed to track down the right template file and it was in the default folder afterall. I just went through every possibility, renamed it via FTP and kept on hitting refresh untill I hit an error. Then I added a bit of text to my template file but I could still ot see the little Hello I had written...until I hit the highlight function in Mozilla whens earching for my test word and voila ! It was right at the top of the page tucked away!

Thanks again for all your help.

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

Post by garvinhicking »

Hi!

Ah, okay. I'm sorry for that confusion then!

The problem is the string "Apply markup" is uniquely used in all markup plugins. All markup plugins have that option and it's always the same. So "markup" corresponds to "markup/effects that this plugins offers should be applied to XXX". However most people have gotten used to that term, so I don't really know if it should be changed...?

Hope you have fun with Serendipity in the future!

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/
taqi
Posts: 4
Joined: Mon Jan 29, 2007 12:30 pm

Post by taqi »

Hi

I guess your right. Hopefully this post will help others.

Just to cap off in including Google Ads: I followed your advice given in a previous post. I thought it would be worth just stating it clearly once again:

I placed the Google Adsense code into a new message and gave it a title and then saved it as a DRAFT message. I worked out the order of the message by counting the position in the ordered list starting at 1. (I am not sure if there is an easy way of working out the numeric number of a post). Then I placed the Markup as given above with the number of the post and hey presto the advert appears.

Taqi
Post Reply