canonite
Forum Replies Created
-
Forum: Plugins
In reply to: [Postie] new gmail ?nope … my php server does not have imap extension enabled..
Forum: Plugins
In reply to: [Postie] new gmail ?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 completeproblem 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
In reply to: [Postie] new gmail ?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
In reply to: [Postie] new gmail ?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
In reply to: [Mmm Simple File List] Folder pathAdditionally, 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
In reply to: [Mmm Simple File List] Display List by file datenote 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
In reply to: [Mmm Simple File List] Display List by file datethink you can use orderby and order..
Orderby = date or name
Order = asc or descForum: Plugins
In reply to: [Mmm Simple File List] Folder paththe 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, 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..Forum: Plugins
In reply to: [Mmm Simple File List] Remove File Sizefor 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
In reply to: [Postie] disable posting if subject line contains certain text?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, 1 month ago by canonite.
Forum: Plugins
In reply to: [Postie] disable posting if subject line contains certain text?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
In reply to: [Postie] disable posting if subject line contains certain text?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
In reply to: [Postie] disable posting if subject line contains certain text?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: Donewill need to look into scanning for the subject line much earlier, before any post is created..
Forum: Plugins
In reply to: [Postie] disable posting if subject line contains certain text?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 titleand so on..
Forum: Plugins
In reply to: [Events Made Easy] RSVP settings in EventAdding #_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]