Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

URL problems

dudieboydudieboy New
edited April 2011 in Vanilla 2.0 Help
This discussion is related to the <Embed> Vanilla addon.
Hi, embed Vanilla is working well enough on my site, with a few minor problems I'd like to start working on and need coding help. So when you click on a Discussion Title in the Discussions panel, in normal Vanilla it goes directly to the last post of the thread with a URL similar to this:

http://www.danbirlew.com/vanilla/discussion/50/tv-on-dvd-what-are-you-watchingwish-to-watch-and-hows-it-working-for-yous#Item_33

which is basically the same as the discussion URL with "s#Item_33" added to the end.

However in embed Vanilla, when you are viewing the forum through a WordPress page and click on a Discussion Title in the Discussions panel, it redirects you to a URL as follows:

http://www.danbirlew.com/forums/#/discussion/50/tv-on-dvd-what-are-you-watchingwish-to-watch-and-hows-it-working-for-yous

The differences are that /vanilla/ (the default installation location) has been replaced by /forums/#/ which is the WordPress embedded page followed by a pound sign. Note that the "S" has been added to the end, but the "#Item_33" is missing. This URL redirects the user to a random spot about 1/3rd the way down the last page of the discussion, which is unacceptable.

However, when let the cursor hover over the discussion link, you see the correct URL, which is:

http://www.danbirlew.com/vanilla/discussion/50/tv-on-dvd-what-are-you-watchingwish-to-watch-and-hows-it-working-for-yous#Item_33

So it's obvious that an error is occurring in converting the default URL to the 'Remote URL to Forum'. In my embed Vanilla settings this is set to http://www.danbirlew.com/forums, however I don't check the option to "Force your forum to be viewed through the Remote Url" because I want mobile users to have the option of viewing the forums full screen, rather than embedded into my WordPress page.

In summary, I'd like to alter the code of the embed Vanilla plugin so that the Remote URL redirect doesn't cut the "#Item_33" from the end.

If possible, I'd also like to alter the WordPress Discussions widget so that the URLs link the user to the same location, the last post of the thread, rather than the first page of the discussion. If possible, I'd also like to add the name of the last poster to the Discussions widget, so that it would read something like "TV on DVD- What are you watching/wish to watch and how's it working for you? Last Post by Plopper".

Please let me know any ideas on how/where to begin.

Comments

Sign In or Register to comment.