Importing and sorting a blog

Author Message

Marco Carnazzo

Tuesday 15 November 2005 2:24:27 am

Hi.

I have to import a blog from b2evolution to ezPublish.
First question: is there a script to do it?
I think no, so I decided to insert manually every post.
I created a new datefield for weblog class and I want to sort every post using this field.
But how?

Searching infos in this forum I found this follow solutions:

1. Using priority like a date (i.e. setting "20051115" as priority for a today post) and sorting post by priority. But how can I set priority automatically?

2. Using "<datefield>, <title>" as object pattern name and sorting post by name. But so, ezPublish uses long date as name and sorts post in this way: first every post inserted on Friday, then every post inserted on Monday, then every post inserted on Saturday and so on...
I tried to use "<datefile|datetime(custom, "%Y %m %d")>, <title>" but without success.

3. Some strange solutions using fetch, sort_by and templates, but I didn't understand very well :)

Can someone help me?

Christian Johansen

Tuesday 15 November 2005 4:55:53 am

You can do the "strange" things with the templates :) If you read everything on this page, I'll almost guarantee that you'll understand what to do:
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/content/fetch_functions/list

You can use a datetime field and sort on that. My experience (though short with eZ) is that dates when ordered won't display today, but a date and time will. Hope this made sense.

Marco Carnazzo

Tuesday 22 November 2005 10:02:16 am

Thank you for the reply.

I followed your suggestion: it was hard but now I'm able to sort object by every attribute :).

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 07:28:21
Script start
Timing: Jan 19 2025 07:28:21
Module start 'layout'
Timing: Jan 19 2025 07:28:21
Module start 'content'
Timing: Jan 19 2025 07:28:21
Module end 'content'
Timing: Jan 19 2025 07:28:21
Script end

Main resources:

Total runtime0.0162 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.1563152.6250
Module start 'layout' 0.00650.0029 741.781339.4453
Module start 'content' 0.00940.0048 781.226689.2109
Module end 'content' 0.01420.0019 870.437530.3047
Script end 0.0161  900.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.2442140.0002
Check MTime0.00116.8305140.0001
Mysql Total
Database connection0.00116.657910.0011
Mysqli_queries0.002616.211830.0009
Looping result0.00000.092910.0000
Template Total0.00169.610.0016
Template load0.00085.203310.0008
Template processing0.00074.412510.0007
Override
Cache load0.00053.341510.0005
General
dbfile0.00042.410680.0000
String conversion0.00000.054640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs