Support » Plugin: Warcraft News » [Plugin: Warcraft News] Wowhead Item Links Not Working

  • Resolved Aballyon

    (@aballyon)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jakob Lenfers

    (@jakob42)

    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.

    Thread Starter Aballyon

    (@aballyon)

    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.

    Plugin Author Jakob Lenfers

    (@jakob42)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Warcraft News] Wowhead Item Links Not Working’ is closed to new replies.