monocultured
Forum Replies Created
-
Forum: Installing WordPress
In reply to: WP on Roxen?Company is buying a new windows server, so money solved the problem.
Forum: Fixing WordPress
In reply to: Paragraph Breaks, Thumbnails fail on 2.3.2I’ve been struggling with similar thumbnail problems for a week, and this is the first mention MAMP as a culprit that I’ve come across. Sure enough, no problems using thumbnails or a plugin such as Vivtiger on my bluehost account.
Thanks forresto.
Forum: Plugins
In reply to: Search and replace words with codeAh, looking at php.net/str_replace i could use an array with different words to look for and their replacement. Barring interfacing with an external text-file db, would this be the most convenient way of doing this?
Forum: Plugins
In reply to: Search and replace words with codeThanks a lot srikat, I appreciate the links.
The alinks plugin code is too dense for me to understand and apply on a solution of my own, but the Youtube video send me on the right track.
Here’s what I’ve ended up with (a function that replaces the word “stil” with some divs and paragraphs):
<?php /* Plugin Name: Replace word */ function replace ($text) { $text = str_replace('stil', '<div class="definition_word"><p class="word">stil </div><div class="definition"><p class="ord">stil: En ben?mning p? vad du ?n gillar, och dessutom en apelsin. </div>', $text); return $text; } add_filter('the_content', 'replace'); ?>
It gives me a DIV that CSS positions absolute to the right, and it looks like I might get this to work.
Two things that I don’t understand though:
1) The wordlist contains some sixty words with definitions, and although I could, using this method, create one plugin for each definition I’d rather not; in other words, how do I add more than one word for the plugin to search for?
2) What would be the best way of making sure that the plugin only replaces the first occurance of a word on any given page, and not the subsequent ones?
I know that what I’ve come up with isn’t elegant, but I’m more of a brute force type of person, and it can very well be ugly as long as it works.
Any help would be appreciated.
Forum: Fixing WordPress
In reply to: 2.0.7 -> 2.3 DB woesThanks for the suggestion. Movin domain and will install old and update to new once the domain propagates.
Cheers
Forum: Fixing WordPress
In reply to: 2.0.7 -> 2.3 DB woesHum. That would work I guess, didn’t think of it and wanted it all upgraded beforehand.
Another possible issue is that the MySql at my new host prefixes all databases and users with my username at host. So if my old database is named “wpblog”, the new one would be “username_wpblog”. Will this be an issue and which tables would have to be updated with the new DB/user in that case?