[BETA] MyCalendar3

MODs and Styles for phpBB3.

To post your MOD or style, go to the STG MOD Manager
Forum rules
Go to http://startrekguide.com/mods to submit your MOD or style

Re: [BETA] MyCalendar3

Postby Franfj » 15 May 2010, 03:47

You can't get $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour'] if you don't have them in the result of the SQL query you have done before.
Franfj
Cadet I
Cadet I
 
Posts: 13
Joined: 13 Mar 2009, 08:34
Gender: Male
phpBB Knowledge: 7




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [BETA] MyCalendar3

Postby wired076 » 15 May 2010, 07:13

Yeah unfortunately I kinda figured that might have been the case when I left my office today. I will try and see if I can make sense of what I need to change the query to tomorrow but if anyone could help me with updating the querys and get this to work it would be greatly appreciated. Please note if some parts are spelled incorrectly or don't make much sense it's difficult to use an iPhone while a passenger in a car.

[ Post made via Mobile Device ] Image
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby wired076 » 19 May 2010, 16:07

I still have been unable to figure it out. I have tried updating the following query in mini_calendar.php
Code: Select all
$query = "SELECT
         f.forum_name,
         c.topic_id, c.cal_date, c.forum_id,
         MONTH(c.cal_date) as cal_month,
         DAYOFWEEK(c.cal_date) as cal_weekday,
         DAYOFMONTH(c.cal_date) as cal_monthday,
         YEAR(c.cal_date) as cal_year,
         HOUR(c.cal_date) as cal_hour,
         MINUTE(c.cal_date) as cal_min,
         SECOND(c.cal_date) as cal_sec,
         t.topic_title
         $mini_cal_auth_read_sql
      FROM
         " . MYCALENDAR_TABLE . " as c,
         " . TOPICS_TABLE . " as t,
         " . FORUMS_TABLE . " as f
      WHERE
         c.forum_id = f.forum_id
         AND c.topic_id = t.topic_id
         AND (c.cal_date >= CURDATE())
         $days_ahead_sql
         $mini_cal_auth_sql
      ORDER BY
         c.cal_date ASC";


and adding
Code: Select all
$prev_forum_name = $row['forum_name'];


and tried modifying this section as well:

Code: Select all
   if ($prev_cal_date != '')
   {
      $template->assign_block_vars('events', array(
            'EVENT_CLASS' => $prev_class,
            'EVENT_ID' => $prev_cal_id,
            'EVENT_DATE' => $prev_cal_date,
            'EVENT_URLTEXT' => $prev_cal_urltext,
            'FORUM_NAME' => $prev_forum_name
         )
      );
   } else
   {   // no events :(
      $template->assign_var('events', false);
   }


This is my modified mini_cal_body.html
Code: Select all
<script type="text/javascript">
// <![CDATA[
   var save_background = '';

   function highlight_event(id, restore)
   {
      var element = document.getElementById(id);
      if (element)
      {
         if (restore)
         {
            element.style.background = save_background;
         } else
         {
            save_background = element.style.background;
            element.style.background = '#EBEBEB';
         }
      }
   }
// ]]>
</script>
<div class="forabg" style="margin-top: 1.5em; width: 388px">
   <span class="corners-top"><span></span></span>
   <div class="inner">
      
      <div id="calendar">
         <div id="events">
            <ul class="topiclist">
               <li class="header">
               <dl class="icon">
               <dt>
                  <!-- IF HAS_EVENTS -->
                  {L_MINI_CAL_EVENTS}
                  <!-- ELSE -->
                  {L_MINI_CAL_NO_EVENTS}
                  <!-- ENDIF -->
               </dt>
               <dd class="posts" style="width:10%">{L_REPLIES}</dd>
               <dd class="lastpost"><span>{L_LAST_POST}</span></dd></dl></li>
            </ul>
            <!-- IF HAS_EVENTS -->
               <ul class="topiclist forums">
               <!-- BEGIN events -->
                  <li class="row" id="{events.EVENT_ID}">
                  <dl class="icon" style="background-image: url({recent_topics.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
                  <!--<dt>
                  <span class="forumtitle">
                     {events.EVENT_DATE}
                  {events.EVENT_URLTEXT}
                  </span>
                  </dt>-->
               <dt style="<!-- IF recent_topics.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{recent_topics.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{recent_topics.TOPIC_FOLDER_IMG_ALT}">
               <!-- IF recent_topics.S_UNREAD_TOPIC --><a href="{recent_topics.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
               <a href="{recent_topics.U_VIEW_TOPIC}" class="topictitle">{events.EVENT_DATE}{events.EVENT_URLTEXT}</a>
               <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> &bull; <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->
               <!-- IF recent_topics.S_TOPIC_UNAPPROVED or recent_topics.S_POSTS_UNAPPROVED --><a href="{recent_topics.U_MCP_QUEUE}">{recent_topics.UNAPPROVED_IMG}</a> <!-- ENDIF -->
               <!-- IF recent_topics.S_TOPIC_REPORTED --><a href="{recent_topics.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
               <!-- IF recent_topics.ATTACH_ICON_IMG -->{recent_topics.ATTACH_ICON_IMG} <!-- ENDIF -->
               {L_POST_BY_AUTHOR}{events.LAST_POST_AUTHOR_FULL}
               <!-- IF recent_topics.U_VIEW_FORUM --><br />{L_IN} <a href="{events.U_VIEW_FORUM}" style="font-weight: bold;">{events.FORUM_NAME}</a><!-- ENDIF -->
            </dt>   
            <dd class="posts" style="width:10%">{recent_topics.REPLIES} <dfn>{events.EVENT_DATE}{events.EVENT_URLTEXT}</dfn></dd>
            <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {events.LAST_POST_AUTHOR_FULL}
               <a href="{recent_topics.U_LAST_POST}">{LAST_POST_IMG}</a></span>
            </dd>
                  </dl>
                  </li>
                  <!-- END events -->
                  
               </ul>
            <!-- ENDIF -->
         </div>
      </div>
   </div>
   <span class="corners-bottom"><span></span></span>
