HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: Ability to show discussion between a certain date?
NM i think i got it I created this function and passed it a date object, and it returned a SQL Result Object public function getDay(object $Date) { $sql = Gdn::sql(); $sql->select('*') ->Distinct() ->from('Discussion') ->where('EventCalendarDate =', $Date->format('Y-m-d')) ->orderBy('EventCalendarDate'); // add permission… -
Re: Ability to show discussion between a certain date?
Yeah basically i want to use the discussion view set by the forum, i just want to filter the dates it shows and show it on my day view of the Events calendar. Thanks for all the code and help guys. Ill dig into this today and see what I can do! EDIT @R_J This looks like exactly what i am looking for thank you! -
Re: Ability to show discussion between a certain date?
@rbrahmson : clever! I would have mimiced the controller logic and reused only the view, but your approach is much more robust, future proof and requires less code. Since @MrCaspan doesn't need a flexible solution as you needed in your plugin, Vanillas "new" filters maybe better suited than hooking into the model: public… -
Re: Ability to show discussion between a certain date?
We were a bit off on the syntax but gave me enough to figure it out you have to specify the get then pass a key => value to it Gdn::request()->setRequestArguments('get', array("filter" => "date")); This worked like a beauty and did not show up in the address bar!! Secondary question to this; Because I am reusing the index… -
Re: Ability to show discussion between a certain date?
Okay so to revive an old thread I have added the following to my plugin public function discussionsController_events_create($sender, $args) { // /discussions/events/2020/04/04?filter=date // Save our passed date arguments $year = intval($args[0]); $month = intval($args[1]); $day = intval($args[2]); // Test it to make sure… -
Re: Ability to show discussion between a certain date?
Wow this is so confusing to me.. LOL Okay so I think I got what i need from the database and I apply it against the Discussion view and I spit all my data out... It looks great one problem... all the links are messed up If i hover over the links for the forum posts it seems that they all are referencing the page i am on… -
Re: Ability to show discussion between a certain date?
Yeah I am reusing the discussion view but in Table format and I want the day view to follow that view option. I think I have it now and I can build this URL for it and pass it to the method/function... I am once done I am going to post the Plugin so that people can pull it apart and tell me what I did wrong LOL Or help…
17 results