Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#889 2017-04-04 08:24:56
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_calendar: complete schedule / event / calendar / diary
thank’s!
Offline
#890 2018-04-27 14:36:36
Re: smd_calendar: complete schedule / event / calendar / diary
Stef, is it possible to use smd_calendar from a secondary database but create/edit/view them from a primary Textpattern site/backend?
Last edited by jayrope (2018-04-27 14:37:19)
A hole turned upside down is a dome, when there’s also gravity.
Offline
#891 2018-04-27 14:40:35
Re: smd_calendar: complete schedule / event / calendar / diary
jayrope wrote #311483:
Stef, is it possible to use smd_calendar from a secondary database but create/edit them from a primary Textpattern backend?
Possibly as you surmised using rah_swap from a dedicated admin tab via smd_tabber. Then you could do a similar “swap” in your public page to grab them. Untested, but I can’t see any reason it won’t work.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#892 2018-04-27 19:43:02
Re: smd_calendar: complete schedule / event / calendar / diary
Bloke wrote #311484:
Possibly as you surmised using rah_swap from a dedicated admin tab via smd_tabber. Then you could do a similar “swap” in your public page to grab them. Untested, but I can’t see any reason it won’t work.
An interesting idea. I can imagine doing an smd_tabber panel in a primary installations that lists event articles from another database using rah_swap. But isn’t editing the articles from the second database in the write tab of the installation of the first database bound to run into problems, if it works at all? Surely the URL will immediately grab the ID of the article in the primary database.
You could make the link in your list of articles open the url to the second database, but you’d need to be logged into both to swap smoothly back and forth between the two parallel installations. But if you do that, you might as well plonk the entire event calendar in the second installation and simply put a link in your theme to switch between them. I’m not sure if you can automatically share a login table with two parallel installations.
If it all has to be in the primary installation, I guess it would be more feasible – but also not the simplest thing to realise – to make an own event edit pane using smd_tabber too.
TXP Builders – finely-crafted code, design and txp
Offline
#893 2018-04-27 21:04:45
Re: smd_calendar: complete schedule / event / calendar / diary
jakob wrote #311485:
An interesting idea. I can imagine doing an smd_tabber panel in a primary installations that lists event articles from another database using rah_swap. But isn’t editing the articles from the second database in the write tab of the installation of the first database bound to run into problems
Yes, it will. I was thinking about it from the perspective you began: use smd_tabber in the 1st installation to swap to the second DB and use that as an edit window into the 2nd installation.
I don’t even think smd_calendar would be much use in that scenario. I suppose you could switch to it and use an article(_custom) tag to fetch the events, but like you say, how would you know what to fetch, given that the plugin relies on the URL to seed its articles?
Probably far more useful would be to use the second installation as simply an “offline repository” of events that you could call in using Forms or something. Like snippets of content that are somehow linked (via a custom field or by date?) to the primary installation so they show up. Dunno. It’ll really depend on the implementation and what it is exactly jayrope is planning to benefit from segregating content this way.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#894 2018-04-27 22:18:14
Re: smd_calendar: complete schedule / event / calendar / diary
I agree. It seems to me the best options would be:
- mrd_for_yours_eyes_only to filter out events from the articles panel so it doesn’t get totally clogged with events and a dashboard or similar to list only one’s own events. The edit links would point to the standard textpattern article write tab (i.e. as mentioned in the other thread).
- mrd_for_yours_eyes_only to list only one’s own articles (i.e. events and other articles) – maybe that’s already succinct enough and you no longer need to split out the events.
- A totally separate event plugin with it’s own list and edit pane and own access privs. If it doesn’t need to be as super-complex as smd_calendar with repeating events etc. it might not be so hard to realise, especially if you can build on the legacy plugin mentioned in the other thread.
- Leave everything as articles but develop your own intermediate user admin area behind a login that doesn’t use textpattern to manage articles and events. That takes some time and care but may in the end give you the ultimate flexibility you’re looking for with a pared-down edit window for each type and listings restricted only to the logged-in user. It may also be more forwards compatible.
For the first two, you might need to somehow kill the search function to prevent other events from loading. It really depends how ultra-secret each account needs to be. I’ve only ever done this arrangement once (i.e. using per-user textpattern admin side) and I chose not to worry too much about people looking at other people’s posts (they could only edit their own) because everything posted was visible on the public side anyhow, so there were no great secrets.
TXP Builders – finely-crafted code, design and txp
Offline
#895 2018-04-30 21:52:29
- mikulas
- Member
- From: Czech republic
- Registered: 2012-03-15
- Posts: 38
Re: smd_calendar: complete schedule / event / calendar / diary
Hi, I’m testing upgrade sites to Textpattern version 4.7.0-beta.3 and when enabling smd_calendar plugin I get this error message:
( ! ) Fatal error: Uncaught Error: Call to undefined function is_windows() in C:\wamp\www\example.com\textpattern\lib\txplib_misc.php(1826) : eval()’d code on line 2423
( ! ) Error: Call to undefined function is_windows() in C:\wamp\www\example.com\textpattern\lib\txplib_misc.php(1826) : eval()’d code on line 2423
Offline
#896 2018-04-30 23:34:20
Re: smd_calendar: complete schedule / event / calendar / diary
are you using the latest version of the plugin?
https://stefdawson.com/sw/plugins/smd_calendar
…. texted postive
Offline
#897 2018-05-01 08:18:51
Re: smd_calendar: complete schedule / event / calendar / diary
Ahem, you mean the latest version which fixes this oversight. Thank you for bringing this to my attention, mikulas.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#898 2019-03-15 12:17:10
- saccade
- Plugin Author
- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: smd_calendar: complete schedule / event / calendar / diary
Hi,
I have a question regarding one-month-overviews or special: a theme-orientated month of events which includes just two days of another month:
Naturally the calender starts with the first day of a month, eg. Wednesday
but is it possible to include the preceding days of this week and their events?
I use custom datefields and month=“5” in this example:
but need only the days preceding 1st of May, becaus the Exhibition has its Vernissage on 29th of April
Last edited by saccade (2019-03-15 12:18:29)
Offline
#899 2019-03-15 17:52:21
Re: smd_calendar: complete schedule / event / calendar / diary
saccade wrote #317068:
Hi,
I have a question regarding one-month-overviews or special: a theme-orientated month of events which includes just two days of another month:Naturally the calender starts with the first day of a month, eg. Wednesday
but is it possible to include the preceding days of this week and their events?
I use custom datefields and month=“5” in this example:but need only the days preceding 1st of May, becaus the Exhibition has its Vernissage on 29th of April
A very creative use of calendaring! Hope you consider documenting the process and css styling.
in terms of including the last 5 days of the previous month that might be interesting . Otherwise would not a PREV and NEXT button suffice?
…. texted postive
Offline
#900 2019-03-15 22:36:51
Re: smd_calendar: complete schedule / event / calendar / diary
Hmm, totally untested but the only way I can think of doing this is to use calid
and add two calendars to the page; one with your regular attributes and one with the same attributes, except using month
to render the month-1.
Then, in that calendar, use cellform
to call a Form for rendering each cell. That Form checks the cell’s date and just outputs nothing if the day is below a certain value. e.g. <txp:smd_if_cal day=">25">...</txp:smd_if_cal>
). You’ll probably have to use attributes or CSS to hide various header rows too so you just get the cells displayed.
A couple of caveats:
- The value to test will have to be determined based on
number_of_days_in_month - 5
. - You may have to capture both calendars’ output into variables and output them in sequence later, because you may need to generate the main
<txp:smd_calendar>
tag first before the partial one, but you’ll want to display the partial one before the main one. - Not sure whether you can make it look seamless or not. The markup might prevent that unless you find a way to ‘merge’ the markup after creation.
A tricky one for sure, sorry I don’t have anything more concrete to offer.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline