Easier links to resources or permalinks

Acid Bubbles

Invaluable member
Developer
Featured Contributor
Messages
1,392
Reactions
5,674
Points
173
Website
github.com
Twitter
acidbubblesanon
Patreon
acidbubbles
It would be nice to reference resources directly. For example, if I want to reference Timeline right now I have to link to this, which will break later: https://hub.virtamate.com/dev/index.php?resources/timeline.94/

I'd like instead to be able to do something like this:

Code:
[VAMRESOURCE]AcidBubbles.Timeline[/VAMRESOURCE]

Or if it's easier include the resouce ID. Even better would be to have .var references auto-parsed (like it's happening already for embeddable links) but that's just bonus.

The alternative is a permalink, e.g. https://hub.virtamate.com?type=resource&author=AcidBubbles&name=Timeline with an option to generate it on the resource page.

Anyway those are all options to solve the same issue, reference resources easily and in a way that won't break if routing changes.
 
I understand that this is the resource ID, but the /dev will go away and links will break. Eventually you might want to add routing and links will break (e.g. hub.virtamate.com/resources/foo.94/). Since links to resources will be posted everywhere (discord, reddit, patreon, etc.) I'm wondering if you want to rely on the /index.php base route "forever".

Nothing's broken, it's just future proofing :)
 
Did you look at implementing url rewriting? While it's not _that_ important, it should be fairly easy to enable (Apache's RewriteEngine rules are fairly straightforward) and would make much nicer urls :) This would also eventually allow you to handle them using a preprocessor if for _any_ reason the way to access resources have to change.

Code:
Before:
https://hub.virtamate.com/index.php?threads/easier-links-to-resources-or-permalinks.211/#post-558
After:
https://hub.virtamate.com/threads/easier-links-to-resources-or-permalinks.211/#post-558
 
I was thinking when I remove dev I'll have a rule that rewrites dev to new path so any links created to date using dev will still work. But yeah I see how it looks cleaner without index.php? in there. There are a lot of routes in XenForo and new ones can be added, so I'm not sure I want to maintain all those rewrite rules.
 
Seriously I consider myself a pretty productive person, but I hold you and what you're doing in very high esteem. Most people don't realize what's happening under the hood, but I peeked and it's damn impressive. So like I said before, no pressure from me! (just friendly reminders once in a while as long as you still consider it - if you think it's helpful)
 
@Acid Bubbles Thank you! Coming from you that means a lot! Yeah there is some complex shit under the hood of VaM, much of it too complex, and I have only myself to blame! I plan to remedy a lot of that in 2.X, as you are probably getting tired of hearing me say. :)
 
OK - friendly URLs are on. In addition, I have gone ahead and made 'dev' redirect to top-level. Any existing links you used should still work, but will redirect to top now. Hub is still not externally accessible from https://hub.virtamate.com since that is how I want it for now until public launch. :)
 
Back
Top Bottom