Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
PostNum with Link?
leo_mayer
New
Is it possible to not only have the counter, but as well the appropriate link to the quote/contribution?
E.g. 'Post 3 of 14' as link so I could use this link as a reference to the comment. Would be helpful for cross-quoting, e.g. in other forums.
Tagged:
0
Comments
Do you see the date/time beside of the avatar? That's a well hidden direct link to the comment.
As @R_J pointed out, the date is a permalink.
However, I modded PostNum to be a link anyway. See the attached patch for details.
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.
@hgtonight or anyone else - did this mod work for you? I'm getting a blank post URL based on the recommended code.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
didn't try it.
but it looks like a relatively easy debug to see where it fails if at all.
var_dump the $Object and see if it has Url in 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.
it doesn't, that's why i asked the question.
the only way i found to accomplish this is to form the URLs myself. The comment object doesnt have a URL property - and $Object in this context isn't even the Comment, it's the Discussion. Bad use of naming, i know. I should be tarred and feathered.
anyway here is the answer as long as you are using URL rewrites, if not then i dont know how to handle it.
isset($Sender->EventArguments['Comment']) ?
$postURL = "/discussion/comment/". $Sender->EventArguments['Comment']->CommentID . "#Comment_". $Sender->EventArguments['Comment']->CommentID:
$postURL = "p1";
this is brute force method. I don't like it.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Hmmm... I don't really remember writing this mod.
It seems to always link to the discussion, not the comment.
Any reason you are handling the Post Controller?
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.
must have been on a binge night. no recall
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
'cause it's all about the Posts. Have to handle all controllers that are involved in the display of comments.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
BTW - my revised mod is live on my site. If someone can help me form the URLs properly under all conditions, I'll release an update.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
here's a snippet of the way vanilla does 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.
looks basically the same as my approach. good enough. i'll release it later today.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
thats why I was wondering why you said brute force. seemed reasonable to me.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
it felt as i was writing it that there should be something, somewhere in the object model that provides the permalink url to whatever object you want to refer to. like a GDN_URLMONKEY($MySpecialObject) type method.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
gotcha hbf
still wondering what the value of the mod is, i know someone wanted it, but there is a link or already in the date/time.
or the op had something different in mind - that an autoquote is put in that you click on and it put a link in the new comment that says post 3 of 3
because I don't see a whole lot of value to making post a clickable link other then for people who don't realize date/time is a permalink.
It's always curious when the op never comes back to see comments on their post. granted this is many months old.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
value is low. very low. but hgtonight posted an answer so i thought i'd just put it into the plugin as a gesture of human kindness. then i found out it was wrong. so i got curious as to how best to solve this low value problem. so... here we are.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Thanks for catching my error!
Like I said, I don't remember writing this at all.
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.
we've all seen the error in your ways
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
now you have to sit and wonder... "what else?"
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained