Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Exapnding the date range choice in Blog


Print Track
I am wanting to consolidate blog/journal data form various other sources (offline journal, a Wordpress blog, etc.) into the v8.00.21 blog now that I have one consolidated place to have all located. In doing so, I'd have to add entries into my PHP-Fusion v8.00.21 blog with original dates. The only choices for years in the "from" date dropdown starts with current year.

Is there a setting or other way to expand the year choices in the "from" date, particularly, to say 1975 or the standard 1/1/1970?

4 replies

You find it in administration/blog.php line 393,
CodeDownload  
for ($i = (isset($blog_start['year']) && $blog_start['year'] != "----" ? $blog_start['year'] : date('Y')); $i <= date("Y", strtotime('+10 years')); $i++)


You can fiddle with that or just hard code the option.
To programmers this will be a dumb question but I know nothing about programming in PHP.

Do I change ($blog_start['year']) in every instance on that line to the year I want the year choice to start?
A quick sample,

CodeDownload  
// for ($i = (isset($blog_start['year']) && $blog_start['year'] != "----" ? $blog_start['year'] : date('Y')); $i <= date("Y", strtotime('+10 years')); $i++)
// echo "<option".(isset($blog_start['year']) && $blog_start['year'] == $i ? " selected='selected'" : "").">$i</option>\n";
    echo "<option value='1990'>1990</option>\n";
      echo "<option value='1991'>1991</option>\n";



If you still don´t get the hang of it. Use phpMyAdmin and enter values of dates manually directly on the blog date entries.
This converter tool will help you get the epoch values https://www.epochconverter.com/
I believe I got it, thanks!
author songiuno
forumContent Administration - 8
replies5 posts
viewed331 times
activeLast updated on 3 months ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, songiuno