erkki
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Calendar hack: problem now with php the_dateAnyone please to help sorting out this problem?
Forum: Fixing WordPress
In reply to: Question about the days in calendar…Note for the newbies wasting their time with a messed up calendar (yes, I have to admit I did…)
First of all you have to modify the starting day (default Sunday) in your wp-config-extra.php file, $weekday[0]=’Monday’ instead of ‘Sunday’ then and keep the list logical. BTW, it’s the same process if you translate.
Once done this mod will work smoothly ??
Thank you smo ??Forum: Fixing WordPress
In reply to: wp1.0 week in calendar always starts on SundayHELP! says the newbie fighting with the get_calendar function in order to display Monday as the first day of the calendar and not Sunday!
Sometimes steps are obvious but if you miss one, damn!
I took me quite a while to figure it out (think, Forrest, think) but here’s a “little bit more detailed way” to succeed in customizing the calendar and it’s display.
This solution works pretty well with a small issue though (don’t panic! It’s not that ugly and there’s a fix):
1- You have to modify and translate in wp-config-extra.php the $weekday[0]=’Sunday’ to ‘Monday’ or ‘Maanantai’ in Finnish for example and keep the list logical unless you want to have a funky calendar! (that’s probably where most of the newbies got stucked with non working mod then)
2- Modify the code in template-function.php. (you can also look for // See how much we should pad in the beginning, the mods to make are just below that comment.)
around line 435 replace:
$pad = intval(date(‘w’, $unixmonth));
by
$pad = intval(date(‘w’, $unixmonth)-1);
and
around line 455, replace:
if (6 == date(‘w’, mktime(0, 0 , 0, $thismonth, $day, $thisyear))) by
if (0 == date(‘w’, mktime(0, 0 , 0, $thismonth, $day, $thisyear)))
3- Sit back and enjoy your calendar starting with Monday ??
The “small” issue is (for me at least) that in the first row of February day 1 stands under Tuesday but should be under Sunday. I’ve tried with other months (30 & 31 days) and it just looks fine with rows & cells.
Pity for February?
Here you can fix it (thanks smo!):
https://www.ads-software.com/support/3/2629
Just follow the steps and you’re done!
Thanks to WP community for making this possible:)Forum: Fixing WordPress
In reply to: Links description: how to force description to goThanks for for your advices Sushubh and Mister X ??
I might soon try the get_links. By now I stick to the first option as it displays the break and still validate XHTML Transitional…
Grat help! Thanks again ??
@ Sushubh:
Do you mean that anytime we need to post code examples on this forum, we have to encode first?
Here’s Mister X sample:
<?php get_links(2, '
', '
', '
', 0, 'updated', 1, 0, -1, -1)?>Forum: Fixing WordPress
In reply to: Links description: how to force description to go“Posted: Mar 5, 2004 13:58:42 Sushubh said:
I would like to bump this post, as adding code in the description is not exactly the best way to achieve the desirable effect!”
What is “THE” best way then?
Anybody with a better working solution?
Any ideas about the $between function?
Thanks for digging ??Forum: Fixing WordPress
In reply to: Links description: how to force description to goThank you very much Sushubh ??
It works nicely and I used
in order to validate XHTML transitional.
Thanks again and if someone can explain why the $between = ‘
‘ doesn’t work or if there’s another method I’m still very interested.
WP rocks!