31Dec

wp-admin/post-new.php redirects to blog index

Wordpress

After I upgraded the blog to wordpress v 2.9 I noticed something went wrong, both my post-new.php and edit.php pages were redirecting to the blog index with a 302 redirect (HTTP/1.x 302 Moved Temporarily). The first thing I did was to check the htaccess file from the index and from the wp-admin directory but the problem wasn’t coming from there. Next thing I disabled all of my plugins to see if one of the plugins was causing the problem but it wasn’t the case. Finally I thought I should reinstall wordpress because this was most likely a wordpress glitch. So if you find yourself in the same situation here is what you need to do to fix the redirect:

from the admin panel go to Tools> Upgrade > Re-install automatically , next wordpress will re-install the same version automatically. This fixed my problem and I can use the pages now.

Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google Bookmarks
1 comment | read more »
08Jun

New iPhone

News, Trends

New iPhone 2009

Gizmodo recently released an article about the new iPhone. The article had this picture included, which seems to show the new iPhone. Apple’s WWDC 2009 liveblog is just a weekend away so we should expect to see it unveiled there. The new iPhone wont have any extravagant new features like OLED display or back-lit apple logo, like most of you would expect. Most people predict that the new iPhone will have an increase of cpu power and RAM size to better cope with people’s needs. And I think this is really a good strategy from Apple, cause people hate it when their phones are slow and the more and more complex apps that run on these phone demand more power.

There also are some price predictions for the new iPhone. Nothing sure so far, so we’ll just have to wait until they launch it.

Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google Bookmarks
1 comment | read more »
10Nov

Remove Wordpress version tag from header

Wordpress

Since version 2.5 Wordpress inserts the version meta tag <meta name=”generator” content=”WordPress 2.5″ /> automatically without you having the possibility to remove it from the header file. Wordpress now uses <?php wp_head(); ?> a function that if you remove you’re removing more than just the wordpress version. So the solution is to add something to your themes functions.php file.

Place this code: remove_action('wp_head', 'wp_generator'); right before the closing php tag ?> . Now check your source code, the wordpress version is not disclosed any more.

Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google Bookmarks
1 comment | read more »
07Nov

Magento – how to add download links on product page

Magento, xHTML

This is a serious drawback when using magento, i don’t know why they havent added this feature yet because other carts have it. Most of shops have products that ofer user guide or other downloads. It’s nice to be able to find them on the product page.

For the moment there is only a small hack that you can do to be able to display download links on your product page. I learned about it on the magento forums and adjusted the code to fit my theme.

So if you’re using the default magento theme, do the following:

1. create a new folder under media/catalog/product/ named pdf so it should be media/catalog/product/pdf/

2. Upload your pdf document to yourshop/media/catalog/product/pdf so it should be yourshop/media/catalog/product/pdf/pdfdocument.pdf

3. go to your product managing page under admin panel and edit the product. Now in the short description box you must add the following code:

<div class="divider"></div>
<h4>Downloads</h4>
<div class="short-description"><a title="Download ATmega88 dev board User Guide" href="http://www.youritronics.com/shop/media/catalog/product/pdf/atmega88-dev-userguide.pdf" target="_blank">User Guide.pdf (392 Kb)</a></div>

Remember the description box adds <BR> for every new line you create, so place the code immediately after your last character from product description to get a nice alignment. Now your Download section should appear immediately after your short description.

Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google Bookmarks
3 comments | read more »
05Nov

Magento Admin Menu Not Working (js 404 error)

AJAX, Magento, PHP

While i was installing a Magento oscommerce platform I encountered a problem, a new problem i might add, because i never saw it before. I’ve worked before with Magento but never had any issues. This time, after getting it up and running i noticed that my admin menu wasn’t working, the options weren’t dropping down as usual.

You obviously can’t work without a menu so i started googling the issue. The first page i looked into gave some indications but nothing clear, and those guys we’re having the problem on ver 1.0 of Magento which is really old.

After trying and testing various methods i finally got it to work, and here is how i did it:

  • step1: replace app/code/core/Mage/Page/Block/Html/Head.php with this head.php
  • step2: chmod 755 the js/ folder, and folders within.
  • step3: chmod 644 the javascript files inside js/lib/
  • step4: chmod 644 js/index.php
  • step5: there is no step 5 :) your menu is now working
Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google Bookmarks
36 comments | read more »