Title: canonite's Replies | WordPress.org

---

# canonite

  [  ](https://wordpress.org/support/users/canonite/)

 *   [Profile](https://wordpress.org/support/users/canonite/)
 *   [Topics Started](https://wordpress.org/support/users/canonite/topics/)
 *   [Replies Created](https://wordpress.org/support/users/canonite/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/canonite/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/canonite/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/canonite/engagements/)
 *   [Favorites](https://wordpress.org/support/users/canonite/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/users/canonite/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/canonite/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] new gmail ?](https://wordpress.org/support/topic/new-gmail/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/new-gmail/#post-10701915)
 * nope … my php server does not have imap extension enabled..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] new gmail ?](https://wordpress.org/support/topic/new-gmail/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/new-gmail/#post-10701670)
 * Debug Output
 *     ```
       Connect to Mail Host
       Postie connection: sockets
       Postie protocol: pop3-ssl
       Postie server: pop.gmail.com
       Postie port: 995
       pConnection: mailbox: INBOX
       Connecting via Socket
       Socket: tls://pop.gmail.com:995
       Socket error: 0 - 
       Socket: POP3
       socket read (1) :+OK Gpop ready for requests from 115.42.251.102 e11-v6mb162546760ywl
       Socket: attempting a secure connection
       socket write: STLS
       socket read (1) :-ERR not supported e11-v6mb162546760ywl
       socket write: USER **********@gmail.com
       socket read (1) :+OK send PASS
       socket write: (login) LOGIN/APOP/PASS
       socket read (1) :+OK Welcome.
       socket write: STAT
       socket read (1) :+OK 394 3346843
       pop count: +OK 394 3346843
       Successful POP3-SSL connection on port 995
       # of waiting messages: 394
       socket write: QUIT
       socket read (1) :+OK Farewell.
       Test complete
       ```
   
 * problem is i have 3 mails in inbox and 400+ in Sent mails .. like you mentioned..
   POP doesn’t recognise folders… so i am not too sure where it’s picking up the
   emails from
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] new gmail ?](https://wordpress.org/support/topic/new-gmail/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/new-gmail/#post-10700056)
 * i don’t need it to be recognising any folders, just picking up new mails to be
   posted. it worked beautifully just some time back
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] new gmail ?](https://wordpress.org/support/topic/new-gmail/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/new-gmail/#post-10700037)
 * pop-ssl… can’t connect on port 110..
 * it went thru my sent mails, triggering 337 ‘unauthorised post’ notices, and 2
   successful ones
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mmm Simple File List] Folder path](https://wordpress.org/support/topic/folder-path-3/)
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/folder-path-3/#post-10315954)
 * Additionally, after reading the description page of the plug in ..
 * Usage Examples:
 * _Let’s say you’re using the default WordPress Media settings so we can expect
   your uploads folder to be in /wp-content/uploads/mm/yy/ with this in mind the
   shortcode “folder” attribute will look in a directory relative to this. With 
   this base directory say we want to list “png” files in the folder “/wp-content/
   uploads/cats/” we would use the following shortcode:_
 * `[MMFileList folder=”/../../cats/” format=”table” types=”png” /]`
 * If you have you disabled the setting to store uploads in the /mm/yy/ folder structure(
   you can do this within Settings -> Media) and wanted to display that same file
   you would use this shortcode:
 * [MMFileList folder=”/cats/” format=”table” types=”png” /]
 * This will result in a tabular list of all .png files in the /wp-content/uploads/
   cats/ folder.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mmm Simple File List] Display List by file date](https://wordpress.org/support/topic/display-list-by-file-date/)
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/display-list-by-file-date/#post-10315952)
 * note the limitations … per the plugin’s description..
 * orderby: Current params can be either “name” (default) or **“date” which sorts
   the files by date modified since date created seems to be hit and miss.**
 * order: By default the order of the list is sorted descending (asc) from the highest
   value to lowest where value is determined by the “orderby” attribute. Ordering
   by date results in a list being displayed as newest to oldest and ordering by
   name results in a list descending through the alphabet (a-z). To reverse either
   of these defaults simply add order=”desc” into the shortcode parameters
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mmm Simple File List] Display List by file date](https://wordpress.org/support/topic/display-list-by-file-date/)
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/display-list-by-file-date/#post-10311554)
 * think you can use orderby and order..
 * Orderby = date _or_ name
    Order = asc _or_ desc
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mmm Simple File List] Folder path](https://wordpress.org/support/topic/folder-path-3/)
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/folder-path-3/#post-10311543)
 * the code utilizes wp_upload_dir() (which is called in line 52: $baseDir = wp_upload_dir();)
   which changes with the year/month, _unless you uncheck the uploads\_use\_yearmonth\
   _folders setting in the administration panel (which I read on [dev.wp](https://developer.wordpress.org/reference/functions/wp_upload_dir/),
   but have no idea if its true or not)_
 * while i have only just installed this plug in today, i faced the same issue as
   you as i wanted to read from a folder (memos; which in itself contains subfolders
   divided into years) in wp-content/uploads, and not in the year/month folders.
 * be warned.. do this at your own risk..
    comment out line 53/54
 *     ```
       //$dir = $baseDir['path'] . '/' . $folder;
       //$outputDir = $baseDir['url'] . '/' . $folder; //ex. http://example.com/wp-content/uploads/2010/05/../../cats' 
       ```
   
 * in it’s place,
 *     ```
       $dir = $folder;
       $url = home_url();
       $outputDir = $url . '/' . $folder;
       ```
   
 * if my understanding is correct, I am no longer using the default upload directory(
   wp_upload_dir).
 * Original $dir appends the directory you are pointing to, to the wp default upload
   directory.
    $outputDir also uses the same default folder, so in it’s place, I
   have set it to read from the url + directory being pointed to ..
 * in your case, your shortcode would be
    `[MMFileList folder= "wp-content/uploads/
   2018/01/documentation/" ...`
 * again, i must reiterate this, as I have not fully read thru the entire code..
   
   DO AT YOUR OWN RISK..
    -  This reply was modified 8 years ago by [canonite](https://wordpress.org/support/users/canonite/).
    -  This reply was modified 8 years ago by [canonite](https://wordpress.org/support/users/canonite/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mmm Simple File List] Remove File Size](https://wordpress.org/support/topic/remove-file-size/)
 *  [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years ago](https://wordpress.org/support/topic/remove-file-size/#post-10311290)
 * for my part, i am using format=”ul”
 * on line 239, i removed (commented out actually)
    `<span class="filesize"> (%s)
   </span>`
 * in my site source, it showed this ..
 * <span class=”filename”>(To customers) Change in Office Address.pdf</span><!–<
   span class=”filesize”> (182.21 Kb)</span>–>
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] disable posting if subject line contains certain text?](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/#post-10143824)
 * this code helps to filter out strings in the post title and deletes the post 
   if it matches the filter string.
 *     ```
       function deny_auto_reply($post) {
       	$title = $post['post_title'];
       	$deleteID = $post['ID'];
       	$filter_string = "Automatic reply";
       	if (stristr($title,$filter_string) != true) {
       		//output content if there is no text "automatic reply" (case insensitive) in title
       		DebugEcho("DBPostTitle: No auto reply in title");
       		return $post;
       	} else {
       		//output to debug screen
       		DebugEcho("DBPostTitle: Auto reply in title");
       		DebugEcho("DBPostDelete: Deleting postID $deleteID");
       		wp_delete_post($deleteID);
       		return null;
       	}
       }
       ```
   
 * the position of the add_filter seems to play a part in the running of the script..
   as i have included a post_restrict_category function:
 *     ```
       add_filter('postie_post_before', 'post_restrict_category');
       add_filter('postie_post_before', 'deny_auto_reply');
       ```
   
 * the above works fine… the auto reply is caught and deleted (does not appear in
   trash at all)
 *     ```
       add_filter('postie_post_before', 'deny_auto_reply');
       add_filter('postie_post_before', 'post_restrict_category');
       ```
   
 * this one triggers a “PostToDB Error: Content, title, and excerpt are empty.”,
   with the resulting empty tmptitle post being left in the trash.
    -  This reply was modified 8 years, 2 months ago by [canonite](https://wordpress.org/support/users/canonite/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] disable posting if subject line contains certain text?](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/#post-10140951)
 * extending postie can be quite fun! ..
 * i want my authors (HODs) to be able to post contents via email(postie) to our
   office intranet, and yet i want them to post into their specific categories only(
   author-category plugin).
 * i’ve just managed to get postie to check the posters specific category and change
   it accordingly…
 * thanks Wayne for the wonderful plugin!
 *     ```
       function post_restrict_category($post) {
                   global $current_user;
                   get_currentuserinfo();	
                   $cats = get_user_meta($current_user->ID,'_author_cat',true);
                   $cats = (array)$cats;
       			if (!empty($cats) && count($cats) > 0){	
       			$c = get_category($cats[0]);
       			DebugEcho("DBPostCat: $c->name");
       			$post['post_category'] = $c->name;
       			return $post;
       	}
       }
       ```
   
 * based on what i checked, most of the params are quite standard, except for ‘_author_cat’
 * hope this can help someone..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] disable posting if subject line contains certain text?](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/#post-10140245)
 * thanks Wayne,
 * tmptitle still seems to be created and trashed even with the return null added..
 * but overall it does solve my problem of having an author’s away message being
   posted by mistake..
 * was looking at postie_post_pre, but it ended up removing the whole subject line
   and creating a ‘live from the field’ default title..
 *     ```
       add_filter('postie_post_pre', 'deny_auto_reply');
   
       function deny_auto_reply($email) {
       	$subject = $email['headers']['subject'];
       	if (stristr($subject,"automatic reply") == false) {
       		DebugEcho("DBecho : No Auto Reply");
       		DebugDump($subject);
       		DebugEcho("DBechoEnd");
       		return $email;
       	} else {
       		DebugEcho("DBecho: Auto reply found");
       		DebugDump($subject);
       		DebugEcho("DBechoEnd");
       		return null;
       	}
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] disable posting if subject line contains certain text?](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/#post-10140067)
 * just noticed that i am having tmptitle being created and trashed since the post
   was not saved :
 *     ```
       post_email: After postie_post_before filter
       postie_post filter cleared the post, not saving.
       post_email: Done
       ```
   
 * will need to look into scanning for the subject line much earlier, before any
   post is created..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Postie] disable posting if subject line contains certain text?](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/disable-posting-if-subject-line-contains-certain-text/#post-10140047)
 * thanks Wayne,
    this seems to have worked… /wp-content/filterPostie.php
 *     ```
       <?php 
       function deny_auto_reply($post) {
       	$title = $post['post_title'];
       	if (stristr($title,"Automatic reply") != true) {
       		//output content if there is no text "automatic reply" (case insensitive) in title
       		DebugEcho("DBPostTitle: No auto reply in title");
       		return $post;
       	} else {
       		//output to debug screen
       		DebugEcho("DBPostTitle: Auto reply in title");
       	}
       }
   
       add_filter('postie_post_before', 'deny_auto_reply');
       ?>
       ```
   
 *  Debug output:
 *     ```
       post_email: Before postie_post_before filter
       DBPostTitle: No auto reply in title
       ```
   
 * and so on..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Made Easy] RSVP settings in Event](https://wordpress.org/support/topic/rsvp-settings-in-event/)
 *  Thread Starter [canonite](https://wordpress.org/support/users/canonite/)
 * (@canonite)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/rsvp-settings-in-event/#post-9975735)
 * Adding #_ADDBOOKINGFORM_IF_NOT_REGISTERED to the RSVP form template seems to 
   hang at the single events page for both IE and Chrome.
 * never mind tho .. will figure something out something .. probably show a link
   to log in and register for event using
    `[eme_if tag='#_is_logged_in' value='
   0'] yadda [/eme_if]`

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/users/canonite/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/canonite/replies/page/2/?output_format=md)