</div>



Can anyone please help me in this regard. Help would be greatly appreciated.
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby wired076 » 21 May 2010, 03:16

wired076 wrote:I still have been unable to figure it out. I have tried updating the following query in mini_calendar.php
Code: Select all
$query = "SELECT
         f.forum_name,
         c.topic_id, c.cal_date, c.forum_id,
         MONTH(c.cal_date) as cal_month,
         DAYOFWEEK(c.cal_date) as cal_weekday,
         DAYOFMONTH(c.cal_date) as cal_monthday,
         YEAR(c.cal_date) as cal_year,
         HOUR(c.cal_date) as cal_hour,
         MINUTE(c.cal_date) as cal_min,
         SECOND(c.cal_date) as cal_sec,
         t.topic_title
         $mini_cal_auth_read_sql
      FROM
         " . MYCALENDAR_TABLE . " as c,
         " . TOPICS_TABLE . " as t,
         " . FORUMS_TABLE . " as f
      WHERE
         c.forum_id = f.forum_id
         AND c.topic_id = t.topic_id
         AND (c.cal_date >= CURDATE())
         $days_ahead_sql
         $mini_cal_auth_sql
      ORDER BY
         c.cal_date ASC";


and adding
Code: Select all
$prev_forum_name = $row['forum_name'];


and tried modifying this section as well:

Code: Select all
   if ($prev_cal_date != '')
   {
      $template->assign_block_vars('events', array(
            'EVENT_CLASS' => $prev_class,
            'EVENT_ID' => $prev_cal_id,
            'EVENT_DATE' => $prev_cal_date,
            'EVENT_URLTEXT' => $prev_cal_urltext,
            'FORUM_NAME' => $prev_forum_name
         )
      );
   } else
   {   // no events :(
      $template->assign_var('events', false);
   }


This is my modified mini_cal_body.html
Code: Select all
<script type="text/javascript">
// <![CDATA[
   var save_background = '';

   function highlight_event(id, restore)
   {
      var element = document.getElementById(id);
      if (element)
      {
         if (restore)
         {
            element.style.background = save_background;
         } else
         {
            save_background = element.style.background;
            element.style.background = '#EBEBEB';
         }
      }
   }
