TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 400
  • Total: 400

SMF Calendar Block

Started by Lesmond, September 03, 2005, 11:30:42 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

daftdate

wonderful thank you i have a members birthday coming up next week with an old date so i will let you know how it goes as my birthday was yesterday so cant test it with that one.  :)

jacortina

Well, you can always nudge yours up a couple of days, just to see it displayed. ;)

daftdate

Yep I just did that as i thought it was soft waiting around and it works like a dream thanx a lot.  ;D

JCphotog

This is absolutely wonderful work guys!  It's so attractive! 

I'm curious, is there anyway to set things up so that instead of sending a user to post an event when clicking on a date, that they would be linked directly to the forum calendar so they could see what's happening in the days around that date?

Edit: or even so that only when guests click on a date, they are sent to the calendar, since they can't post events?

rebelrose

Could you add a white background to this?

jacortina

Quote from: JCphotog on September 13, 2006, 06:16:10 PM
This is absolutely wonderful work guys!  It's so attractive! 

I'm curious, is there anyway to set things up so that instead of sending a user to post an event when clicking on a date, that they would be linked directly to the forum calendar so they could see what's happening in the days around that date?

Edit: or even so that only when guests click on a date, they are sent to the calendar, since they can't post events?

Well, the month name at the top takes you to the full month's calendar.


Quote from: RebelRose on September 14, 2006, 02:49:14 AM
Could you add a white background to this?

It uses the standard background for TP blocks (style comes from it).

But you can get it 'mostly' white by changing:
$calendar = '<table>'.'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n.'</caption><tr>';

To:
$calendar = '<table style="background:white;">'.'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n.'</caption><tr>';

jpark

jacortina, could you tell me the specific code to just have the membergroup color show up?  i'm using a mix of codes and i'm not sure what to change.  thank you for this feature, it's great!

rebelrose

Thank you jacortina you have helped me twice tonight, thanks alot.

jacortina

Quote from: jpark on September 14, 2006, 03:06:24 AM
jacortina, could you tell me the specific code to just have the membergroup color show up?  i'm using a mix of codes and i'm not sure what to change.  thank you for this feature, it's great!

Well, not as compact/efficient as it could/should be (loadMemberData takes an array as it's argument), but:


/////////////// holds the user info including color
        global $user_profile;

/////////////// Calls the sub which loads the info
        $dummy = array();
        $dummy[] = $member['id'];
        loadMemberData($dummy);
        $profile = &$user_profile[$member['id']];

/////////////// Outputs a colored name and age in parentheses as link to profile
        echo '<a href="', $scripturl, '?action=profile;u=', $member['id'], '">';
        if (!empty($profile['member_group_color']))
        {
        echo '<font color="' . $profile['member_group_color'] . '">' . $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '') . '</font>';
        }
        else
        {
        echo $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '');
        }
        echo '</a>';


Note that this depends on loading the $member array via:
    foreach ($context['calendar_birthdays'] as $member)

jpark

ooh, okay... i will try this.  Thanks so much for the quick reply!

This website is proudly hosted on Crocweb Cloud Website Hosting.