TinyPortal

Development => Support => Installation => Topic started by: Smoothbrain on March 03, 2009, 07:52:49 PM

Title: TP 1.0.5 to latest version
Post by: Smoothbrain on March 03, 2009, 07:52:49 PM
Hello all, when I had previously installed v.1.0.5 I had done a manual install.  I also have several mods piled on top of my site besides TP ( i know, why should I really need anything else, lol)  My package manager will give me several failed errors  when I attempt to upgrade through it. 

So... simply put, do I need to manually uninstall 1.0.5 (and if so how?) and do I then need to manually install 1.0 b3?
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 03, 2009, 07:54:15 PM
oh and I have SMF 1.1.8  thanks for your help
Title: Re: TP 1.0.5 to latest version
Post by: G6Cad on March 03, 2009, 08:03:46 PM
No, you dont  have to uninstall TP V1.0.5, upload/overwrite with the new files, change the code inside the SMF files according to the posting guide, and update the database tables from the browser.

How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 03, 2009, 08:07:19 PM
Thanks heaps G6.  That helps things with my brain getting fried too fast lol.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 03, 2009, 10:36:37 PM
Ok got it all set up and now I can't see my menu box.  It is just an empty box.  In addition, how do I get the skin to show up as the one I have set? (it's a custom skin)
Title: Re: TP 1.0.5 to latest version
Post by: IchBin on March 04, 2009, 12:16:18 AM
You can get all your answers by using the search here. Please describe your problem in detail too. When you say menu is blank, I can only assume that you're talking about the admin menu in the admin panel? You try searching for that? I know that question has been asked and answered 100's of times. Which is the reason there is an FAQ on it. That is IF you are really talking about the admin menu.
Blank Admin Panel or Text missing? (http://docs.tinyportal.co.uk/index.php?topic=34)

As for using a theme, take a look at your Admin > Themes and Layout page.



Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 01:35:32 AM
My apologies for poor posting etiquette.  I was a bit vague but I was also working on various upgrades all day so my mind was a bit fried.

First, the panel I talk about is the menu block panel (ie the site map, nothing to do with the admin).  It is just an empty block on the left hand side.

Second, the skin issue I am referring to is how to get my custom skin to show up on the TP.  I am seeing it on my forums but not on the front page which is TP.  Thanks again. 
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 01:45:20 AM
Ok so the FAQ says this
Quote
A couple of things you need to check:.

Did you install TP while on the default theme, with your forum set to the default theme?
Do you see the side panels on the default theme?
If the above suggestions are true and its working, then you are probably using a custom theme that is not converted to work with TP. Remember TP 0.9.x requires a separate theme converted to work with TP. Unless the option for TP to work in both SMF and TP is built into the theme. Find the appropriate download for your version of SMF/TP.

Does this mean I need to put the manual install info into my custom skin?  Will this get it to work?  Because it is not clear from this FAQ if that is what it is telling me.  In other words I think your FAQ is telling me what is wrong but not how to fix it.  Thanks.

If that is the problem and I do need to manually insert the bits into my skin, I will only need to change the index.template, the css and the help.template.php is that correct?
Title: Re: TP 1.0.5 to latest version
Post by: Ken. on March 04, 2009, 01:50:12 AM
Did you install TinyPortal while in the SMF Default theme? All Mods, including TP, must be installed while in the SMF Default theme.

As for your custom theme, most custom themes only need to have a forum button added for them to work with TP.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 01:53:06 AM
Quote from: Ken. on March 04, 2009, 01:50:12 AM
Did you install TinyPortal while in the SMF Default theme? All Mods, including TP, must be installed while in the SMF Default theme.

As for your custom theme, most custom themes only need to have a forum button added for them to work with TP.

Well, I manually installed it.  I was not in the default skin.  I just went to the tp_install file online after I followed the other instructions.  I don't have myself set on the default skin however at this time.  The boards default overall skin is set on default at this time.
Title: Re: TP 1.0.5 to latest version
Post by: IchBin on March 04, 2009, 01:55:47 AM
If your forum is set as one theme, and your frontpage is another this means that you have an article set to override the theme settings. Go into all your articles settings and look at the theme setting and set it so that its not overriding the theme.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 03:08:35 AM
Ok I looked at every article and it says -none- in the pulldown menu where I select what skin to use.  Is this the correct setting?
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 03:11:12 AM
As far as the site map menu not showing up.  I switched to default menu and it is a blank box there as well.  Thanks again.   :uglystupid2:
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:29:35 AM
As far as this site map menu you mention, is this a Sitemap block or a menubox block?  For either one, you need to set it up but the way you do it depends on which one you are using.

Can you show me a screenshot, or better yet, a link to your site so that I can see it for myself.

If all of your articles show -none- for what theme to show, there is no reason I can think of that your Front Page wouldn't be using the same theme as your Forum.

If you can't figure out the issue with the themes being different, setup a temp account with admin rights and send me a PM with the login info (username and password).  Don't post that info here.  This way I can take a look inside the box.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 04:45:11 AM
Hey ZarPrime I will send you a pm.  Thanks.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 12:43:08 PM
Smoothbrain,

OK, I've got it.  Give me a little time to look at today's topics and then I'll take a look at it.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 02:42:03 PM
Smoothbrain,

OK, I'm still working on the theme issue (showing the same theme on the front page).  I think this has to do with the way you are showing your Front Page.

Note that your menu block now shows the internal menu on your home page (http://bandalumni.startlogic.com/).  In your menu, you had "Sitemap" checked for all items.  This is why the links weren't showing in the menu block.  I unchecked all of them and the links now show up.  I added a SiteMap block below the Donate block.  Right now, it shows only the Downloads link.  If you don't want to show a link to Downloads you can turn this block off.  However, if you go back into your internal menu and check "SiteMap" for all links, the links will show up in the SiteMap block along with the Downloads link.  If you do this, then the links will no longer show up in the menu block.

What this does is allow you to show the menu links in either a menu block or a Sitemap block but not both.  If you wanted them to show up in both, you'd have to setup a second menu.  I hope this is clear.

Now, I'm going to go back in and fix the theme issue so that your band theme shows up on the frontpage as well as everywhere else.  However, I did notice something strange about this theme.  Whoever created the theme has rearranged the menu at the top in somewhat of a bizarre fashion.  When they did this, they removed any reference in the theme to show the Admin menu item.  If you want that back in there, you are going to have to talk to the person who made this theme and tell them you need that reference back in there.  Otherwise, the only way you will be able to get into the Admin section, even when logged in as an Admin, will be to add "?action=admin" to the end of the url for the homepage like this --> http://bandalumni.startlogic.com/index.php?action=admin

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:02:30 PM
OK, first off, I removed the AdvShout Module and added the Simple Shoutbox instead.  The AdvShoutBox is no longer supported and will give you more problelms than it is worth.

Second,  the reason your theme wasn't showing on the Front Page is because you had an article set to be featured on the Front Page.  This is now off and the Forum default theme, which is the band theme should show everywhere.  Until you get the lack of an Admin button in that theme sorted, I have added a theme selector which will only be visible to Admins.  When you want to go into Admin you can select the SMF default theme to show and an Admin button will show up at the top.  Selecting the SMF default theme to show will xhange it only for you.

You have a lot of Mods that could be interfering with the way the Forum works.  In your menu, a couple of the links go to the Forum instead, like the Donate link and the Links link.  There is no way for me to be able to sort those out.  You will have to talk to the creators of those mods to ask them what the problem is.

In any case, this should fix the problems that you outlined above.  Let me know if there's anything else you're having problems with regarding TP, but I think this will fix you up.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 03:06:11 PM
Thanks Zar, you totally rule.  I know where to look to fix the donate and the Links link.  I also know what is up with the admin etc buttons not being there.  I have a small code i need to add at the top which will list those buttons at the top of the page in a more discreet fashion so that the streamlined buttons for our regular users are present.  At this point although there are more then one admins I am the only admin really with any TP/SMF knowledge so it shouldn't be a huge problem.  The only thing I was worried aobut was I was having this cookie problem with an older version of that band skin and was worried it was the top strip the skin creator made.  That is why I have not added it back in as of yet.  If worse comes to worse I might hit you up for some more advice.

Until then, thanks sooooo much for your time and efforts.  I really appreciate it.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 03:08:54 PM
One quick question.  On my discussions page.  The menu box is not left justified. Is there a quick fix for this?  Thanks again.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:10:58 PM
Smootbrain,

No problem, glad I could help.  I will mark this topic solved then.

I would also suggest that you go into Admin and take a look at the various changes I made, mostly what I mentioned above.  It will help you a lot to learn how the new version of TP works.

Glad to know we got you sorted out. :up: ;D

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:12:22 PM
Quote from: Smoothbrain on March 04, 2009, 03:08:54 PM
One quick question.  On my discussions page.  The menu box is not left justified. Is there a quick fix for this?  Thanks again.

Hold on, let me look at that.  BRB.  I'll post an edit to this message.

Edit:  Are you talking about this (see image)?
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:37:00 PM
Look at my message above.  Is that gap what you're talking about?

If that gap is what you're talking about, there is a 4 pixel padding which can't be changed without changing it in one of the TP php files.  I'm not sure where that is.

Anyway, each menu item can have 1 of 4 positions.  On your page now, I set the top 4 menu items to be in different positions.  You can change this back to first position if you want by going back to the internal menu in Admin and setting them all back to 1st position.  Click the globe below my Avatar and take a look at the Site Menu on that page.  The different positions can be used to do something like this.

If you don't like the way that this looks, go back into the internal menu and check "SiteMap" for all the links, and go back Home and check to see if you like the way it appears in the SiteMap block better.  That's the one with the Downloads link.  You might like the looks of that better.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 03:51:37 PM
Ok my stupid work computer is not letting me use anything but a bmp file to saved this.  So... Do you want me to email you the file so you can see what I mean?  I am wondering if the justification is just a byproduct of my laptop here at work.  I can't remember if I see it left justified or not at home but I know it is on your shot that you posted.

EDIT: And no, not the gap, that was fine, sorry, not answering yoru questions lol.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 03:54:32 PM
It could be a browser thing.  What browser are you using on the laptop?

I'll go ahead and change the positions of those first 4 items back to first position.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 04:07:51 PM
I hate bitmaps (.bmp).  If you can't save it as anything but a bitmap, can you go to this website --> http://www.pictureresize.org/online-images-converter.html

This will let you convert the bmp to png or something and will give you a link that you can put into a message here that will be good for 30 days.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 05:19:35 PM
OMG that tool is awesome!

HEre is the linkie: http://www.go2convert.com/processed/149aeb7f2deb7a3.2166686329.jpeg
I belive I am using IE7 here at work.  Where do you see the version?
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 05:25:53 PM
If you can't see the top menu of the browser, like File, Edit, etc., you probably have IE7.  Hit your Alt key and the menus will appear.  Click on Help and drop down to About, and click.  that should tell you the version.

The way the menu appears, this could be a bug in the way menus are shown in IE7.  In the meantime, I'll check it in IE7 and see how it shows up for me.

ZP
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 05:48:33 PM
Yup IE7.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 06:53:33 PM
One more minor issue you might be able to help me with.

When someone logs in, it brings them to the discussion page not to the front TP page.  Is there an easy setting for this?  Thanks again.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 09:07:45 PM
Smoothbrain,

It looks like your menu links are being centered in IE7 instead of being left justified.  Can you place this into the bugtracker as this may be a bug, especially because it is confirmed on your site.  When you put it into the bugtracker, be as specific as you can on the bug, and reference this topic.

On the login redirect, have a look at this topic --> Login/shoutbox Redirect (http://www.tinyportal.net/index.php/topic,23213.msg188221.html#msg188221)

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 09:38:52 PM
Smoothbrain,

Never mind about putting that bug in the bugtracker.  I'll go ahead and put it in and I'll attach your image here and direct Bloc here so that he can see it.

ZarPrime

EDIT:  The bug has been posted --> http://www.tinyportal.net/index.php?action=bugtracker;sa=bug478
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 04, 2009, 10:30:43 PM
Oh thanks for posting it. I just got home from my work commute and was gonna do it before I had dinner.  BTW, my son thinks your avatar is very cute.  He is 6.

I have one hopefully final question.  Again, it is not a major problem but the skin on the downloads page is still showing up as the default skin.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 04, 2009, 11:10:00 PM
Smoothbrain,

Don't be afraid to play with your settings.  Go to Admin --> TinyPortal --> Downloads and click settings.  Somewhere near the bottom you should see something like "Use only this theme:".  Select the band theme.

The Avatar is kind of a lovable looking character isn't it?  ;D That Avatar is actually a closeup of one I use in a Forum for a game I play (full image shown below).  When he's feeling a little upset, he has a second Avatar he uses.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 05, 2009, 01:06:23 AM
Smoothbrain,

The issue with the centered menu links in IE7 seems to be a theme issue, according to Ichbin.  Have a look at this post --> http://www.tinyportal.net/index.php/topic,28703.msg228869.html#msg228869

You might have to ask the person who created the theme about this.

Also, 3 of your boards are set to use the SMF default theme, so you might want to have a look at those.

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 05, 2009, 04:15:52 AM
Thanks for all of your help Zar Prime.   I will look at those threads you posted tomorrow from work and you can mark this topic solved.  I will poke you if there is anything else that really bothers me.  I got those admin buttons back up again and everything is at least functional and somewhat purty.

I will go through the whole board tomorrow and find what is set where and make sure it is set up to the Band Skin as well.

I have to say you have been the most helpful person I have spoken to at SMF, TP and a few other places.  I really appreciate it.  I like to play with things but sometimes it is also nice to have someone to consult while you are playing with settings so you don't wind up breaking too many things at once.  :2funny:

P.S.  Thanks for sharing the full length cute avatars.  I will show my son tomorrow when he is hanging on my arm while I am at my computer.  (we are trying to make him into a little computer gaming geek, lol.) 
Title: Re: TP 1.0.5 to latest version
Post by: G6Cad on March 05, 2009, 06:57:01 AM
I did manage to duplicate this after some time.

When i moved my donation block to the left panel my site menu went the same way, looked at the code in the donation block, and saw that it missed out on the closing center tag for the donation button. Added it and everything worked fine.
The closing tag seem to be missed out from paypals own generator as i have only just copied and pasted the code from them.

Check your block code in use, not only for the donation, but all of them, Make sure every thing have the closing tags to the code, expecially the code you use that have center tags in them.
Title: Re: TP 1.0.5 to latest version
Post by: ZarPrime on March 05, 2009, 01:23:49 PM
Smoothbrain,

I didn't think about the possibility that a closing tag could be missing with that donate button but that could cause a problem with the other blocks.  When you get a chance, look at that donate button as G6 mentioned and see if it's missing that tag G6 mentions.

Also, check that upper block with the "Buy Your BnB Tickets Here!" to make sure all the tags are correct.

Thanks Ichbin and G6.  3 or 4 brains are always better than 1 or 2.  Sometimes a smooth brain or 2 doesn't always run that way. ::)

ZarPrime
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 05, 2009, 05:17:18 PM
he he lol.  I am checking things now but can't see where I am missing anything.

EDIT: as far as I can see they are all closed.  It is this code for most <p align="center"> and then ends </p>  I put a </align> before the </p> and that made no difference one way or another.
Title: Re: TP 1.0.5 to latest version
Post by: IchBin on March 05, 2009, 05:38:20 PM
Post your code, but take out any ID numbers that you don't want seen please.
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 05, 2009, 07:38:31 PM
Code for the Donation:
<p align="center"><a href="http://bandalumni.startlogic.com/index.php?action=treasury"><img alt="" src="http://bandalumni.startlogic.com/Themes/default/images/x-click-but21.gif" /></a></p>

Code for the Random Picture:
global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;

require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();

if (loadlanguage('MGallery') == false)
  loadLanguage('MGallery', 'english');

$items = getMediaItems(0, 1, 'RAND()');

echo '
<center><table border="0">
  <tr>';

foreach ($items as $item)
  echo '
    <td>
      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=item;id=',$item['id'],'"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';thumb" /></a><br />
      ',$txt['mgallery_views'],': ',$item['views'],'<br />
      ',$txt['mgallery_posted_by'],': <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['mgallery_in_album'],': <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
      </div>
    </td>';
echo '
  </tr>
</table></center>';
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 05, 2009, 07:40:17 PM
code for the calendar:
global $scripturl, $modSettings, $context, $db_prefix, $user_profile;

smf_loadCalendarInfo();

$now = mktime() + $modSettings['time_offset'] * 3600;

$today = date('j',$now);
$year = date('Y',$now);
$month = date('n',$now);

$days = array($today=>array(NULL,NULL,'<a class="smalltext" style="color:steelblue; font-weight:bold; border:solid 1px black; background-color: white; padding: 0px 4px 0px 4px;" href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$today.'" target="_self">'.$today.'</a>'));

$day_name_length = 2;
// Change for more letters

$month_href = $scripturl . '?action=calendar&month=' . $month;
$first_day = 0;
$pn = array();

$first_of_month = gmmktime(0,0,0,$month,1,$year);

$day_names = array();                                      #generate all the day names according to the current locale
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400)    #January 4, 1970 was a Sunday
    $day_names[$n] = ucfirst(gmstrftime('%A',$t));         #%A means full textual day name

list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));

$weekday = ($weekday + 7 - $first_day) % 7;                #adjust for $first_day
$title   = htmlentities(ucfirst($month_name)).' '.$year;   #note that some locales don't capitalize month and day names

@list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable
if($p) $p = '<span class="smalltext">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> ';
if($n) $n = ' <span class="smalltext">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>';
$calendar = '<table>'.'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n.'</caption><tr>';

/////////////////////////////////////////////////////////////////
//   CALENDAR SECTION
//
if($day_name_length){                                      #if the day names should be shown ($day_name_length > 0)
    foreach($day_names as $d)
    $calendar .= '<th class="smalltext" abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
    $calendar .= '</tr><tr style="text-align:right;">';
    }

if($weekday > 0) $calendar .= '<td class="smalltext" colspan="'.$weekday.'"> </td>'; #initial 'empty' days

for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){
    if($weekday == 7){
        $weekday   = 0; #start a new week
        $calendar .= '</tr><tr style="text-align:right;">';
        }

    if(isset($days[$day]) and is_array($days[$day])){
        @list($link, $classes, $content) = $days[$day];
        if(is_null($content))  $content  = $day;
        $calendar .= '<td '.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>').($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>';
        }
    else
        {
        $calendar .= '<td class="smalltext" style="padding-right:4px;"><a';
        if(((($weekday+$first_day) % 7)==0)||((($weekday+$first_day) % 7)==6))
            {
            $calendar .= ' style="color:#C00000;"';
            }
        $calendar .= ' href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$day.'" target="_self">'.$day.'</a></td>';
        }
    }

if($weekday != 7) $calendar .= '<td class="smalltext" colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days

echo $calendar.'</tr>';

/////////////////////////////////////////////////////////////////
//   BIRTHDAY SECTION
//
if (!empty($context['calendar_birthdays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_bdaycolor'] . ';">Birthdays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_birthdays'] as $member)
    {
        $query = db_query(
            "SELECT birthdate
            FROM {$db_prefix}members
            WHERE ID_MEMBER='".$member['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $birthdate = strtotime($row['birthdate']);

        mysql_free_result($query);

        $dummy = array();
        $dummy[] = $member['id'];
        loadMemberData($dummy);
        $profile = &$user_profile[$member['id']];

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$birthdate) . '"><strong>' . date("M j",$birthdate) . '</strong></a>';
        echo ' - ';
        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>';
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   EVENTS SECTION
//
if (!empty($context['calendar_events']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_eventcolor'] . ';">Events</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_events'] as $event)
    {
        $query = db_query(
            "SELECT startDate
            FROM {$db_prefix}calendar
            WHERE ID_EVENT='".$event['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $startdate = strtotime($row['startDate']);

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$startdate) . '"><strong>' . date("M j",$startdate) . '</strong></a>';
        echo ' - ';
        echo $event['link'] ;
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   HOLIDAY SECTION
//
if (!empty($context['calendar_holidays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_holidaycolor'] . ';">Holidays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_holidays'] as $holiday)
    {
        $query = db_query(
            "SELECT eventDate
            FROM {$db_prefix}calendar_holidays
            WHERE title='".str_replace("'","''",$holiday)."'
            AND (eventDate LIKE '".date("Y")."%' OR eventDate LIKE '0004%')", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $eventdate = strtotime($row['eventDate']);

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$eventdate) . '"><strong>' . date("M j",$eventdate) . '</strong></a>';
        echo ' - ';
        echo $holiday;
        echo '</div>';
    }
    echo '</td></tr>';
}

echo '</table>';
Title: Re: TP 1.0.5 to latest version
Post by: Smoothbrain on March 05, 2009, 07:47:19 PM
I found it.  Thanks.
Title: Re: TP 1.0.5 to latest version
Post by: Renegd98 on March 05, 2009, 08:12:12 PM
Marked as solved then...