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

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: [Perchpole] Personalised Editor Screens

By (Deleted User) - March 21, 2012

Hi Perch,

That error message means that the form wasn't submitted with the correct encoding type (it's an error check to make sure that the uploads won't be encoded and corrupted).

To make sure that the form works properly, check that the following line exists (it was line 79 in my uploadForm script):
<form method="post" name="uploadForm" action="?preSaveTempId=<?php echo $preSaveTempId ?>" enctype="multipart/form-data">

Let me know if this helps,

Tom

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/