Previous Thread
Next Thread
Print Thread
Hop To
#254527 01/05/2014 1:09 PM
Joined: Feb 2007
Posts: 60
B
journeyman
journeyman
B Offline
Joined: Feb 2007
Posts: 60
I am using version 7.5.5. Perhaps the answer to my question lies in an upgrade or belongs on a wish list.

While in Calendar view, users cannot jump back to previous years. It's amazing how long this software has been running on our website and NO ONE has complained about this before. Anyway, has this feature been added to more current versions?

While on the topic of wish lists, is it now possible to create events that last multiple days?

Thank you,

Bill Allen #254528 01/05/2014 1:27 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
currently the only was to go back in time is to use the previous month link on the bottom left of the calendar.
reoccur option is only monthly,yearly.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Bill Allen #255696 07/17/2014 3:54 PM
Joined: Mar 2011
Posts: 39
newbie
newbie
Joined: Mar 2011
Posts: 39
I believe this is in the wrong place for this question: Should be in the other "How Do I?" section below this one. However; we are asked this question often and have a work-around to review previous years if anyone wants to PM me. Was not sure if posting the workaround here was allowed. Add a link between "Previous Month" and "Next Month" - Ours is: "Previous Year" - that takes you back one year at a time each click of the link.

Simple but effective:

UBBest!


Ancient and Honourable, John West.
Bill Allen #255697 07/17/2014 6:10 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
untested!!!
Okay to edit the jump menu which defaults to ten years future and add ten years past.
find in
scripts/calendar.inc.php
Around line 124
PHP Code
 ($i=$tyear;$i<=($tyear+10);$i++) 
and change it to
PHP Code
 ($i=$tyear-10;$i<=($tyear+10);$i++) 

Give it a try.
If you want to add more or less years future or past.
Just change the value 10. the left value is past. The right value is future.

Last edited by Ruben; 07/17/2014 6:39 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Bill Allen #255698 07/17/2014 7:49 PM
Joined: Mar 2011
Posts: 39
newbie
newbie
Joined: Mar 2011
Posts: 39
Awesome Ruben! That should work for all themes whereas the other method would only apply to the themes desired. Maybe it will make it into the next update so the need to add it to scripts/calendar.inc.php after each version update would not be necessary. Thanks again.


Ancient and Honourable, John West.
Bill Allen #255699 07/17/2014 9:14 PM
Joined: Mar 2011
Posts: 39
newbie
newbie
Joined: Mar 2011
Posts: 39
OK I am getting requests for the "other" version I mentioned so if you don't mind I will just go ahead and post it here since Ruben said it was ok.

Ruben's method is to add 10 previous years to the drop down jump box.

***********************************************

This mod adds the "Previous Year" ----- "Next Year" to the styles template (default or your own)thus resolving the version update re-add issue and other perks.

ADDING "PREVIOUS YEAR ----- NEXT YEAR" link to UBB Calendar version 7.5

Back up all files 1st:

Open ~ templates/default/calendar.tpl and find;

PHP Code
<table width="100%" cellspacing="0">
<tr>
<td align="left" valign="top" width="50%">
<a href="{ubb url="ubb=calendar&month=`$prevmonth`&year=`$prevyear`"}">{$lang.PREVMONTH}</a>
</td>
<td align="right" valign="top">
<a href="{ubb url="ubb=calendar&month=`$nextmonth`&year=`$nextyear`"}">{$lang.NEXTMONTH}</a>
</td>
</tr>
</table> 

Replace with:

PHP Code
<table width="100%" cellspacing="0">
<tr>
<td align="left" valign="top" width="33%">
<a href="{ubb url="ubb=calendar&month=`$prevmonth`&year=`$prevyear`"}" alt="{$lang.SEARCHPREVMONTH}">{$lang.PREVMONTH}</a>
</td>
<td align="center" valign="top" width="33%">
<a href="{ubb url="ubb=calendar&month=`$prevmonth+1`&year=`$prevyear-1`"}" alt="{$lang.SEARCHPREVYEAR}">{$lang.PREVYEAR}</a> ----- <a  href="{ubb url="ubb=calendar&month=`$nextmonth-1`&year=`$nextyear+1`"}" alt="{$lang.SEARCHNEXTYEAR}">{$lang.NEXTYEAR}</a>
</td>
<td align="right" valign="top">
<a href="{ubb url="ubb=calendar&month=`$nextmonth`&year=`$nextyear`"}" alt="{$lang.SEARCHNEXTMONTH}">{$lang.NEXTMONTH}</a>
</td>
</tr>
</table> 

Close and upload:

Open ~ languages/english/calendar.php and find;

PHP Code
?> 

above this add;

PHP Code
$ubbt_lang['PREVYEAR'] = "&lt;&lt; Previous Year";
$ubbt_lang['NEXTYEAR'] = "Next Year &gt;&gt;&gt;";
$ubbt_lang['SEARCHPREVYEAR'] = "View Previous Year!";
$ubbt_lang['SEARCHNEXTYEAR'] = "View Next Year!";
$ubbt_lang['SEARCHNEXTMONTH'] = "View Next Month!";
$ubbt_lang['SEARCHPREVMONTH'] = "View Previous Month!"; 


Make sure there is no white space (extra space) after the ?>

Save and Upload ~ Close all files.

You should see the Links at this point; feel free to customize as you go...

I posted this on the fly so if you have any problems let me know and I will recheck the coding even closer. Should be fine and I have tested both options here repeatedly.

Last edited by John West; 07/17/2014 9:36 PM. Reason: Code updated - noticed month changing with year FIXED!

Ancient and Honourable, John West.
Bill Allen #255700 07/17/2014 10:00 PM
Joined: Mar 2011
Posts: 39
newbie
newbie
Joined: Mar 2011
Posts: 39
OK we have tested and re-tested both of these suggestions with no bugs at all evident or/nor reproducible.

To see "both" modifications at work at one of our Forums you are welcome to visit - https://www.thecomforters.org/discussion/ubbthreads.php?ubb=calendar - No plug intended as that site does not solicit members. If the Team thinks it necessary just edit this post and they can see it in action once they are done at their own Forum.

Thanks Team UBB - UBBest!


Ancient and Honourable, John West.

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 919 guests, and 149 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)