Importing from other guestbooks

More
11 years 7 months ago #12465 by Hawk
www.alexisbatastini.com/TestGues ... &order=asc

In case you want to see what I am talking about.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #12466 by Pete
The guestbook shows entries in descending order (based on the order they were added in). If you think about this, if users keep adding new entries as time goes by, the date they were added will always increase, so this would mean that the entries would show in descending date order automatically, unless you have manually added entries to the data file or imported entries from a different guestbook that did not store entries in this manner.

Does this make sense?

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #12468 by Hawk
Totally makes sense. I am referring to the old data from the old flat file. I would like to sort it so the oldest is last as well. It is the opposite, except for 5 or so entries. Every entry is from the converted flat file except the one I did today with Test in the body.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #12469 by Pete
In your case you may have to do some manual editing. Take your data file for example:

www.alexisbatastini.com/TestGues ... a/list.txt

Open this file in Notepad, you will see something like this:
Code:
O:7:"gbClass":4:{s:6:"gbDate";s:23:"May 31, 2012 - 12:44 PM";s:6:"gbFrom";s:6:"Morgan";s:7:"gbEmail";s:20:"mbatastini@aflac.com";s:9:"gbMessage";s:721:"Hey Sissy... To say that I miss you would be the understatement of the century. Words cannot express just how badly I wish you were still here with me, but I know that you are watching over me and are with me every step of the way, in everything that I do. Today you would have turned 22 and I can just imagine the wonderful and beautiful woman you would have become. God is so lucky to have you amongst his angels and I am even more lucky to have you as my sister and Guardian Angel. I hope you are throwing one heck of a party in Heaven and know that we are all thinking of you, missing you, and loving you from down here, not just today but everyday. Sending butterfly kisses and the biggest hug - Your Big Sister";}<!-- E -->O:7:"gbClass":4:{s:6:"gbDate";s:20:"Thu 09/20/12 12:29PM";s:6:"gbFrom";s:4:"Mike";s:7:"gbEmail";s:13:"blah@blah.com";s:9:"gbMessage";s:9:"Test <br>";}<!-- E --> ...

Each post is separated from the next using the "<!-- E -->" separator, which means you can copy and paste an entry like the following:
Code:
O:7:"gbClass":4:{s:6:"gbDate";s:20:"Thu 09/20/12 12:29PM";s:6:"gbFrom";s:4:"Mike";s:7:"gbEmail";s:13:"blah@blah.com";s:9:"gbMessage";s:9:"Test <br>";}<!-- E -->

And then paste it after another entry "<!-- E -->" separator.

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #12470 by Hawk
So dont change the data itself, just rearrange the order in the list.txt?

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #12471 by Pete
Correct. I don't recommend changing the data, because if you do you will have to also change the length of the string that each serialized attribute contains, and that tends to get very tedious. Just rearrange the order of the whole entry.

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.129 seconds
Powered by Kunena Forum