January 4, 2010

WordPress

(Comments)

first I edited the file wp-includes/formatting.php



search for <br> then it will find where it does a string replace of

$content = str_replace('<br>', '<br/>', $content); this is for xhtml to display properly and with the correct syntax. Change it to

$content = str_replace('<br>', '<br clear="none"/>', $content);




Then go into the settings/writing section of your WordPress admin. Check if you are after all allowing XML-RPC (this will affect your ability to publish from programs like Windows Live Writer). If you don’t want it or don’t know what it is un-check the box. This way you can really be sure that no reformatting for XML should occur.


Of course the annoying thing is that you will have to re-edit the formatting.php file if you upgrade your WordPress install.

I am not sure how this is enabled. It may be because of some plugin that I have installed or it may be a feature built into WordPress itself. But whatever this makes life so much easier.

I was creating custom fields for shortened URL to each post (ie: bitlyurl = bit.ly/1234 tinyurl = tinyurl.com/1234 etc.etc.)

How labor intensive to add each one into the custom WP field of each post. I first had to go the the shortener site and create the URL then copy paste it and update the post. Pain in the neck. but I wanted to display the short URL so…

Then I was playing with the code and discovered that when I used this snippet
view the txt here
But It must be linked to one of the like idk 85 plugins I have installed and also I tweaked them all so they are not original anymore.

I was also thinking that it could be linked to the Ping or Trackback features in WP.

Who know what happened but the URLs pour in from all of the shortening services automatically after they are created by anyone. Love it!!!!

BUT and there is almost always a but with new code snippets. It does not seem to work consistently.

It works here http://www.juanitachronowski.com/jdcblog/?p=1835

but not here (on this page) http://www.juanitachronowski.com/jdcblog/?p=2056 at least not at the time of posting this.

I am not sure what the factor is that turns it on.. :-(

If anyone knows what could cause this let me know.  Otherwise I chalk it up to a happy happenstance where it works and not worry too much about it when it doesn’t.

If you try it on your site and it works let me know (comment here I dofollow back) also

I was at the store with my hubby when all of a sudden it came to me. I was having a problem with some CSS on a site I was working on. What could be the problem? I knew it had something to do with my nested DIVs but which one and where?

pguicheteauwpUsing separate files for each part of the site and each part of each page on each site can be confusing sometimes. I customize any applications and websites that I code and this was no exception. I was changing things to spec on the fly and lost track of one stray tag.

I had designed my own theme to match an old design that was completely in ASP. I had to migrate it to WordPress and convert the database to fit into the WPbase MySQL and rewrite all the ASP to PHP. And also make it function the same. That meant hacking about 20 plugins, modifying and creating my own functions and really getting into the deep end of CSS because I was using a multi-column design and did not want to resort to tables within WordPress.

So I am going over each line of code in my head while shopping (What better time to do that?) then about 60 lines of code in I screamed out loud. “OhMyGaad! I put that DIV in the wrong file, I have it in two places!” I could not wait to get home. I had put a div in the main file and in the head by mistake.

I somehow think that my nerdy/geek husband was not too happy with my revelation. Or maybe it was the public outburst? It was a eureka moment what can I say. When inspiration hit – it hits.

Anyway — Fixed. I slept well that night.

Yes, I am geekgrrl and proud of it :-)   I was a nerd before nerds were multi-billionaires.

Now about that website job you need done. give me a call.

May 9, 2009

microblog

(Comments)

When setting up a web server the structure of your directory system is extremely important.

You have to think of the way it will be used. I have my WP on same level as my root so that if I reference an image it does not know where to find it. I did not configure this structure. I suppose there are ways to make it workable but seems like a lot of trouble for no reason to me.

Anyway I fixed my RT links. so instead of the short jack-in.com/?p=138 it will have to read juanitachronowski.com/jdcblog/?p=138 for now anyway. I guess people will have to learn how to spell my name from memory. Juanita Chronowski . but the /jdcblog part hmmmm… Well I am not moving my Wp again. I just got situated (and not yet fully) on the new server.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
  • Advertisements