Jump to content

Search the Community

Showing results for tags 'Trash pages'.

  • 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
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

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 2 results

  1. So I went to revisit a project that I put on hold and was met with the following error when trying to trash a page "Operator '&' is not supported for 'status' in ../wire/core/PageFinder.php: 2211 else if(!$database->isOperator($operator)) { throw new PageFinderSyntaxException("Operator '$operator' is not supported for '$field'."); } I have searched through my templates just to make sure I didn't do anything screwy, but I have no clue why this error is being generated. I can individually delete an item from the trash, but I cant empty the entire trash.
  2. Hi all, I'm struggling in putting together a process module. I want to trash all pages that belong to a specific user after the user has been deleted. I found one related thread by onjegolders where he is doing things the other way around. In my case I need a process module that hooks after user delete. And I would like to use the wire/modules/Process/ProcessPageTrash.module. It is my first time creating a pw process module. I have read through the basics of creating modules including the wiki article and looked at the code of ProcessPageTrash.module. But I'm having a hard time putting things together. This is what I've got so far: class ProcessCleanupUserPages extends Process { public static function getModuleInfo() { return array( 'title' => 'Cleanup User Data', 'version' => 0.1, 'summary' => 'Deletes all pages that where created by a user after user has been deleted', 'singular' => true, 'permanent' => false, 'permission' => 'user-admin', 'requires' => 'ProcessPageTrash', 'autoload' => "process=ProcessPageList", // What to add here - autoload only on user list page ); } public function init() { $this->users->addHookAfter('delete', $this, '___execute()'); // is this correct? } public function ___execute() { //get user ID $userID = $this->id or $event->id // How to get the user ID? //get all pages that were created by the deleted user $userPages = $pages->get("created_users_id={$userID}"); // syntax for trash pages - call module ProcessPageTrash on $userPages } protected function render() { // print out message to admin after pages are successfully trashed } } ?> I added comments with "???" where I don't know exactly what to do. Any help would be much appreciated. Thank you.
×
×
  • Create New...