Events component - publishing from the frontend

Discuss the development and implementation of Joomla! components here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Events component - publishing from the frontend

Post by Geraint » Fri Sep 16, 2005 10:12 am

I have a situation where the events administrator would like to publish events via the frontend.  The're not too technical and I don't want them even looking at the admin interface  ;)

Currently when a registered user posts an event the events administrator gets a notification email.  They must then log in to the admin interface, search for the event (the email doesn't show the dates involved or event id at present) and publish/delete the submission.

What I suggest is:
  • Clicking on "my events" for the events administrator would include unpublished events (highlighted in red say)
  • A link on the unpublished events to allow the events admin to edit/delete/publish the event
Can anyone see any downsides/enhancements to this?

Geraint

p.s. The whole thing is straightforward to implement and I'll submit my "patch" to the component development team.

naughtyleo
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Wed Sep 21, 2005 9:32 am

Re: Events component - publishing from the frontend

Post by naughtyleo » Sun Oct 09, 2005 12:04 pm

Hi,

Have you come up with a solution?

wanna test it out!

regards,
naughtyleo

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Sun Oct 09, 2005 4:23 pm

The version of the events module I have on my Joomla setup has part of this implemented - I've been waiting for the events component to be setup as a project on developer.joomla.org.

If a project isn't setup soon then I'll put my code here. I dind't do this before now since I hadn't had a response to this posting!

Geraint

User avatar
pointri
Joomla! Explorer
Joomla! Explorer
Posts: 283
Joined: Wed Aug 24, 2005 2:02 pm
Location: Rhode Island, USA

Re: Events component - publishing from the frontend

Post by pointri » Sun Oct 09, 2005 5:11 pm

Just caught this thread and I'd be interested in this as well...been getting quite a few requests lately for this feature.  It'd definitely take a load off us for data entry.

User avatar
bryandrake
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sun Oct 02, 2005 6:24 pm
Location: Richmond, Va USA

Re: Events component - publishing from the frontend

Post by bryandrake » Sun Oct 09, 2005 5:27 pm

Add my voice to the call for this enhancement.  I find it very tedious to search for new events as we have a pretty full calendar.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Mon Oct 10, 2005 1:37 pm

I am attaching a set of alternative implementation files for the events component and the events calendar.  This is the version I have installed on my server - Make sure you try it out on a test setup first since there may be some dependencies I may not have realised.

The 2 component zip files contain the alternative versions of the frontend and admin sides - copy them over an existing installation of the events component.  DO NOT UNINSTALL YOUR EXISTING VERSION - the uninstall routine in the events component will DELETE all your existing data.

The module file is a proper module installation zip file.

These files incorporate a number of changes:
  • Calendar module is a lot faster and makes far fewer SQL queries!!
  • {Mambel}fish can now translate event details and categories
  • Publishers/managers/admin/super-admin users now see unpublished items in their "My Events" list.  Adding a link in the notification email will be more work.
  • Both component and module now support standard Joomla caching
Have a go on a test server and let me know how you get on.

Geraint

p.s. You may need an additional contentelement file for mambelfish - let me know if it doesn't work.

p.p.s. The attached file com_events-alt-admin.zip file now includes the fix to deal with the problem highlighted by chadness :
http://forum.joomla.org/index.php/topic ... l#msg78806
You do not have the required permissions to view the files attached to this post.
Last edited by Geraint on Thu Oct 13, 2005 8:25 am, edited 1 time in total.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Mon Oct 10, 2005 1:57 pm

Just realised one minor dependency I missed - I have made substantial changed to my implementation of the Fish and so no longer needed the fix I had previously implemented in events.php.

I should therefore have reinstated my fix in events,php.  My previous post now has the correct events.php file included in it.  For the benefit of the one enthusiastic joomler who downloaded the file before I spotted the error I am attaching the single corrected frontend file by itself.

Geraint
You do not have the required permissions to view the files attached to this post.

User avatar
pointri
Joomla! Explorer
Joomla! Explorer
Posts: 283
Joined: Wed Aug 24, 2005 2:02 pm
Location: Rhode Island, USA

Re: Events component - publishing from the frontend

Post by pointri » Tue Oct 11, 2005 2:08 am

Can't wait to try it out...just got to line this revision up side-by-side with my hacked version of events and see what I should be patching in.  I have a test Joomla installation running in a subdirectory on my site, using the same content, so I'll try uploading your new function calls there a little later this week and report back.

User avatar
chadness
Joomla! Guru
Joomla! Guru
Posts: 768
Joined: Mon Aug 22, 2005 5:43 pm
Location: Minneapolis, MN
Contact:

Re: Events component - publishing from the frontend

Post by chadness » Wed Oct 12, 2005 2:53 pm

Thanks for this!  It appears to work great, and as an added bonus, it cleared up a problem I had even running the events calendar after my Joomla upgrade :)

User avatar
chadness
Joomla! Guru
Joomla! Guru
Posts: 768
Joined: Mon Aug 22, 2005 5:43 pm
Location: Minneapolis, MN
Contact:

Re: Events component - publishing from the frontend

Post by chadness » Wed Oct 12, 2005 6:36 pm

Ooops, I spoke too soon.  I can no longer get in to the back end with the administrative files installed (just a blank screen with any of the three menu options).  What would be the consequences of using your front end, but the original back end?  I'm digging in to the file now to see if I can figure out what is wrong.

User avatar
chadness
Joomla! Guru
Joomla! Guru
Posts: 768
Joined: Mon Aug 22, 2005 5:43 pm
Location: Minneapolis, MN
Contact:

Re: Events component - publishing from the frontend

Post by chadness » Wed Oct 12, 2005 7:02 pm

3 posts in a row, sorry about that.  Looks like it was admin.events.php causing my problems.  When I went back to the original file, with the relative paths instead of using $mosConfig_absolute_path, it started working again.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Thu Oct 13, 2005 8:21 am

Thanks for spotting that Chadness.

I am using Zend Studio to develop.debug and it has an "issue" with dealing with relative includes/requires so I had put in the absolute paths to get around that (but missed one at the bottom of the file :-[).  Yes - you can either use the original admin.events.php or the patched version attached which now works properly.

Geraint
You do not have the required permissions to view the files attached to this post.

User avatar
chadness
Joomla! Guru
Joomla! Guru
Posts: 768
Joined: Mon Aug 22, 2005 5:43 pm
Location: Minneapolis, MN
Contact:

Re: Events component - publishing from the frontend

Post by chadness » Thu Oct 13, 2005 1:37 pm

No problem!

If you're feeling crazy, you might want to repackage a version with only the files you changed.

Also, a note for everyone, be careful about overwriting your configuration file :)

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Thu Oct 13, 2005 2:43 pm

OK - here are just the bare essentials.  Changed files only.

The CSS file has an extra entry, so you can keep the original and add this entry instead of using the version from the zip file attached.

a.ev_link_unpublished {
    color:red;
}

Geraint

p.s. The CSS file in the module stops the colums widths flickering with mouse :hover
You do not have the required permissions to view the files attached to this post.

User avatar
chadness
Joomla! Guru
Joomla! Guru
Posts: 768
Joined: Mon Aug 22, 2005 5:43 pm
Location: Minneapolis, MN
Contact:

Re: Events component - publishing from the frontend

Post by chadness » Thu Oct 13, 2005 2:46 pm

Nice, thanks!

User avatar
bryandrake
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sun Oct 02, 2005 6:24 pm
Location: Richmond, Va USA

Re: Events component - publishing from the frontend

Post by bryandrake » Fri Oct 14, 2005 2:58 am

I downloaded the 2 files in the last post.  Do I install these using the installer or should I unpack them and manually copy them over the old files?
Bruam

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Fri Oct 14, 2005 8:02 am