// ]]>
</script>
<div class="forabg" style="margin-top: 1.5em; width: 388px">
   <span class="corners-top"><span></span></span>
   <div class="inner">
      
      <div id="calendar">
         <div id="events">
            <ul class="topiclist">
               <li class="header">
               <dl class="icon">
               <dt>
                  <!-- IF HAS_EVENTS -->
                  {L_MINI_CAL_EVENTS}
                  <!-- ELSE -->
                  {L_MINI_CAL_NO_EVENTS}
                  <!-- ENDIF -->
               </dt>
               <dd class="posts" style="width:10%">{L_REPLIES}</dd>
               <dd class="lastpost"><span>{L_LAST_POST}</span></dd></dl></li>
            </ul>
            <!-- IF HAS_EVENTS -->
               <ul class="topiclist forums">
               <!-- BEGIN events -->
                  <li class="row" id="{events.EVENT_ID}">
                  <dl class="icon" style="background-image: url({recent_topics.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
                  <!--<dt>
                  <span class="forumtitle">
                     {events.EVENT_DATE}
                  {events.EVENT_URLTEXT}
                  </span>
                  </dt>-->
               <dt style="<!-- IF recent_topics.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{recent_topics.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{recent_topics.TOPIC_FOLDER_IMG_ALT}">
               <!-- IF recent_topics.S_UNREAD_TOPIC --><a href="{recent_topics.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
               <a href="{recent_topics.U_VIEW_TOPIC}" class="topictitle">{events.EVENT_DATE}{events.EVENT_URLTEXT}</a>
               <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> &bull; <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->
               <!-- IF recent_topics.S_TOPIC_UNAPPROVED or recent_topics.S_POSTS_UNAPPROVED --><a href="{recent_topics.U_MCP_QUEUE}">{recent_topics.UNAPPROVED_IMG}</a> <!-- ENDIF -->
               <!-- IF recent_topics.S_TOPIC_REPORTED --><a href="{recent_topics.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
               <!-- IF recent_topics.ATTACH_ICON_IMG -->{recent_topics.ATTACH_ICON_IMG} <!-- ENDIF -->
               {L_POST_BY_AUTHOR}{events.LAST_POST_AUTHOR_FULL}
               <!-- IF recent_topics.U_VIEW_FORUM --><br />{L_IN} <a href="{events.U_VIEW_FORUM}" style="font-weight: bold;">{events.FORUM_NAME}</a><!-- ENDIF -->
            </dt>   
            <dd class="posts" style="width:10%">{recent_topics.REPLIES} <dfn>{events.EVENT_DATE}{events.EVENT_URLTEXT}</dfn></dd>
            <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {events.LAST_POST_AUTHOR_FULL}
               <a href="{recent_topics.U_LAST_POST}">{LAST_POST_IMG}</a></span>
            </dd>
                  </dl>
                  </li>
                  <!-- END events -->
                  
               </ul>
            <!-- ENDIF -->
         </div>
      </div>
   </div>
   <span class="corners-bottom"><span></span></span>
</div>



Can anyone please help me in this regard. Help would be greatly appreciated.


BUMP.

Can anyone please help me with this. I would really like to fix this.
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby wired076 » 23 May 2010, 06:23

UPDATE: I am currently receiving help on this at phpbb.com .

I will post back here with a solution once fixed.
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby wired076 » 29 Sep 2010, 06:23

I wish to continue to develop this mod.

If the mod author has any issues in regards to this please pm me.
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby grumpybum » 29 Sep 2010, 06:36

That would be great.

[ Post made via iPhone] Image
User avatar
grumpybum    
MOD Author
MOD Author
 
Posts: 70
Joined: 28 Oct 2008, 06:09
Location: Brisbane Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby grumpybum » 12 Mar 2011, 04:49

Hey wired, did you end up doing anything with this?
User avatar
grumpybum    
MOD Author
MOD Author
 
Posts: 70
Joined: 28 Oct 2008, 06:09
Location: Brisbane Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby wired076 » 14 Mar 2011, 09:14

grumpybum wrote:Hey wired, did you end up doing anything with this?


Unfortunately I have been unable to get onto this mod as yet as I have been low on time and have had to spend time on some of my other mods.

I will try and get this at a stage where it can be installed on a phpBB 3.0.8 board and then improve upon it when I get time.

Hopefully this can be achieved in the next 6-8 weeks.
I.T. Construct
STG Supporter
Please contact me via email/im for help at reasonable prices.
USA Based Web hosting
email: admin@itconstruct.com.au
- Visit http://www.itconstruct.com.au
wired076    
Supporter
Supporter
 
Posts: 494
Joined: 03 Feb 2009, 16:51
Location: Australia
Gender: Male
phpBB Knowledge: 5

Re: [BETA] MyCalendar3

Postby grumpybum » 14 Mar 2011, 14:24

wired076 wrote:
grumpybum wrote:Hey wired, did you end up doing anything with this?


Unfortunately I have been unable to get onto this mod as yet as I have been low on time and have had to spend time on some of my other mods.

I will try and get this at a stage where it can be installed on a phpBB 3.0.8 board and then improve upon it when I get time.

Hopefully this can be achieved in the next 6-8 weeks.


Cool. I've actually started rewriting it for my own purposes(to have a time for the event) so I'm keen to see what you come up with.
User avatar
grumpybum    
MOD Author
MOD Author
 
Posts: 70
Joined: 28 Oct 2008, 06:09
Location: Brisbane Australia
Gender: Male
phpBB Knowledge: 5

PreviousNext

Return to phpBB3 Customizations

Who is online

Users browsing this forum: Yahoo [Bot] and 14 guests