Jump to content

Roboko

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Roboko's Achievements

  1. Yesterday on my Invision Community installation I went about renaming 'Clubs' on my installation to 'Activities'. I changed the friendly URL and used the Quick Translating tool to change all the text to reflect the change. This morning I noticed that something about me doing that upset the REST API. EG. GET https://mywebsite.com/api/core/members/3/notifications?key=######################&page=1 Brings back a 500 Internal Error { "errorCode": "EX0", "errorMessage": "UNKNOWN_ERROR" } From the System Logs, I see the following UnderflowException::0 lang_not_exists__core_pfield_6 BACKTRACE #0 /var/www/html/efs-mount-point/system/Member/Club/Club.php(1800): IPS\_Lang->get() #1 /var/www/html/efs-mount-point/system/Notification/Inline.php(288): IPS\Member\_Club->apiOutput() #2 /var/www/html/efs-mount-point/system/Api/PaginatedResponse.php(110): IPS\Notification\_Inline->apiOutput() #3 /var/www/html/efs-mount-point/system/Dispatcher/Api.php(335): IPS\Api\_PaginatedResponse->getOutput() #4 /var/www/html/efs-mount-point/api/index.php(11): IPS\Dispatcher\_Api->run() #5 {main} LOADED HOOKS applications/groupmention/hooks/groupmentionContentContent.php I wonder what is going on there?
  2. I have tried using the same format as what is returned by IPS in results, eg /api/core/search?sortby=newest&key=################################&type=forums_topic&start_after=2022-01-01T18:52:03Z Obviously with the date being in the future, this should yield no results, but it yields results. Weirdly, passing a nonsense parameter for start_after like sdkfljhgaskjlhf actually does yield no results which makes me question my sanity
  3. I am trying to use the /core/search Endpoint and want to search for things starting after a certain date. To do this, I think I should be using the start_after parameter. But the type of data passed in the documentation is just documented as string which is not very helpful at all. What format is this expecting?
  4. Is this just a change for this specific endpoint? It would be nice to filter other things down too. For example, getting Topics or Events using an API Key brings back stuff most people should not be able to see, it would be nice to be able to pass a member id for these too. I tried to figure out how to impersonate a user with oAuth to do just this and never figured it out. I am sure if I had more hours in the day I could, but it's not exactly an easy task for someone like me.
  5. In my community, I extend the forum by pushing notifications into the game that the community is from. A problem I have is that some areas of the community, a member should really get notified when new content is added. This applies to some custom pages, a particular forum section, clubs the user has joined including their calendar events and also important items posted to the news blog. I think having an option that anybody who has permission to view the content is automatically following it would help in this scenario, as it would make my forum a much more effective means of communicating information and reaching the right people where otherwise content might be missed because the user was not notified of its existence.
  6. I own a license for IPS and have it installed on a Production Server. I wanted to try my hand at some plugin development, so I want to install a copy of IPS locally in development mode. So I installed XAMPP on my computer and put in a copy of IPS, added the development tools files and added my constants.php defining IN_DEV true. The installer requests my license key, which I enter, but then tells me an installation is already activated. I think it's a reasonable expectation that I should not need to purchase another license just to do some plugin development - Is there something I am missing here?
  7. I want to bring back the latest Events and Topics, but only the ones that a given user is Authorized to see. For both of these endpoints, the only way to do this is to use an oAuth access token. I don't actually have a third party service that I want to integrate with, the script simply needs to run on my server. I want to get a token to impersonate the user, so I can get this information back. What's the easiest way to generate one of these tokens?
  8. @Sonya* I installed that addon on my site. Pages was already installed, but somehow it totally broke my front-end which is largely default. The page loads with no CSS and is therefor not usable, a bit of a disaster. Going to have to roll back my site somehow. Any ideas what went wrong? I removed the plugin, went through and deleted everything beginning FX from templates, database, page, and then went to System > Get Support > Clear System Cache and that got my site back, in case it happens to someone else in the future...
  9. Funny, I had searched for something like this before, I searched for 'wiki', 'knowledgebase' but this plugin didn't come up. I will try it. Thanks
  10. @Meddysong I didn't quite figure out how that ips.controller.... stuff works, could not find what it is supposed to be hooking into or where. Documentation on this somewhere? I got creative and came up with my own solution though, in case anyone else wants it. First here's what it looks like 🙂 It shows up on the top right of the page. What I did: Created a new JS File Admin CP > Pages > Templates > JS > New JavaScript File kb-nav (function($){ $('article').each(function(index) { let article = $(this); let nav = $('<ul class="kb-nav"></ul>'); $(this).find('h2,h3').each(function(index) { let anchor = "<a class='kb-anchor' name='" + index + "'></a>"; $(this).before(anchor); nav.append('<li><a href="#' + index + '">' + $(this).text() + '</a></li>'); }); article.prepend(nav); }); }(jQuery)); Explanation: I use jQuery to loop through all <article> elements on the page, and inside each one, I look for <h2> and <h3> tags. For each tag, I add an <a> anchor tag which can be used as a jump point on the page. I also add it to an unordered list <ul> which I prepend to the top of the article. Created some CSS to style it Admin CP > Pages > Templates > CSS > New CSS File kb-css ul.kb-nav { background: #f5f5f5; float: right; width: 20em; padding: 2em; font-size: small; } ul.kb-nav::before { content: "Jump to"; font-size: small; font-weight: bold; } Included my JS/CSS in my Page Pages > Pages > Edit my KB Articles Page > Page Includes > Checked my JS and CSS files and clicked Save 🙂 Things I didn't do that would be nice improvements, maybe another day Indent h3 items in the list Get the article content to wrap rather than appear under Prettier layout/bullet points Maybe give the anchor tags names rather than use numbers
  11. Interesting. I take it the Javascript is added to the Templates system somehow. I'll have to have a mess around
  12. I was hoping to set up a sort of Knowledge base using the Pages plugin, each page has the potential to contain a lot of information. What I was hoping is to have some way that a table of contents is automatically displayed at the top of the page that people can use to jump to the relevant section. Something like this possible? How would you go about doing it?
  13. When you click on the date on someones status update, you get taken to a page dedicated to that one status update. It is useful sometimes to share these links to point people at specific information. Here's an example of a Single Status Update Page: https://kokoro.academy/profile/3-extruderagu/?status=27&type=status Since the page is dedicated to a single status update, I see no reason why the status update could not start expanded. It is after all the main focus of the page and it would be one less click for the user. Some of my users did not even spot the read more button. I just think it would be a nice improvement if the statuses start expanded on these pages.
  14. I have made a PHP Script on my invision installation to bring back the newest events using the REST API and display them to the user. The trouble is that the API brings back all events, including events that are not relevant to a given user. I know the user id prior to making my request. My installation does not currently use oAuth. I wonder if there is some way I could query the database rather than use the REST API to avoid having to set up oAuth as that appears to be quite involved. Failing that, is there a barebones way I could let a php script impersonate a user using oAuth?
×
×
  • Create New...