Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-07 07:41:06

jufemaiz
Archived Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

[plugin] [ORPHAN] jmc_event_manager

Update

more information here

New Version (0.3.1) Issued to deal with deletion bug. See post at euphemize.net

download backend
download frontend

Please read on for more details – currently have new split plugin out for testing.

Back to the show…

Really a preliminary release looking for testers and feedback at this point…

jmc_event_manager v 0.1.1 beta
Event Manager Plugin/Hack

  • Requires addition to database (automatically installs, checks everytime, and fixes where necessary, though isn’t perfect yet)
  • Event Listing
  • Venue Listing to come…

All thoughts welcome…

Example Uses:

<code><txp:jmc_events form=“form_name” /></code>

Required:

  • form: form name – no default

Extras:

  • limit: limit the number of events shown (jmc_events is recursive) – default infinite
  • future: future events – default 1
  • past: past events – default 0
  • venue_id: limit to a certain venue – default none
  • event_id: specific event – default none
  • sort_by: just in case you wish to sort by an alternate arrangement (eg venue_id) – default id
  • sort_order: asc*(ending) or *desc*(ending) – default *asc

Call to insert information within using the following:
<code><txp:jmc_event_name />
<txp:jmc_event_id />
<txp:jmc_event_price />
<txp:jmc_event_otherbands />
<txp:jmc_event_otherinfo />
<txp:jmc_venue_name />
<txp:jmc_venue_id />
<txp:jmc_venue_address1 />
<txp:jmc_venue_address2 />
<txp:jmc_venue_suburb />
<txp:jmc_venue_state />
<txp:jmc_venue_country />
<txp:jmc_venue_postcode />
<txp:jmc_venue_phone />
<txp:jmc_venue_url />
<txp:jmc_venue_email />
<txp:jmc_venue_otherinfo /></code>

Call to insert times using:
<code><txp:jmc_event_time php_date=“phpDateFunction” /></code>
Uses php date function string

Default start time, otherwise <code>start=“0”</code> should be added.

Inserting venue can either be done inline (as per above) OR in a separate form as shown below:
<code><txp:jmc_venue form=“venueForm” /></code>

I have include a function to test the existence of a variable:
<code><txp:jmc_if_variable variable=“variableName”>< /txp:jmc_if_variable></code>
This works ok, but update (to come shortly) will also have the reverse (check if a variable does not exist).

Example forms:
Events listing (called from jmc_events form=“formName”):
<code><li> <h3><txp:jmc_event_name /></h3> <ul> <li class=“venue”> <txp:jmc_venue form=“jmc_venue_form” /> </li> <li class=“date”><txp:jmc_event_time php_date=“l jS F” /></li> <li class=“time”><txp:jmc_event_time php_date=“H:i” /></li> <li class=“price”><txp:jmc_event_price /></li> <li class=“otherbands”><txp:jmc_event_otherbands /></li> <li class=“other”><txp:jmc_event_otherinfo /></li> </ul>
</li></code>

hCard stylings for the Venue
<code>
<div class=“vcard”> <a href=”<txp:jmc_venue_url />” class=“url org”><txp:jmc_venue_name /></a> <div class=“adr”> <div class=“street-address”><txp:jmc_venue_address1 /><br /><txp:jmc_venue_address2 /></div> <span class=“locality”><txp:jmc_venue_suburb /></span>, <span class=“region”><txp:jmc_venue_state /></span> <span class=“nation”><txp:jmc_venue_country /></span> <span class=“postal-code”><txp:jmc_venue_postcode /></span> </div> <div class=“tel”><txp:jmc_venue_phone /></div> <div class=“email”><a href=“mailto:<txp:jmc_venue_email />”><txp:jmc_venue_email /></a></div> <div class=“other-info”><txp:jmc_venue_otherinfo /></div>
</div></code>

jmc_if_variable function

<code><txp:jmc_if_variable variable=“variable_name”></txp:jmc_if_variable></code>

The following is a list of variables that can be used with the jmc_if_variable function:

EVENTS:
event_id
event_name
event_price
otherbands
event_otherinfo

VENUE:
venue_id
venue_name
address1
address2
suburb
state
country
postcode
phone
url
email
venue_otherinfo

edit x 3: event_otherinfo event_otherbands and venue_otherinfo utilise textile.

TO DO LIST

  • Image for event + venue (backburnered)
  • RSS Feed Option (need help people with this one – txp sends out headers!!!)
  • Add functionality of searching by date/venue – added complexity, but added functionality

Easter Egg

For events (you should know what it’s useful for ;)):

