Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
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,014
Likes: 58
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,014
Likes: 58
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
Offline
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 3:46 PM.

My place to be: http://www.freesat.nl
Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
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
Offline
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
OP Offline
journeyman
F
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
v7.7.5 Active Topics Display Name Incorrect
by Jake - 11/17/2020 4:46 PM
custom islands in forums tool
by Ruben - 11/17/2020 3:21 PM
Captcha bug maybe?
by Morgan - 11/16/2020 8:34 AM
Facebook thumbnail issue
by DBryce - 11/08/2020 7:43 PM
No hop to menu in the category pages
by Morgan - 11/05/2020 4:19 PM
Who's Online Now
0 members (), 44 guests, and 53 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5