HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Getting Port Number with Domain Name
Context:
I am trying to develop my Vanilla plugin and using function .$this->Data('Discussion.Url').'
to get the canonical URL of the discussion.
**Problem: **
I am getting default port number 80 with that code. Example: www.domain.com:80/discussion/post-title
Platform:
Shared hosting so LAMP. Vanilla 2.1b
Solution?
There was an error rendering this rich post.
0
Comments
Depends how you want to approach it. You could a) parse
$this-Data('Discussion.Url')
or b) get the data elsewhere and assemble it.a) Use PHP's parse_url() function
$this-Data('Discussion.Url')
and return reassemble it sans port:b) This can be left as an exercise for someone else. ;D
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
wow wow wow. You are genius. Thanks a lot.
There was an error rendering this rich post.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
wow wow wow again. You are awesome
There was an error rendering this rich post.
Maybe I'll get a wow-wow-wow (and lol reactions) plugin. So you can click wow instead of saying it.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
yes words are fickle but the clicks on (awesome) show true sincerity !!
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