<code><txp:jmc_even_odd /></code>

Last edited by jufemaiz (2007-11-09 00:19:15)


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#2 2005-09-07 09:10:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: [plugin] [ORPHAN] jmc_event_manager

jufemaiz wrote:
Really a preliminary release looking for testers and feedback at this point…

jmc_event_manager v 0.1a
Event Manager Plugin/Hack

Sounds like exactly what I need

  • Requires addition to database (checks everytime, fixes where necessary, though isn’t perfect yet)</blockquote>
    Do we have to add another table manually? I’m not sure exactly what you mean…
    <blockquote>* Event Listing
  • Venue Listing to come…

All thoughts welcome…

edit: should say I’m using it live atm @ The Lyrical Madmen (not finished yet though) for the gig guide…</blockquote>

can we have an example of how to implement this plugin ?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2005-09-07 10:04:24

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [plugin] [ORPHAN] jmc_event_manager

Installing the plugin creates 2 new fields in the textpattern table called txp_jmc-event and txp_jmc_event_venue automatically.

Some usage instrictions are in the help after the plugin is installed.

Offline

#4 2005-09-07 18:27:15

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Wow!! Seems like a really good plugin. Will take a test ride and let you know.

p.s. In What way is this a hack? (Its a plugin all the way right?)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#5 2005-09-07 18:59:06

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Man this is fantastic! I just got a gig for a friends art site they have alot of show and this is just what the doctor ordered. Thanks! I’ll report back.

Jamie

Last edited by soulship (2005-09-07 18:59:30)

Offline

#6 2005-09-07 20:04:15

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Awesome, I was just thinking how I was going to have to write something like this to move my band’s site to TXP.


Shoving is the answer – pusher robot

Offline

#7 2005-09-08 00:28:01

jufemaiz
Archived Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

Re: [plugin] [ORPHAN] jmc_event_manager

> creativesplash wrote:

> Wow!! Seems like a really good plugin. Will take a test ride and let you know.

> p.s. In What way is this a hack? (Its a plugin all the way right?)

Cheers guys…

I suppose I consider it a hack since it adds tables to the textpattern database… Not sure if that’s a definition. Future versions will be have preference tab – but need feedback from you guys over how to approach that – but will no doubt have ‘remove additional tables’ so you can get rid of them before uninstalling…

regards, kvack


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#8 2005-09-08 01:13:49

lucashaley
Member
Registered: 2005-02-17
Posts: 11

Re: [plugin] [ORPHAN] jmc_event_manager

Heya — this looks perfect for my own band site. I’m still really new to TXP, though. How do I even get started with this plugin? Thanks for any help!

Offline

#9 2005-09-09 03:32:35

jufemaiz
Archived Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Install the plugin… (turn it on and go to the tab in ‘content’, go to venue manager, then back to event manager)

Start adding details…

Create form in ‘forms’ (presentation) – use the variables as above (first post) to call information

Call using <code><txp:jmc_events form=“formName” /></code> wherever you want it to be called… add the various other bits of information to limit the output… Done…


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#10 2005-09-09 04:16:07

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Hello. Just checked this out. It works very well. There’s only one small problem. If use a single quote (or apostrophe) in any of the textarea’s the entry doesnt get listed. Infact it doesnt make it to the database itself. I’m not sure what’s happening here. Everything else worked as excpected. I’ll let you know if I find anything else.

Regards,
Vasanth


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#11 2005-09-09 04:24:56

jufemaiz
Archived Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

Re: [plugin] [ORPHAN] jmc_event_manager

aaaah – cheers…

forgot about quotation marks… (hang on, are you talking about ‘otherinfo’ and ‘otherbands’? it’s textiled if that’s what you’re enquiring about (but that’s all I’m doing)… The other text forms need to be addslashes and remove slashes to them… (doh!)

I’ll update shortly…


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#12 2005-09-09 05:03:52

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] jmc_event_manager

Textile works fine. Its to do with “Single Quote’s”.

<blockquote>Example: “Today is Vasant<code>h’s</code> birthday” (I’m using an apostrophe here)</blockquote>
The event doesn’t make it to the database.

If I publish the event without the <code> ‘ </code> it gets published without any problems. (Today is Vasant<code>hs</code> birthday – gets published). But when I edit the published event to “Today is Vasant<code>h’s</code> birthday”, the text following the “apostrophe” gets ommitted. i.e. Only the text preceeding the “apostrophe” makes it to the database. I hope you get I am saying!

Regards,
Vasanth

Last edited by creativesplash (2005-09-09 13:10:12)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

Board footer

Powered by FluxBB