Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
Hi there,
I want to edit calendar.inc.php code so that the date number is display BEFORE the number of events on that day (primarily because I want to align all the text left instead of the default right), and can get my head round what I need to change. Can someone help me out?
Thanks,
Phil

Joined: Jun 2006
Posts: 16,289
Likes: 115
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,289
Likes: 115
Generally, the script file contains the code to generate the data; the template file contains the code that shows what is to be displayed to the browser.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jan 2008
Posts: 222
enthusiast
enthusiast
Joined: Jan 2008
Posts: 222
So you want to align the daynumber to the left of the square?

Check line 406 of calendar.inc.php

Rob

Last edited by Robje01; 03/25/2009 4:46 PM.

My place to be: http://www.freesat.nl
Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
@ Gizmo, in this case the script generates the displayed data dynamically and the template file simply displays it without any further formatting.

@ Robje01, the code is indeed at line 406 of calendar.inc.php but simply changing...

$linkstart{$printdate}$linkstop
to
{$printdate}$linkstart$linkstop

...gives the desired aesthetic but prevents the date number from becoming part of the link, effectively breaking usage on the smaller (next month, previous month) calendar. The code that needs editing is line 377 to 394 but I'm not good enough with php to work it out.

Any other suggestion welcomed!
Cheers,
Phil

Joined: Jan 2008
Posts: 222
enthusiast
enthusiast
Joined: Jan 2008
Posts: 222
Line 392,

Change $linkstart .= "($total {$ubbt_lang['EVENTS']}) ";

To $linkstart .= $printdate." ($total {$ubbt_lang['EVENTS']})";
and remove the {$printdate} from line 406


Rob


My place to be: http://www.freesat.nl
Joined: Oct 2005
Posts: 50
F
journeyman
journeyman
F Offline
Joined: Oct 2005
Posts: 50
Thanks Rob but that method does not quite work, that would print the date number ONLY on days that have events - all days on the calendar that have no event would not have a date number how.

I have now solved the original problem using css, so line 392 now reads...

$linkstart .= "($total {$ubbt_lang['EVENTS']})<span style=\"float:left;height:1em;padding-right:4px\">";

and line 394 reads...

$linkstop = "</span></a>";

Bit of a hack but it works fine, see link below to my forum calendar:

Calendar Page


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Forum Privacy Policy
by ECNet - 02/26/2024 11:58 AM
Who's Online Now
2 members (Nightcrawler, Ruben), 322 guests, and 160 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)