Copy them over an existing installation.

Clearly its a good idea to backup your existing installation files (eg zip or targz them) so you can go back to the old code if you need to.

Make sure you don't uninstall the existing code or try to use uninstall to remove my patched code planning to reinstall the existing code.  This is because the uninstall process for the events component clears out your events related tables in the database (this should be optional to my mind in order to make upgrades easier!).  Just restore the files from the backup if you want to go back.

Geraint

warmac
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Wed Oct 12, 2005 10:16 pm

Re: Events component - publishing from the frontend

Post by warmac » Tue Oct 18, 2005 10:25 pm

Clearly, it's a good idea to not even publish fluk files, components, etc unless they really work  :laugh:

I won't even go near a hack job  ;D

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Wed Oct 19, 2005 7:41 am

Yes - but without experimentation, exploration, testing and sharing we'd still be living in caves and struggling to get fires lit with 2 sticks!

Geraint

warmac
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Wed Oct 12, 2005 10:16 pm

Re: Events component - publishing from the frontend

Post by warmac » Wed Oct 19, 2005 7:59 am

Geraint wrote: Yes - but without experimentation, exploration, testing and sharing we'd still be living in caves and struggling to get fires lit with 2 sticks!

Geraint
You do that on your own time, not mine  :P  I expect you to work out all the bugs before it gets in my hands,

You do want that donation don't you ? well don't you ? Don't make me come down there and do it for you he he

I don't believe in Beta, we are not test dummies, we want the real deal this is Burger King isn't it ?  8)

User avatar
pointri
Joomla! Explorer
Joomla! Explorer
Posts: 283
Joined: Wed Aug 24, 2005 2:02 pm
Location: Rhode Island, USA

Re: Events component - publishing from the frontend

Post by pointri » Wed Dec 07, 2005 6:18 am

Hi Geraint,

The hack's working fine thus far, except one thing that I think involves SEF enabled sites.

When a user with event editor rights clicks on "My Events," you'll get something like this when core SEF is enabled:

http://www.mysite.com/component/option, ... 12/day,07/

And the admin screen appears. Clicking on "Delete" will remove the event, but returns the normal URL appended to the SEF URL:

http://www.mysite.com/component/option, ... deleted%21

Here's how my $deletelink looks in events.php:

Code: Select all

$deletelink = "<a href='".sefRelToAbs("index.php?option=$option&task=delete&agid=$row->id&year=$link_year&month=$link_month&day=$link_day&Itemid=$Itemid")."'><b>"._CAL_LANG_DELETE."</b></a>\n";
Looks normal to me...maybe the duplicate Itemid is causing the trouble, or the URL that's returned after deleting the entry?  I'm stumped  :)  Any ideas?

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Wed Dec 07, 2005 10:28 am

Try changing the $returnlink in removeEvent() in events.php  line c.332 to

Code: Select all

sefRelToAbs("index.php?option=$option&Itemid=$Itemid");


Its not ideal since the message is not displayed but that is a SEF/mosRedirect issue I think.

Geraint

p.s. This testing will hopefully not be in vain - I'm in advanced discussions with the original author about incorporating these changes into the next release.

User avatar
pointri
Joomla! Explorer
Joomla! Explorer
Posts: 283
Joined: Wed Aug 24, 2005 2:02 pm
Location: Rhode Island, USA

Re: Events component - publishing from the frontend

Post by pointri » Wed Dec 07, 2005 2:34 pm

Worked like a charm: thank you.  Logged in as administrator at least, the confirmation messages ended up appearing up as well, so no trouble there, apparently.  ???

I had seen on another thread that there's still work being planned for improving the component, and that your hacks may find their way into the next release, both of which would be great.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Wed Dec 07, 2005 6:17 pm

I'm interested that you don't get a problem with the "item deleted" message.

What version of PHP, Apache are you running and which OS?  I'd like to track down what is happening.

Thanks

Geraint

