Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#616 2008-08-19 17:19:13

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hey pepebe

Thanks a lot for your reply regarding the target and time it was kinda what i was after i guess my initial message wasnt that clear but it was all good as it gave me more of an insight into txp!

I did do what you suggested and it worked well except for the date adding to the url it was outputting the span as part of the url but thats not a problem as im not really needing this – what it was i want to do is the following:

Sometimes the zem_event_url and zem_event_location_url added to an article could be an external link which would ideally open a new window. So i was thinking maybe the best way to do this would be to add the following attributes class=“external” and rel=“external” to the <a href>Map URL</a> and then let the JS do its work.

I thought i could do a check to see if the domain was mine or a relative path i.e /calendar/article or a different URL, this way i could then add the class=“external” and rel=“external” to the href if it wasnt my domain.

Any ideas where in txp_event i would have to add this? or have you ever needed this type of functionality before as i am sure it could be really useful.

Thanks again
A.

Offline

#617 2008-08-19 21:48:03

pepebe
Member
From: Mannheim, Germany
Registered: 2005-02-07
Posts: 74

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Sorry about the span. You have to apply some changes to “function zem_event_date”. By default it will use wraptag=“span” and you don’t need that. Also, it will give out the wrong date format (“x”). Try this instead and don’t forget to add wraptag and format if you want to use zem_event_date (Example: <txp:zem_event_date format=”%x” wraptag=“span” />

function zem_event_date($atts) {
$latts = lAtts(array(
'type' => 'date',
'field' => 'event_date',
'format' => '%Y-%m-%d', // former default was %x
'wraptag' => '', // former default was span
'class' => __FUNCTION__,
),$atts, 0);

return zem_data_field(zem_event_thisevent(), $latts + $atts);
}

I changed those setting ages ago (a least a week…) and completely forgot about it. Sorry,really.

Regarding external links. Of course this would be a very useful feature. Even though Í think this Topic should be moved to another part of the forum here are a few things to think about:

CSS
There is a CSS trick that works in safari and mozilla/firefox. (This is sizzling hot stuff, so don’t expect IE to support it in the next years…) Read here.

Java Script
While java script would not be a problem on the admin side, I don’t think we should use java sript to solve this problem:
- First of all I wouldn’t entrust that problem to the hope that visitors have java script enabled (I, for one, usually disable java script and I know some very large companies that disable java script by default).
- Also, java script will slow down a large page considerably and
- Finally my java script skill are less than moderate. I couldn’t contribute to that endeavour. ;)

Textpattern / PHP
I think it would be better to solve this problem within txtpattern. Though it should be fairly easy in some areas, it could become surprisingly tricky in others. Of course it would be easy to check if the domainname appears within a url. Also I think permlinks should always be internal links. But how about links within articles or excerpts? We could parse them for any url and check them for external/internal targets. Interesting idea. I have to ponder about those things a bit. Please be patient.

So that’s it for tonight.

Bye,

pepebe

Last edited by pepebe (2008-08-19 22:01:54)

Offline

#618 2008-08-19 23:44:06

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I fixed it by adding some small changes starting at line 705:

$out = array();
global $thisarticle;
$count=0;
while ($row = nextRow($rs)) {
++$count;
article_push();
$zem_thiseventcal = $row;
populateArticleData($row);
$thisarticle['is_first'] = ($count == 1);

$thisarticle['is_last'] = ($count == numRows($rs));
$out[] = parse($thing);
$zem_thiseventcal = NULL;
article_pop();
}

typeshige wrote:

I guess < txp:if_first_article > can’t be made to work with zem_event tags? I’m trying to get this to work from inside the form, zem_event_display, but it seems to be ignored.

Or is there another work around to do something only at with the first event?

Thanks,
Shige

Last edited by typeshige (2008-08-19 23:44:44)

Offline

#619 2008-08-20 07:40:48

TomBus
Member
From: Bavaria
Registered: 2005-07-06
Posts: 85

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hi pepebe,
Thank you for Your the assessment of the problem. A connection with a database management program would not be bad. Is there anything?
tombus

Offline

#620 2008-08-20 13:52:10

Brun
New Member
From: Ukraine
Registered: 2008-08-19
Posts: 8
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

When I install plugins (zem_event and zem_paginate), on a site rotined such error

<txp:zem_event_mini_calendar class=“minical” class_event=“full” class_empty=“empty” section=“zem_event_list” /> -> Textpattern Warning: Unknown column ‘textpattern.ID’ in ‘where clause’
select zem_event_date.* from zem_event_calendar, zem_event_date, l10n_txp_uk_ua where zem_event_calendar.id=zem_event_date.event_id and zem_event_calendar.article_id = textpattern.ID and textpattern.Status >= 4 and textpattern.Posted <= now()
textpattern/lib/txplib_db.php:251 getRows() on line 117

textpattern/lib/txplib_db.php:117 trigger_error()
textpattern/lib/txplib_db.php:315 safe_query()
textpattern/lib/txplib_db.php:251 getRows()
textpattern/lib/txplib_misc.php(574) : eval()’d code:1005 safe_rows()
textpattern/publish.php:970 zem_event_mini_calendar()
processTags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/publish.php:466 parse()
index.php:40 textpattern()

