Dec 04, 2008, 12:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Poll
Question: Is the FDM working for you ?
Yes - 47 (81%)
No - 11 (19%)
Total Voters: 58

Pages: [1] 2 3 ... 34   Go Down
  Print  
Author Topic: [snippet] Front End Document Manager (FDM) v0.1b  (Read 78749 times)
0 Members and 1 Guest are viewing this topic.
Soda
Testers
*
Posts: 415


Daddy !


WWW
« on: May 19, 2007, 05:52 AM »

Add, edit, (un)publish and delete document from front end without manager login.

The snippet simply add a bouton bar : Add - Edit - (Un)Publish - Delete for the webgroups you want (anonymous post can be allowed). Manager user have full rights, so to see the complete bar, log you in the manager or set the group parameters.
The Edit button display an  eForm  whith the fields and TV you want to edit.

The documentation about installation and use is in the attached zip .

Check if you get the last version, RTFM, check if you prefixed tv names and feel free to send bug report, money ?, wish and all advices about improving security.
Wiki Catalogue System Howto Outdated

Notes:
  • All the update will be attached in this first post.
  • Don't forget to update snippet and chunk for each new version. You can use the module for easy install.
  • The version's number is only present in the file fdm.class.inc.php, others files version are not updated.
  • There is problems with cached pages. Again ?
  • I'm not a programmer and my english is so bad.

I hope you like it.

* FDM_0.1b.zip (35.65 KB - downloaded 151466 times.)
« Last Edit: Oct 21, 2007, 12:22 AM by Soda » Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
heliotrope
Coding Team
*
Posts: 2,447


WWW
« Reply #1 on: May 19, 2007, 06:38 AM »

Hi Soda,

i wanted to test your snippet but I cannot untar the archive.
Could you provide another one in zip format for instance.

thx

:-)
Logged

Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #2 on: May 19, 2007, 06:39 AM »

no problem check in few minutes
Edit: Added in the first post
« Last Edit: May 19, 2007, 06:41 AM by Soda » Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
heliotrope
Coding Team
*
Posts: 2,447


WWW
« Reply #3 on: May 19, 2007, 06:47 AM »

THX :-)

I've quickly looked at the code and I see at least one feature to add => multilingual support.

I will give this a try this afternoon and will report.

:-)
Logged

Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #4 on: May 19, 2007, 06:48 AM »

I add it in the Todo list, but the most of strings are in templates and are easy to change. I'm waitting for your report Smiley
« Last Edit: May 19, 2007, 06:52 AM by Soda » Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
YankeeDeuce
Jr. Member
*
Posts: 41


I love MODx!


WWW
« Reply #5 on: May 19, 2007, 07:10 AM »

Just tried to install to take a look, this is what I get. Fresh install of 0.9.6RC3.

Code:
PHP error debug
  Error: CFDM::include_once(/var/www/modx/includes/fdm.db.class.inc.php) [function.CFDM-include-once]: failed to open stream: No such file or directory
  Error type/ Nr.: Warning - 2
  File: /var/www/modx/assets/snippets/FDM/fdm.class.inc.php
  Line: 102
  Line 102 source: if (!class_exists('FdmDocument')) include_once($modx->config['base_path'].$this->config['path'].'includes/fdm.db.class.inc.php');
Logged
Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #6 on: May 19, 2007, 07:15 AM »

Check these:
1 have you the correct base_path in the MODx Configuration ?
2 the file is present in /assets/snippets/FDM/includes/fdm.db.class.inc.php    ? and has correct permissions ?
« Last Edit: May 19, 2007, 07:25 AM by Soda » Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
ChuckTrukk
Committed to MODx
*****
Posts: 638



WWW
« Reply #7 on: May 19, 2007, 07:28 AM »

Soda,

This looks  BEAUT-I-FUL! This is one thing that I felt MODx really needed. Will test it out today.

Chuck
Logged

Chuck the Trukk
ProWebscape.com :: Nashville-WebDesign.com
- - - - - - - -
What are TV's? Here's some info below.
http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
YankeeDeuce
Jr. Member
*
Posts: 41


I love MODx!


WWW
« Reply #8 on: May 19, 2007, 07:54 AM »

Check these:
1 have you the correct base_path in the MODx Configuration ?
2 the file is present in /assets/snippets/FDM/includes/fdm.db.class.inc.php    ? and has correct permissions ?

base_path is set correctly
File is there and correct permissions (changed permissions and still the same error.)

I just tried on my live test site and I get the same error.  Huh Still playing around with it.
Logged
Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #9 on: May 19, 2007, 08:05 AM »

 Undecided And the first bug is for YankeeDeuce !
Try the new posted file, you just need to update the fdm.class.inc.php  and the snippet call the name of the parameter was bad:
$path = $modx->config['base_dir'] . 'assets/snippets/FDM/';
$FDM->SetP('path',$path);
« Last Edit: May 19, 2007, 08:24 AM by Soda » Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,055


looking a little more like my avatar again...


WWW
« Reply #10 on: May 19, 2007, 09:25 AM »

What is the $modx->config['base_dir'] Huh  $modx->config['base_path'] or $modx->config['base_url']
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
The spirit of a warrior is not geared to indulging and complaining, nor is it geared to winning or losing. The spirit of the warrior is geared only to struggle, and every struggle is a warrior's last battle on earth. Thus the outcome matters very little to him. In his last battle on earth a warrior lets his spirit flow free and clear. And as he wages his battle, knowing that his intent is impeccable, a warrior laughs and laughs.
  — don Juan Matus
Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #11 on: May 19, 2007, 10:13 AM »

What is the $modx->config['base_dir'] Huh  $modx->config['base_path'] or $modx->config['base_url']
Sorry,  this is base_path for the include statement, file updated.
Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
heliotrope
Coding Team
*
Posts: 2,447


WWW
« Reply #12 on: May 19, 2007, 10:19 AM »

Hi Soda,

I had to remove the & prior some variables($escapeFields) in the save() function in fdm.dbclass
otherwise I had an error message => call by reference deprecated.
Code:
<?php
function
Save(){ //escape added

global $modx;

$tablename=$modx->getFullTableName('site_content');  
  
$escapedFields = array_map(create_function('$n', 'global $modx;return $modx->db->escape($n);'), $this->fields);
if($this->isNew){
//here
$this->fields['id']=$modx->db->insert($escapedFields, $tablename);

$this->isNew = false;

} else {

$id=$this->fields['id'];
//here
$modx->db->update($escapedFields, $tablename, "id=$id");

}
unset($escapedFields);// free the array

if(is_array($this->tvs)) $this->saveTVs();
}

« Last Edit: May 19, 2007, 10:21 AM by heliotrope » Logged

Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #13 on: May 19, 2007, 10:27 AM »

I had to remove the & prior some variables($escapeFields) in the save() function in fdm.dbclass
otherwise I had an error message => call by reference deprecated.

Thanks, I've updated the file + the eform tpl, TV needs 'tv' before name , id and placeholder
Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
heliotrope
Coding Team
*
Posts: 2,447


WWW
« Reply #14 on: May 19, 2007, 10:30 AM »

I would also recommend you to update the sample form chunk to change the id type field to an hidden field.

:-)
Logged

Pages: [1] 2 3 ... 34   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!