Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8]

Author Topic: [ADDON] - sNews Calendar - with Integrated Admin - 1.6  (Read 45946 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #105 on: April 11, 2009, 11:33:47 am »

Z'icely (;)) they are indeed, hehe... Nice easter to ya boys.
Logged
"It's only dead fish that goes with the flow... "
Updated

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #106 on: April 12, 2009, 06:54:11 pm »

On review of this 'undocumented feature' re: not posting past month's events, i got to considering the effect as it is currently implemented and I think it is a correct behaviour. - How often do you pick up an out-dated TV Guide to see what you have missed on the telly? - Is it critical that users get to see the previous month's events?

Noooo.. Just thought that they would be visiable.. But I gather you're right. I do not need to know what I DID DO last month, I need to know what I'M GOING TO DO in the near future.

 ;D Just for the record, I did write function events_list() that way intentionally... so that it queries the events table (in the database) to select month/year groups MORE THAN or EQUAL TO the current month. However, I also left in the commented-out query string that selects ALL month/year groups that have events... and you can switch the queries to have it that way if you wanted to.

Here is the top part of function events_list() - in events_list.php (or in the calendar folder's index.php if you happen to have the 16 modular package) that contains both query strings at the bottom... the first query string selects only the current and upcoming month/year groups... while the second (commented out) selects all available groups (past, current and future). You could comment out the first and un-comment the second one to have them all:

Code: [Select]
<?php

function events_list() {
echo '<h2>'.l('eventList').'</h2>';
$month date("F");
        
# convert $month to $curr_mo (month value in dbase table 'events')
         
if ($month == 'January') { $curr_mo '1'; }
else if ($month == 'February') { $curr_mo '2'; }
else if ($month == 'March') { $curr_mo '3'; }
else if ($month == 'April') { $curr_mo '4'; }
else if ($month == 'May') { $curr_mo '5'; }
else if ($month == 'June') { $curr_mo '6'; }
else if ($month == 'July') { $curr_mo '7'; }
else if ($month == 'August') { $curr_mo '8'; }
else if ($month == 'September') { $curr_mo '9'; }
else if ($month == 'October') { $curr_mo '10'; }
else if ($month == 'November') { $curr_mo '11'; }
else if ($month == 'December') { $curr_mo '12'; }
# selects month/year groups more than or equal to the current month that have events, from events table.
$query "SELECT month,year FROM ".db('prefix')."events WHERE month >= '$curr_mo' GROUP BY month,year ORDER BY date ASC";
# selects all month/year groups that have events.
//$query = "SELECT month,year FROM ".db('prefix')."events GROUP BY month,year ORDER BY date ASC";

?>



 
« Last Edit: April 12, 2009, 06:58:19 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

bobcat

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 67
    • ESL Jobs by Country
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #107 on: April 14, 2009, 08:29:42 am »

Been trying to use this calendar to show exhibition dates which normally go for a few days or more.

What would it involve to be able to list multi day events?

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #108 on: April 15, 2009, 09:03:18 pm »

Been trying to use this calendar to show exhibition dates which normally go for a few days or more.
What would it involve to be able to list multi day events?

Ooohhh... yes... having mulitple-day events AND recurring events - same event running on several other dates, like running on the 2nd Monday of every month - would be the ultimate addons for this calendar project. I've made a couple of attempts with no luck... it is beyond my skill level.  :P
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

0kool

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
    • KudaiARG
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #109 on: May 26, 2010, 05:58:28 pm »

Hi I have a problem I can only see events if I am as an administrator, if I enter as a visitor normal throws me a 404 error.
How I can fix this problem
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #110 on: May 26, 2010, 07:32:15 pm »

Hi I have a problem I can only see events if I am as an administrator, if I enter as a visitor normal throws me a 404 error.
How I can fix this problem

What version of sNews have you installed your Calendar project in... is it a default 1.6 package, a modified one, or a default 1.7 package?

I have not experienced this in the past. I attempted to replicate your problem with sNews 1.6 without success.

Your best bet would be to go over the original installation instructions at the start of this thread again, checking your files, to make sure you have not missed anything.

Definitely be sure that you have added the hard-coded function-names - calendar,events_list,month_current_full,event_list,event_edit,event_new,event_update,event_delete,event_save - to the $l['cat_listSEF'] string near the bottom of the language variables section in the snews.php file.

« Last Edit: May 26, 2010, 08:18:48 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

0kool

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
    • KudaiARG
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #111 on: May 27, 2010, 06:56:08 pm »

latest version is 1.7 which I am using
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: [ADDON] - sNews Calendar - with Integrated Admin - 1.6
« Reply #112 on: May 27, 2010, 09:04:41 pm »

latest version is 1.7 which I am using

If you were following the instructions in this thread... they are for installing with sNews 1.6.

Poppoll converted this Add-on to work with 1.7 and included it as a complete sNews 1.7 package with his Aqueous Template for 1.7 which you can Download from Here and go through it for references.

You can also view a working example of Poppoll's 1.7 package (using a modified template) Here - the Calendar is visible after clicking the bottom bar in the right side-bar.

Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: 1 ... 6 7 [8]