rbeer / nodebb-plugin-smoothshorts

Seamless short URLs for topic and post links in NodeBB.
MIT License
5 stars 2 forks source link

How to incorporate into Lavender theme #11

Open GitPuffy opened 8 years ago

GitPuffy commented 8 years ago

I use the Lavender theme and I am able to get the smoothshort link when I copy the topic directly from within the category that it resides. What do I need to add in the Lavender theme to add your link copy ability to other parts of the theme?

Thank you. #

rbeer commented 8 years ago

@GitPuffy Bug with missing hashed links on the home page is fixed.

In general: It pretty much doesn't matter where you put the link. The plugin looks for or Elements. Where aPostUrl is taken from every entry in ajaxify.data.posts and aTopicUrl from entries in ajaxify.data.topics or ajaxify.data.categories[*].posts[0].topic.

GitPuffy commented 8 years ago

You are so close on this! I have tested your updates to master and found another issue with Lavender.

I have categories such as:

When I am actually in the category TopA and see the teasers for the most recent posts for NestedUnderA_1 and NestedUnderA_2 if I right-click/copy link from there I do not get a smoothshort link for the post.

I don't know if this is workable by your software but passing along the anomaly.

Thank you.

rbeer commented 8 years ago

Ouch! I actually never tested nested categories. Thanks! :+1:

Of course it's possible! Everything is possible in programming - only matter is time. ;D I have yet to get the forum itself to show me multiple sub categories, though. :/

Will go over it, tomorrow. :)

GitPuffy commented 8 years ago

If you want to see my production and test sites I will share the urls with you.

rbeer commented 8 years ago

@GitPuffy

Sure, seeing how the code behaves in another setup always helps. :+1:

0.3.2 should fix the teasers everywhere.

P.S. Did you get my email; around friday?

GitPuffy commented 8 years ago

Oh no! Things have gone the wrong way now. :smile:

With 0.3.2 I can no longer get a short link from within a subcategory (this used to work.) Also, at least in Lavender your new subcategory work/changes do not work from a parent category.

I have 0.3.2 running on my DEV forum. I emailed you the URLs if you want to check them personally.

Thank you.

rbeer commented 8 years ago

Looks like the same problem as with #15