Textpattern version 4.0.6, zem_event 0.3.5 and zem_paginate 0.1.
Can add only a category. Events in general not evidently. That do I do not so?

Offline

#621 2008-08-20 15:13:58

pepebe
Member
From: Mannheim, Germany
Registered: 2005-02-07
Posts: 74

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hi Brun, do you have MLP plugin installed, I tried it yesterday ad it caused the same error.

If you need zem_event, uninstall the MLP (There is a tab to remove the tables). Remove the plugin’s php files from tetpattern/lib and copy a new txplib_db.php into your lib directory. This should remove the problem.

If you need MLP, you have to remove zem_event until I or somebody else have found out how to run both plugins at once…

Good Luck,

pepebe

Offline

#622 2008-08-20 15:15:33

pepebe
Member
From: Mannheim, Germany
Registered: 2005-02-07
Posts: 74

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

TomBus wrote:

Hi pepebe,
Thank you for Your the assessment of the problem. A connection with a database management program would not be bad. Is there anything?
tombus

Databae management program? I don’t understand. Please give mor details and/or an example.

CU,

pepebe

Offline

#623 2008-08-20 15:36:15

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hi pepebe,

Yesterday, I’ve reported a little issue between MLP and zem_event.
Then, Graeme (a great developer involved in some great plugins as MLP and permlinks) posted on the thread telling he have fixed it.

Not sure if this is related at all with the issue reported above by Brun.
I haven’t tried exhaustively this MLP + zem_event combination. For example, I haven’t tried the calendar/minicalendar zem_event tags, because I don’t needed (and I don’t like) calendars at all.

BTW, may you have missed my other post directed to you? :D


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#624 2008-08-20 20:10:58

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I’m still learing all the features of this plugin and I was wondering if there is a conditional that tells you if the current article is an event?

If not, is there an easy way to detect it?

Offline

#625 2008-08-21 00:01:59

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

maniqui wrote:

Yesterday, I’ve reported a little issue between MLP and zem_event.
Then, Graeme (a great developer involved in some great plugins as MLP and permlinks) posted on the thread telling he have fixed it.

Maniqui, but I need to correct myself. I fixed several problems with zem-event and MLP but not the missing category text. Shall look at getting the missing category text fixed soon.

The stuff I’ve done is located here (compiled) – labelled as a beta – I’ve not had any trouble with it, but if you do please email me as I don’t have time to check this thread very often.

Offline

#626 2008-08-21 00:12:01

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

I’ve just had a quick play around… This version seems to fix the missing category text – a bit hacky though. Certainly needs some more testing.

Offline

#627 2008-08-21 12:09:37

TomBus
Member
From: Bavaria
Registered: 2005-07-06
Posts: 85

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Hi pepebe,
‘Databae management program?’
The articles and event are better to creat and duplicated in Access. Is there a tool to upload them?
Or is it better to duplicate them in phpmyadmin.
TomBus

Offline

#628 2008-08-21 20:51:51

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Am I missing something or is there not an easy way to get an article list of all Events? I often don’t use event categories and I want to find a way to admin my events without a lot of searching.

Thanks,
Shige

Offline

#629 2008-09-01 20:59:20

pepebe
Member
From: Mannheim, Germany
Registered: 2005-02-07
Posts: 74

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

Sorry folks for my absence in the last week. I was buried in work and on top of that I got struck again with a severe case of backache. At the moment sitting at my desk is very uncomfortable and so I don’t have the nerve to do some extra work.

The good new is, that it is very likely that I will publish a site dedicate to zem_even_reborn by next week. It will contain all my changes to the core of zem_event as well as some nifty things that I haven’t announced until now.

Spoiler: Among them the option to postpone or cancell individual reccuring events as well as adding descriptive text to each single event.

@ graeme

Thanks for your support multilingual capabilities are a killer feature for any kind of application. I really appreciate your affords. I will restructe zem_event according you specification to guarantee full integration.

@ Tombus

I wouldn’t touch access as long as there is a single spark of life fizzling in my decaying body. It might be true that access has improved a lot in recent years, but for several reasons it was a real pain in the ass a couple of years ago and I don’t want to risk wasting time into hat program anymore. Sorry, but no help for this task from my side. On top of that I would’nt force other users to acquire a copy of ms-office just to adminstrate zem_event. It just don’t feel right from my point of few.

If you miss something about zem_event, give us a clear description of the features you are missing and we will find a solution to improve the event backend.

@typeshige

A quick an dirty solution to your problem would be to add a few lines to txp_list.php. Of course this is some hacking into the core, so I would recomment to wait until I come up with a less intrusive approach.

That’s it fro tonight,

pepebe

Last edited by pepebe (2008-09-01 21:05:01)

Offline

#630 2008-09-01 21:05:44

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: [plugin] [ORPHAN] zem_event [flexible integrated event management]

pepebe, you’ve just made my day.

Thank you so much.

Offline

Board footer

Powered by FluxBB