Welcome to Geeklog Friday, October 20 2017 @ 08:16 am EDT


Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
hmmm...

After having a quick look at the number of arguments I'm passing via GET and the inconsistent order inwhich I'm passing them, I think I'll just remove all the calls to COM_buildURL(). Most of them shouldn't have gone in there anyway, like the url to the editor or to the quick delete, etc.

I can make the order more consistent, but because the number of args isn't consistent, it's a bit of a hassle.
might be easier if something like this existed in lib-common.php:
PHP Formatted Code

function COM_numArgs(){
    global $_URL;

    return $_URL->numArguments();
}
 

I guess i can just put it into evList, but... How bad do you want nice URL's for your events?

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Actually, I think the rewrite done in GL isnt of such quality to put to much work into it.
So for the evlist Im very fine without.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
I've uploaded version 1.0.2 to geeklog.net. Look for version 1.0.2 before you download.

If you are upgrading make sure you read the upgrade.txt file. There are just a couple of minor database changes, but that means you'll have to disable the phpblock before you update the files or you'll get a SQL error.

This version takes care of everything discussed in this thread as well as url_rewrite, which is supported for event titles and readmore links. btw, evList does run fine under php5 and mysql5 (tho I haven't bothered much with strict mode except the earlier mentioned fix).

thanks for your feedback and here's to hoping I didn't break it :BigGulp:

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Installed the update now, and issues with rewrite seems to be solved in a good manner.
Found one issue with the centerblock:
When selecting "After featured story" and there are no featured story the centerblock disappears from the frontpage. In topics it shows.

This is a really nice plugin, good work!

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper

When selecting "After featured story" and there are no featured story the centerblock disappears from the frontpage. In topics it shows.


hmm.. thought I had worked that one out. I go over it again and post back.

Quote by: casper

This is a really nice plugin, good work!


Thanks! It gets better with a few more bug fixes and just today I added event reminders--it's a holiday where I am so I was bored.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper


Found one issue with the centerblock


fixed it.
find plugin_centerblock_evlist in functions.inc and change this:
PHP Formatted Code
    // get position from stories query to account for 'after featured' position.
    if ($position == 2) {
        if (($where == 1) && ($_CONF['showfirstasfeatured'] == 0)) {
            if (!empty($topic)) {
                if (DB_count($_TABLES['stories'], array('featured', 'tid'), array(1, $topic)) < 1) {
                    // no featured story found - redefine position
                    $position = 1;
                }
            }
        }
    }

to this:
PHP Formatted Code
    // get position from stories query to account for 'after featured' position.
    if ($position == 2) {
        if (($where == 1) && ($_CONF['showfirstasfeatured'] == 0)) {
            if (!empty($topic)) {
                if (DB_count($_TABLES['stories'], array('featured', 'tid', 'draft_flag'), array(1, $topic, 0)) < 1) {
                    // no featured story found in topic - redefine position
                    $position = 1;
                }
            } else {//redefine position if no featured story on front page
                if (DB_count($_TABLES['stories'], array('featured', 'frontpage', 'draft_flag'), array(1, 1, 0)) < 1) {
                    // no featured story found - redefine position
                    $position = 1;
                }
            }
        } elseif ($where == 1) {
            if (!empty($topic)) {//redifine position if no featured story in topic page
                if (DB_count($_TABLES['stories'], array('featured', 'tid', 'draft_flag'), array(1, $topic, 0)) < 1) {
                    // no featured story found - redefine position
                    $position = 1;
                }
            } else {//redifine position if no featured story on front page
                if (DB_count($_TABLES['stories'], array('featured', 'frontpage', 'draft_flag'), array(1, 1, 0)) < 1) {
                    // no featured story found - redefine position
                    $position = 1;
                }
            }
        }
    }
 

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Yup, that worked well Smile

Status: offline

jcz

Forum User
Chatty
Registered: 29/01/2002
Posts: 39
I don't have a lot of time to play with this, but I'm curious. Can someone post some screenshots of what this thing does?

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Machinari,

In the centerblock when selecting the range "upcoming", is there any option to make a event disappear once the set time has passed instead of waiting for the next day?

And in the list-view, when trying to sort pr category it still shows all added events from all categories.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper


In the centerblock when selecting the range "upcoming", is there any option to make a event disappear once the set time has passed instead of waiting for the next day?

I'll work on this first thing tomorrow and I'll let you know. I just have to adjust the query to include the time of day. thanks for noticing.

Quote by: casper


And in the list-view, when trying to sort pr category it still shows all added events from all categories.

whoops, i broke that when i fixed the url_rewrite issue.
change the following in index.php around line 151-158:
PHP Formatted Code
COM_setArgNames(array('op','range','cat'));
$op = COM_applyFilter(COM_getArgument('op'));
$range = COM_applyFilter(COM_getArgument('range'),true);
$cat = COM_applyFilter(COM_getArgument('cat'),true);

if (!empty($cat)) {
    $catname = DB_getItem($_TABLES['evlist_categories'], 'name', "id = '$cat'");
}
 
to this:
PHP Formatted Code
COM_setArgNames(array('op','range','cat'));
$op = COM_applyFilter(COM_getArgument('op'));
$range = COM_applyFilter(COM_getArgument('range'),true);
$category = COM_applyFilter(COM_getArgument('cat'),true);

if (!empty($category)) {
    $catname = DB_getItem($_TABLES['evlist_categories'], 'name', "id = '$category'");
}
 

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
I guess I should've called these "release candidates" eh?! :wink:

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper

In the centerblock when selecting the range "upcoming", is there any option to make a event disappear once the set time has passed instead of waiting for the next day?



This is done now, but because it involved one small database change I hope you can wait for the next release.

Once the start time has passed the current time the event will appear under past events rather than upcoming events. It was that the start date had to wait for the current date to pass before the event would be listed as past.

hmmm.... I wonder if I should throw an option in the dropdown to list events going on atm..
What do you think? Any use for that or would it just be clutter?

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Changed index.php now and it seems to be wery good Wink

I'll wait pationatly for next release for the other change, no hurry, just getting started in testing and implementing a structure for the use of evlist. Newer used the calendar since it hasent had the funtionality of evlist.
For _me_ there are no need for the option "ongoing/current/this day", but for users with an array of events on one day I can see the use for this.

Thanks for the good work!
PS:
Found a new, fatal error:
I only get page not found, click here to retry when clicking on your paypal-button.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper


Found a new, fatal error:
I only get page not found, click here to retry when clicking on your paypal-button.


I've just clicked both paypal buttons and they seem to work. Must have been a paypal issue.
I'ts the thought that counts though right?! :wink:

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
Quote by: casper

In the centerblock when selecting the range "upcoming", is there any option to make a event disappear once the set time has passed instead of waiting for the next day?



I was thinking... Should this be an option? or just default? I've adjusted the query so that the event disappears from the list as soon as now passes the event's start_time and I agree that this should in fact be the default behavior, but I wonder if some would prefer their events to remain on the list until the next day. It's easy enough to put an extra setting in the config screen. Any thoughts?

Personally I think this type of option is just "clutter." The client I initially wrote this for prefers the latter option, but she can't give me a reason beyond "i like to see the event box," so not really helpful.

This would be solved by an option to display ongoing/current events except that end dates are not required and so the result would be very inconsistent.

Status: offline

casper

Forum User
Full Member
Registered: 11/02/2004
Posts: 142
Location:Skien, Norway
Quote by: machinari


I've just clicked both paypal buttons and they seem to work. Must have been a paypal issue.
I'ts the thought that counts though right?! :wink:


Found ot that it works on my other computer, so let see if we can convert a good thought into some beers for programming Wink

Quote by: machinari



I was thinking... Should this be an option? or just default? I've adjusted the query so that the event disappears from the list as soon as now passes the event's start_time and I agree that this should in fact be the default behavior, but I wonder if some would prefer their events to remain on the list until the next day. It's easy enough to put an extra setting in the config screen. Any thoughts?

Personally I think this type of option is just "clutter." The client I initially wrote this for prefers the latter option, but she can't give me a reason beyond "i like to see the event box," so not really helpful.

This would be solved by an option to display ongoing/current events except that end dates are not required and so the result would be very inconsistent.



I see the use for others to have it the way it is now, with todays events visible until next day.
If it is an easy fix to add my request as an option in config it sure makes it easier to satisfy both needs.
One way or the other we get some "clutter" when expanding with more features and gives the users more options to consider. Really not sure what is the best solution. Personally I like the option to control this in config.

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
version 1.1 is ready to go. Before I submit it to the gl downloads page, anybody want to test the upgrade for me. I have tested it a number of times and on a production site as well, but I just want to be sure. shoot me an email.

this version sports event reminders, a few more options, and of course a number of bug fixes. There cant be too many more of those.

45

Anonymous
I got errors:
PHP Formatted Code
Sun 28 Oct 2007 07:54:30 MST - Registering evList plugin with Geeklog
Sun 28 Oct 2007 07:54:30 MST - Successfully installed the evList plugin!
Sun 28 Oct 2007 07:59:51 MST - 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT date_format FROM gl_evlist_settings)' at line 1. SQL in question: SELECT format FROM gl_evlist_dateformat WHERE id = (SELECT date_format FROM gl_evlist_settings)
Sun 28 Oct 2007 08:02:19 MST - 1062: Duplicate entry 'Birthday' for key 2. SQL in question: INSERT INTO gl_evlist_categories SET name = 'Birthday', status = '1'
Sun 28 Oct 2007 08:14:15 MST - 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events
                (LIKE gl_evlist_events)
Sun 28 Oct 2007 08:18:45 MST - 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT date_format FROM gl_evlist_settings)' at line 1. SQL in question: SELECT format FROM gl_evlist_dateformat WHERE id = (SELECT date_format FROM gl_evlist_settings)
Sun 28 Oct 2007 08:38:51 MST - 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events
                (LIKE gl_evlist_events)
Sun 28 Oct 2007 08:39:04 MST - 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events
                (LIKE gl_evlist_events)


I'm using geeklog ver 1.4.1
and MySQL ver 4.0.20
evlist ver 1.1

I'm hoping that I don't have to upgrade my MySQL, any comments would be appreciated!
Big Grin

Status: offline

machinari

Forum User
Full Member
Registered: 22/03/2004
Posts: 1512
yup. Start by installing evList 1.3, which can now be found here at geeklog.net. It fixes the bugs that have been found to date. Your issue with the duplicate entry is also dealt with.
I'm not going to look at that syntax error until after you've installed evList 1.3, but know that I used MySQL 4.1 min. syntax in a number of places. Upgrading your MySQL is a good idea anyway.

... after a bit of quick research: MySQL versions prior to 4.1 don't support sub-queries, which is what is giving you your syntax error.

All times are EDT. The time is now 08:16 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content