The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
Sorting pubDate in PHP - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Sorting pubDate in PHP (/showthread.php?tid=2733)



Sorting pubDate in PHP - JoeyDown - 2012-02-10

How can I sort pages with pubDate in php?

I tried something like this...
Code:
array_multisort($childmenusortarray,SORT_STRING,$childmenuarray);

... But it doesn't work.


Sorting pubDate in PHP - Carlos - 2012-02-10

Take a look at my -very simple- recent pages plugin's source code...

(edit) I also played with pubDate sorting in this 'trick' (a core patch):
http://get-simple.info/forum/topic/2056/sort-subpages-by-date-in-page-management/


Sorting pubDate in PHP - Carlos - 2012-02-10

Depending on what you want to do, an easy solution for displaying a list of pages sorted by pubDate would be using the I18N Search plugin.

(Its source code might be interesting for you, too...)


Sorting pubDate in PHP - JoeyDown - 2012-02-10

@Carlos Thank you, but I'm not a good coder, so I can't do it. I'm trying for like an hour. Could you take the code I posted and do it for me, please?

Also - to not open a new thread - how can I, using the posts.xml file, take the title and the post, sort it by date and then post them in a page using exec-php?

I would really appreciate your help!!


Sorting pubDate in PHP - Carlos - 2012-02-10

But what do you want to achieve?

And what is that posts.xml file you say? Some plugin file?


Sorting pubDate in PHP - JoeyDown - 2012-02-10

Carlos Wrote:But what do you want to achieve?

And what is that posts.xml file you say? Some plugin file?

I found the "Recent Pages" plugin that does this job.

pages.xml is under /data/other/. contains information about the pages.