Jump to content

Search the Community

Showing results for tags 'editing'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 10 results

  1. Hello, I recently posted in this topic, but I decided to start my own thread because while I believe my issue is related to the one in that thread, they are not exactly the same: I have created a custom User Template in the method outlined in the docs. I am creating a directory, so it made sense that every page in the directory was a Directory Member, so they could log in and edit their own information while also keeping the entire directory protected behind a login wall. So the new user type is created: "directory-member". I then created two new roles: "member" and "directory-admin": The "member" only has the ability to View directory-member pages, and "profile-edit", which allows them to manage their own information. The "directory-admin" has the ability to edit any directory-member pages, and administer users. Some Directory Members are both, but all have at least the "member" role. The first hint that something was wrong was when I was testing a "member" user and I could not add a new item to a repeater on that profile. The url for the profile edit (this will be important shortly) is site.dev/admin/profile. The repeater is set up to load new items through AJAX. If this option is turned off, the rest of this issue is no longer completely valid. But as I have found what I believe to be a pretty large issue in the Processwire codebase, I thought it worth bringing up. See, every page (even a user) has a $page->editUrl() method, and it returns a URL like this: site.dev/admin/access/users/edit/?id=2096. That's all good and fine for users that have page-edit permissions, but if they don't, that link will resolve to the admin's equivalent of a 404. So the way that Processwire currently gets around this is by creating a specific editing area for a user to interact with only their profile: /admin/profile. And that works pretty nicely, except for the fact that nowhere is editUrl() ever made aware of the difference. editUrl() is not hookable, and whether or not a page is editable is based on the PagePermissions module. On top of that, there are several core modules that hardcode a search-and-replace (see InputfieldRepeater.module:627) where the editing screen is for Users. This doesn't allow for a huge degree of flexibility that is offered in other places throughout Processwire. If line 627 of InputfieldRepeater is changed from this: $editorUrl = str_replace('/access/users/edit/', '/page/edit/', $editorUrl); to this: $editorUrl = str_replace('/access/users/edit/', '/profile/', $editorUrl); ...the AJAX repeaters work. It's maddening! As is brought up in the thread I attached above, a lot of the features of page editing are missing within /admin/profile/, and it just makes for an altogether strange editing experience. A user who has "page-edit" permissions for templates other than directory-member, but does have "profile-edit" permissions, will see their user in the Page List, but cannot edit their Page unless they hover over the wrench and click the "Profile" link. It just seems - off. I think what this hinges on for me is that the editUrl() of the user should be "/admin/profile/" if that user is logged in (and their page should be editable from the Page List), or the "/admin/access/users/edit/" url; regardless of the URL, both links should resolve to the Page Edit screen, as the Profile Edit screen seems to be a unnecessarily neutered version of Page Edit.
  2. Hi, I'm using the excellent new front-end editing in PW 3.0.30 on a new project. I have a slick carousel that contains editable content. I'm able to edit the content in the slideshow fine but when I save, the page shows without the carousel initialized. Is it therefore possible to reinitialize something like slick after saving in front-end editing?
  3. Hello Everyone! I have a page set up (Projects Page) on a site with a repeater field. Many items have been inserted in this page (projects). Suddenly the page can't be edited anymore, meaning, whenever i hit the "Save" button it will redirect me to the same page with no modifications, it's not possible to edit, delete or add any more items in any of the fields in the repeater on this specific page, all other pages are working normally. Help please!!!! Thank you! Julian
  4. Peter Knight

    Testament to PW

    Here's a nice little PW story. Working on a large-ish PW site at the moment. I'm not dealing directly with the business owner right now. Rather, my contact & client is a friend of the business owner. Having provided him with login details and a PW admin account, we agreed that the business owner should not yet be given login details. We've a few months before training is supposed to begin and site needs a little back-end housekeeping. IE fields need to be labelled correctly templates named more sensibly etc. I discovered recently that the business owner had prematurely been given login details and is already making content changes. This is so contrary to my client experiences with other CMS's that it's cheered me right up. Normally, even after extensive training, clients can choose the wrong templates have problems uploading and adding images generally have *some* issues adding content This is not a fault of the client but rather a problem with the CMS thats built for technical end-users instead of content editors. It just confirms to be completely why PW is the right CMS for this site. And BTW, the business owner isn't very tech-savvy and has never used a CMS before.
  5. Short tip Use the ajax powered search to find pages you want to edit—it's a super-fast way to get around the admin. Longer (but same) tip I was on the cusp of not writing this because it is likely so obvious to so many, but just in case you are like me in terms of navigation in the Admin for editing pages... In PW 2.4 the new search makes finding pages lightening fast. While some themes from before 2.4 was released display recently edited pages to help speed navigation, the new default theme in 2,4 doesn't; and I missed that a bit. But the new search is super fast so now whenever and wherever I am in the Admin, if I want to edit a page I just type in the search box, it ajax-pops, one click and I'm in the page ready to edit—no need to visit the page tree Thanks to Ryan and crew for this small but great advance OK, back to work.
  6. Hello all, I've come up with the following code to allow a user to update their profile information from the front end. It's part of some code that will allow them to edit other content too. I've decided to use URL Segments to help determine the page they are trying to edit, as well as their name etc. So this piece of code will basically allow them to update their Display Name. I just now need to add a piece of code to save the updated data back to the user profile fields etc. The code works as I would expect, and I know there will be more efficient ways of going about this, but this is easy for me to read as it is. So I'm basically here to ask whether or not this is an ok way to go about things? Is it secure? Can you see any major issues? Obviously I will add more profile fields etc, like e-mail, avatar pic, sex etc. I guess I'm just lacking a bit of confidence on the security front. I don't want users to have their profile info hacked from my sloppy coding etc <?php if($_POST['submit']) { echo "Form was submitted."; $new_display_name = $sanitizer->text($input->post->displayname); // The code to save the updated info for the profile will go here. } // Make sure the user has permission before showing the page to edit. if($user->hasPermission("edit_content")) { $edit_page = $input->urlSegment1; // The user is trying to edit their profile. if($edit_page == "profile") { if($user->name == $input->urlSegment2 or $user->isSuperuser()){ $user_display_name = $user->user_display_name; ?> <form action='./' method='post'> <div class="row"> <div class="large-12 columns"> <label>Display Name <input type="text" maxlength="26" name="displayname" value="<?php echo $user_display_name; ?>" /> </label> </div> </div> <div class="row"> <div class="large-12 columns"> <button type="submit" name="submit" value="Send">Update Profile</button> </div> </div> </form> <?php } else { echo "You cannot edit this profile."; } } elseif($edit_page == "link") { echo "You are editing the following link page: " . $input->urlSegment2; } } else { echo "You do not have permission to edit content."; } Thanks in advance.
  7. Just recorded a video of a larger Site I've done some already know of (in this forum). Since a long time I wanted to share something, that maybe of use to others, so here it goes. It shows some technique I use often to give shortcuts to editors when editing content on the page. It's ideal to use for summary entries to give them a direct edit link, or for data pages that have no real view and are located somewhere else in the page tree. Basicly it's simple and just requires to add Fancybox js to the front-end, and you may already have it, or if now use another lightbox that has iframe capabilities. Also if there's not lightbox plugin you need in the site, just load them conditionally using $user->isLoggedin() check. Then generate simple edit buttons/link where you like, and add a "?id=1001" to the url PW admin edit url (/processwire/page/edit/). You can do this without fancybox modal as the default basic-install shows, but using fancybox can make the experience a lot better. To have the navigation of the admin not shown you just add a &modal=1 to the url. Code to generate the year link seen in the video is: if($user->isLoggedin()){ foreach($chart_years as $year){ if($year->editable()) { // if editable by user. echo "<a class='editpage-inline' href='http://" . $config->urls->httpHost . $config->urls->admin . "page/edit/?id=". $year->id ."&modal=1'>edit ".$year->title."</a> "; } } } Then in your JScript you would add fancybox functionality to the links like this. $('a.fancybox-iframe, a.editpage-inline').fancybox({ type: 'iframe', centeronscroll: true, autoScale: true, width: 900, height: '80%' }); Minimal effort, maximal effect.
  8. I am trying out ProcessWire for the first time and I have installed everything. I can get into the admin panel and edit. The problem I am have it when I try to open up templates via FTP. I get the following error: Could not change directory to “/www/processwiredev/site-default/templates”. Server said: Can't change directory to /www/processwiredev/site-default/templates: No such file or directory Error -125: remote chdir failed I am able to get into these files when I use my webhosts file manager, just not via FTP. It does appear I am able to get into and edit the readme file and license files /site-default via FTP, but nothing else If I tried to change permissions it shows as 000 in FTP only. BTW: I am using Coda to access this. Any ideas?
  9. I have an image field with setting 'Maximum files allowed' set to 1 (in case that's relevant). I drop an image in it and save and then use that image in a textarea field when editing copy (with TinyMCE if relevant). But is there a neat way to replace such an image for a new version? Right now I am dropping in a new image and saving except then the textarea shows a placeholder space not the image which makes sense as the original is gone but if I select the placeholder and click the image icon in the TinyMCE toolbar then I get an error (saying the image is gone) rather than an opportunity to choose the new version. I know I can delete the image placeholder in the copy and add the new one but then I loose stuff like any alignment or size settings. Anyone know if there is a neater way to perform the replacement of images?
  10. A problem has come up, when I uploaded PW2.2 to a client’s webspace. Everything seems to work fine but one thing: When editing for example the value of a page’s text area, the value which was initially - and successfully - entered and saved, can’t be overwritten by a new value. As I know it worked on my local web server and on other webspaces, I tried to get to the problem’s root. The SQL-query generated to update the field is INSERT INTO `field_team_text` (pages_id, data) VALUES('1074', '11112asdsadasdasa') ON DUPLICATE KEY UPDATE data=VALUES(data) I tested it in phpMyAdmin directly on the database used for the PW2.2 setup. The result is, that the query doesn’t cause any error but also doesn’t update the `data` column for the already existing `pages_id`. As `pages_id` is correctly defined as primary key, I can’t see any reason why this shouldn’t work. The server version is 5.0.37-community-nt, the os may possibly be Windows, as the web server (which isn’t running on the same machine like the database server) definitely is running it. Any ideas?
×
×
  • Create New...