Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] I18N Blog System
#1
GetSimple Tutorial: I18N Blog System

This setup makes the use of two special page types, Blog and Author, and outputs content pertaining to both pages onto the blog entry. This means that content can be defined on an author's page (name, email, avatar, about, etc...), then information from that page can dynamically be echoed onto the blog entry, saving the need to edit each individual entry for such information. Also comes with its own sidebar/snippets bar which can be turned on/off at will for the blog entry.

Enjoy!
Reply
#2
I was looking for something like this. Awesome work tying the special pages together like that. I made one slight change. I have the Multi User plugin installed and set the $blogusername variable with
Code:
<?php $blogusername = return_special_field('user','',false); ?>
to set the username of the blogger instead of having a field in the i18n-blog special page for them to type it in. Of course the user name defined in the author special page and the username defined in the multiuser plugin must be the same.

Note...I had some issues getting your script to work out of the box. I had to remove
Code:
{% blog-functions %}
from the i18n-blog page and add
Code:
<?php get_component('blog-functions'); ?>
in the i18n-blog special page type search code. Just my experience.
Reply
#3
Well thank you for testing this tutorial out and giving some feedback! It's very much appreciated, jay :-)

I think I'll add what you've said about the user field to the tail end of the tutorial, because I hadn't thought of that before - a very nice alteration I feel. Thanks again. :-)

As for the {% blog-functions %} placeholder, did you have the latest DynPages installed? That placeholder would only work if said plugin was installed as well. The only reason I put it in in that format as opposed to the directly coded one that you've provided was so that it was easy to apply for all themes (since I'd need to tell the user 'put this code somewhere in your theme', whereas this was hopefully supposed to get it to operate 'out of the box' as you said).

If not, what was happening initially before you called the component in your theme?
Reply
#4
I am so far only displaying the blog through the i18n search, not the individual blog entries. I have looked at three different ways to include the "blog-functions" component in the displaying page.

1. In the page content using {% blog-functions %}
2. In the search code defined in the blog special page using <?php get_component('blog-functions'); ?>
3. In the Page Template of the displaying page using <?php get_component('blog-functions'); ?>

Method 1: Part of the latest blog is returned. It seems to stop returning the html for some reason. http://pastebin.com/gYy2AQcy
Method 2: All of the latest blog is returned but the next blog is cutoff. Same thing with the html. http://pastebin.com/nNkgixqL
Method 3: Seems to work perfectly.

I have DynPages .7.2 | i18n 2.6 | i18n Special Pages 1.0 | Multi User 1.5 installed.

I have the your default setup installed at http://www.threeleafcompany.com/i18n-blog
My working is at http://www.threeleafcompany.com/blog
Reply
#5
jay_m Wrote:I am so far only displaying the blog through the i18n search, not the individual blog entries. I have looked at three different ways to include the "blog-functions" component in the displaying page.

1. In the page content using {% blog-functions %}
2. In the search code defined in the blog special page using <?php get_component('blog-functions'); ?>
3. In the Page Template of the displaying page using <?php get_component('blog-functions'); ?>

Method 1: Part of the latest blog is returned. It seems to stop returning the html for some reason. http://pastebin.com/gYy2AQcy
Method 2: All of the latest blog is returned but the next blog is cutoff. Same thing with the html. http://pastebin.com/nNkgixqL
Method 3: Seems to work perfectly.

I have DynPages .7.2 | i18n 2.6 | i18n Special Pages 1.0 | Multi User 1.5 installed.

I have the your default setup installed at http://www.threeleafcompany.com/i18n-blog
My working is at http://www.threeleafcompany.com/blog
Okay. Thanks for providing that information. I've installed DynPages, i18n and Special Pages on a fresh GetSimple installation (of the versions that you've said) and still seen no problems. I might have to just alter the tutorial in case others have the same problem.

Btw, I've added your suggestion to the end of the tutorial now and given you thanks for it. :-)
Reply
#6
This is what im searching, but I would like to have a commenting system.
Do you have an easy solution for that?
Reply
#7
m1k3y Wrote:This is what im searching, but I would like to have a commenting system.
Do you have an easy solution for that?
Happy to be of help. :-)
Install External Commenting and follow the installation instructions. Then on your Special Page VIEW tab, paste the below code into your layout where you want the comments to be displayed:

Code:
<?php get_external_comments(); ?>
Reply
#8
Working like a charm ;-) Thx
Reply
#9
Tutorial link says INACTIVE. Is the i18n blog project dead?

Bob
Reply
#10
(2012-10-24, 09:06:52)snooze Wrote: Tutorial link says INACTIVE. Is the i18n blog project dead?

Bob

http://web-beta.archive.org/web/20120517...m/?lang=en

Since it's an old archive, it might not be compatible anymore
Reply
#11
http://mvlcek.bplaced.net/get-simple/i18nspecialpages/
Reply




Users browsing this thread: 1 Guest(s)