Personalised Editor Screens

18 posts by 5 authors in: Forums > CMS Builder
Last Post: June 4, 2012   (RSS)

By Perchpole - March 8, 2012

Hi, Dave -

That sounds perfect.

I'm not exactly sure about which fields yet - as I'm just trying to find out if my suggestion is feasable - but I would be using the Membership plugin.

:0)

Perch

Re: [Perchpole] Personalised Editor Screens

By Dave - March 8, 2012

Hi Perch,

I've attached a sample custom "Add Record" form. Creating front-end edit forms takes some extra work. Here's some additional steps for what you need to do:
- install "Website Membership"
- create a record list page
- require users to login to see the page with <?php if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); } ?>
- filter list to show only record users own with: 'where' => mysql_where(array('createdByUserNum' => $CURRENT_USER['num'])),
- link each record to an edit page passing the num, eg: record-edit.php?num=$num
- use the add page as a template for the edit page
- require users to login to see the page with <?php if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); } ?>
- only load records if the user owns them with 'where' => mysql_where(array('createdByUserNum' => $CURRENT_USER['num'], 'num' => $_REQUEST['num'])),
- on save, use update, not insert to modify existing record.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com
Attachments:

addform_012.php 3K

By Perchpole - March 20, 2012

Hi, Dave -

This is brilliant. Just what I was hoping for. There are just two questions:

1) How do we add an "Upload" button?

2) Would it be possible to add the code of the addForm page to the bottom of an exisiting List page? In effect, could the user add a record to the page they are looking at?

(NB: I am trying to create a demo for a group of seniors and would like them to be able to see how easy it is to update their own pages. Ficking back and forth between pages will seem too complex for them. This has to be real Janet & John stuff!)

:0)

Perch

Re: [Perchpole] Personalised Editor Screens

By (Deleted User) - March 20, 2012

Hi Perch,

Adding uploads through a form outside of CMSB gets a little more tricky, but in it's most simple implementation the attached should work.

I'm not quite sure what you're asking for in point 2 but it sounds like you want to be able to add the 'editor' to the bottom of the page being edited OR you want to add another post the a page, a la a blog. In either case it can be done but it's a bit beyond the scope of the forum and would really require consulting time.

Let me know if this helps,

Tom



Thanks,

Tom
Attachments:

uploadform.php 6K

Re: [Tom P] Personalised Editor Screens

By Perchpole - March 20, 2012

Hi, Tom -

This is an amazing bit of work! Thanks.

Unfortunately I'm receiveing an error and I don't know why?

Upload Error: <form> tag must have enctype="multipart/form-data"

Can you help?

Perch

Re: [Tom P] Personalised Editor Screens

By gkornbluth - June 1, 2012

Hi All,

Is there a way to include info fields in the upload dialog so that info1-5 can be populated by entries in the upload form?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Personalised Editor Screens

By Jason - June 4, 2012

Hi Jerry,

Do you mean having the info fields be drop downs that are populated by other parts of the database? If so, this is possible, but would require a fair amount of customization. Please email consulting@interactivetools.com if you would like to go over some options.

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/