User avatar
pointri
Joomla! Explorer
Joomla! Explorer
Posts: 283
Joined: Wed Aug 24, 2005 2:02 pm
Location: Rhode Island, USA

Re: Events component - publishing from the frontend

Post by pointri » Wed Dec 07, 2005 7:31 pm

Joomla 1.0.4, SEF On, Xaneon Extensions 2.0 enabled
PHP 4.3.11 Safe Mode Off
Apache 1.3.34 (Linux)
Using Firefox 1.5 for browsing.

$returnlink comes out like this:

http://www.mysite.com/component/option, ... deleted%21

It returns mosmsg without any trouble, and bounces users to the component's default view (weekly in my case).

On second thought, maybe a more intuitive place for $returnlink to go after deleting or modifying would be back to the admin screen?

http://www.mysite.com/component/option, ... deleted%21
Last edited by pointri on Mon Dec 12, 2005 4:14 am, edited 1 time in total.

User avatar
lemings
Joomla! Explorer
Joomla! Explorer
Posts: 317
Joined: Tue Oct 11, 2005 5:43 pm
Location: Latvia
Contact:

Re: Events component - publishing from the frontend

Post by lemings » Thu Dec 15, 2005 10:06 am

Hi!

I tried to find this project in developer.joomla.org, but I had no success?

Are these modifications to events component and module published somewhere in cvs or subversions? If not, maybe somebody can register this project?

I am also interested in Your modifications.

What about original events component form mambo, I downloaded it form developer.joomla.org, but now I can't find it anymore.

Have a nice day!  :)
Member of the Latvian Joomla Translation Team
Latvian project in JoomlaCode- http://joomlacode.org/gf/project/joomla_latvian/
Latvian Joomla! team  - http://www.joomlalv.org

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Thu Dec 15, 2005 10:29 am

I have created an events project in developer.joomla.org called JEvents.  I am aiming for a new release to coincide (or quickly follow) Joomla 1.1.

In the meantime you can use the existing $ambo component/modules from http://mamboforge.net/projects/events - you will need to comment out the "clone()" function in components/com_events/events.php.

If you want to play with the modifications described in this thread do so with care and let me have some feedback since I anticipate most of the functionality will get into the next release.

Geraint

User avatar
lemings
Joomla! Explorer
Joomla! Explorer
Posts: 317
Joined: Tue Oct 11, 2005 5:43 pm
Location: Latvia
Contact:

Re: Events component - publishing from the frontend

Post by lemings » Thu Dec 15, 2005 10:51 am

Thanks for information, it seems that search engine is not working properly, I tried searching for word event and events, Your project was not shown.

Is it possible to make a release or put your files into cvs or repository is not accessable for public?

For now I'm using modules and components downloaded from mamboforge.
I am too lazy to read all thread, so I asked for latest version :)
Member of the Latvian Joomla Translation Team
Latvian project in JoomlaCode- http://joomlacode.org/gf/project/joomla_latvian/
Latvian Joomla! team  - http://www.joomlalv.org

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Events component - publishing from the frontend

Post by Geraint » Thu Dec 15, 2005 11:03 am

I hadn't realised that I needed to set the project access permissions (I didn't need to with another little project I have).  I have done that so once the cache has expired on deverloper.joomla.org you should see the project - I have setup SVN respositories but there's no source code there yet.

Gerain

User avatar
volksman3
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Wed Nov 23, 2005 11:24 am
Location: Toronto, Canada
Contact:

Events - Auto approval of events

Post by volksman3 » Mon Jan 09, 2006 5:07 pm

I thought this would be a good place to post this question as you guys have been doing some extensive work with this component:

Is it possible to get events to auto approve so the administrator does not have to review each one?
Last edited by volksman3 on Mon Jan 09, 2006 5:14 pm, edited 1 time in total.
Life's a garden, you gotta dig it!
http://www.akirastudio.co.uk


Locked

Return to “Components”