Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2001
Posts: 145
Member
Member
Offline
Joined: Mar 2001
Posts: 145
Would be nice to be able to add events to the calendar further back than the code currently allows (which is none).

I'd like to add the back history of my company's releases into the calendar with proper years, but the code doesn't allow me to go backwards with event entries.

Sponsored Links
Joined: Mar 2001
Posts: 145
Member
Member
Offline
Joined: Mar 2001
Posts: 145
Bump - has anyone done this?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Joe this is easy.

In doaddevent.php find this:

Code
<br />// -------------------------------<br />// Make sure it's not an old event<br />if (    ($year < $thisyear)<br />|| ($year == $thisyear && $month < $thismonth)<br />|| ($year == $thisyear && $month == $thismonth && $day < $thisday)<br />) {<br />	$html -> not_right("{$ubbt_lang['OLDEVENT']}",$Cat);<br />}<br />


Comment out the not_right line like this:
Code
<br />// -------------------------------<br />// Make sure it's not an old event<br />if (    ($year < $thisyear)<br />|| ($year == $thisyear && $month < $thismonth)<br />|| ($year == $thisyear && $month == $thismonth && $day < $thisday)<br />) {<br />//	$html -> not_right("{$ubbt_lang['OLDEVENT']}",$Cat);<br />}<br />

Joined: Mar 2001
Posts: 145
Member
Member
Offline
Joined: Mar 2001
Posts: 145
Danke!

Joined: Mar 2001
Posts: 145
Member
Member
Offline
Joined: Mar 2001
Posts: 145
I implemented that, and it didn't work. I think because there's something that needs to be done to addevent.php as well? When I tried to add an event, I wasn't using doaddevent, I was just using addevent, which only gives me 2004-2014. That's where I need to go into the past.

Edit: I looked at it myself, and figured it out. I edited addevent.php. Found this:

Code
 <br />$selectyear = "<select name=\"year\" class=\"formboxes\">"; <br />for ($i=$thisyear;$i<=($thisyear+10);$i++) { <br />	$selected = ""; <br />	if ($i== $thisyear) { <br />		$selected = "selected=\"selected\""; <br />	} <br />	$selectyear .= "<option $selected>$i</option>"; <br />} <br />


Changed this line:

for ($i=$thisyear;$i<=($thisyear+10);$i++) {

To this:

for ($i=($thisyear-20);$i<=($thisyear+10);$i++) {

I picked minus 20 as that should about cover how far back I want to go.

I had to make the same code update in editevent.php as well to allow for the selection of a year into the past.

Last edited by Joe Siegler; 09/03/2004 2:10 PM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
A yeah, good idea - I was only worrying about the check that was stopping you.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)