zhangweiwu
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: forum/mailing list integrationOne of the plugins I researched is Mailing Group Listserv
https://www.ads-software.com/plugins/wp-mailing-group/Seems to me it is one-way sync – the pro version offers access to archives, which should be a read-only forum. I was expecting some kind of set-up on the email server, e.g. Amazon SES which allows you to code what actions to happen when someone post to the email address. But it seems this one requires a mailbox and uses IMAP/POP3 to access it to learn if there are new emails.
This will be my default choice then if there are no two-way sync products.
Forum: Fixing WordPress
In reply to: no option to import images & file attachementsThanks. Since I already wrote a script to solve my own problem, may as well post it here in case anyone needs. And yes, this is wordpress.com-specific.
#!/usr/bin/python # -*- coding: UTF-8 -*- """ Step 1. Export WXR xml file and import it to wordpress.com. Now all images should be linked to the old site. Step 2. Download all images from old site's media library and upload them to the new site. Image names cannot duplicate, or this script will not work. This is an inherit limitation Step 3. Replace every occurance of the world yuliansu because that's my username. Replace with yours. Step 4. Replace '2015/08' with the month you upload your images in step 2. Step 5. Run this script. It's better to firstly do a dry-run (uncomment the print statements in move_link() and comment out wp.editPost line). """ # import library import wordpresslib import re def move_link(match): #print('echo ' + match.group(0)) retval = "https://yuliansu.files.wordpress.com/2015/08/" + match.group(2) + match.group(5) if match.group(4) is not None: retval += "?w=%s" % match.group(4) retval = retval.lower() #print('wget --spider -q %s && echo -n == || echo -n !!' % retval) #print('echo ' + retval) return retval url = 'https://yuliansu.wordpress.com/' user = 'yuliansu' password = 'yuliansu_password' # prepare client object wp = wordpresslib.WordPressClient(url+"xmlrpc.php", user, password) # select blog id wp.selectBlog(0) old_link = re.compile('https://a.colourful.land/wp-content/uploads/([0-9/]*)/([^-"]*)(-([0-9]*)x[0-9]*)?(.png|.jpg|.gif)') for post in wp.getRecentPosts(500): matches = re.findall(old_link, post.description + post.textMore) if (matches): post.description = re.sub(old_link, move_link, post.description) post.textMore = re.sub(old_link, move_link, post.textMore) wp.editPost(post.id, post, True) print "Post: %d ('%s') edited" % (post.id, post.title)
Forum: Plugins
In reply to: [Dynamic Image Resizer] A modified and extended plugin versionJochenT: Thank you. Your new version works on 3.9.2. However I would suggest you publish it as a seperate project, it is too hard to find your excellent work. Samuel Wood already explained he doesn’t wish to see the project updated, since his excellent work is only a proof of concept – the same thing happened with Minix and result is a fork named Linux, history may love to repeat itself. I agree this design better be made into Core, but the beaten road to introducing it to Core, is to publish it as a working plugin and have enough people using it, not to convince lead developers about it, that’s the way of evolution – there will be enough users to push the idea, consider popularity of VPS nowadays.
There is a big difference between design and evolution. A design can attack the problem directly, however, evolution must pass through all phrases while the entity alive and working, including ugly middle-way stages. If in one phase it is not working, it stopped evolving. From my observation, evolution is more efficient than design, because as the product matures, designers are usually forced into maintainence role and become obstacles of changes, and enter re-act mode instead of acting. Hence, working plugin is more efficient than pursuading core changes.