WordPress.org

Ready to get started?Download WordPress

Forums

Warcraft News
[resolved] Wowhead Item Links Not Working (4 posts)

  1. Aballyon
    Member
    Posted 3 years ago #

    It appears wowhead might have changed the item links. I have made the following change and it appears to be working fine.

    Find this line of code in warcraft-news.php:

    $link->href = str_replace($base_url ."/wow/". $lang ."/item/", "http://$lang.wowhead.com/item=", $link->href);

    Change it to this:

    $link->href = str_replace($base_url ."/wow/". $lang ."/item/", "http://wowhead.com/item=", $link->href);

    The links will work again!

    I am also going through and making it so the links wowhead and wow directly will open in a new window. That is just a personal preference though.

    http://wordpress.org/extend/plugins/warcraft-news/

  2. Jakob Lenfers
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks!
    Meh... Don't know why wowhead changed this. I fixed it in 0.9.1. While your solution works, it breaks it for languages other than English.

  3. Aballyon
    Member
    Posted 3 years ago #

    Did wowhead only change the links for English? Good to know it won't work for languages other than English. I had not tested it on other languages yet.

  4. Jakob Lenfers
    Member
    Plugin Author

    Posted 3 years ago #

    You could always access the different wowhead languages through subdomains (de.wowhead.com, ru.wowhead.com, en.wowhead.com, ...). Now they've stopped using en.wowhead.com for some reason and you get english only through http://www.wowhead.com.

    So scripts that used www all along did not change, but I used the language code I got from the armory directly as a subdomain.

    I changed that and it should be working for all languages again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic