Jump to content

The Old Man

Clients
  • Posts

    3,958
  • Joined

  • Last visited

  • Days Won

    11

Reputation Activity

  1. Agree
    The Old Man got a reaction from ชัยวัฒน์ จันทร์ทักษ์ in Downloads updates, GraphQL and more   
    Thanks, I thought the same and it didn't like it all!
    Oops, sorry @teraßyte I thought you mean double braces!
    Just tried it but no worky.

  2. Agree
    The Old Man got a reaction from ชัยวัฒน์ จันทร์ทักษ์ in Downloads updates, GraphQL and more   
    Thanks @Daniel F that worked correctly for me inside a Pages PHP block and your explanation helped me understand the documentation a little easier.
    I thought that such blocks in Pages essentially were templates, my second misunderstanding.
    I just quickly tried using the GraphQL template helper in an actual theme template, but it fails to parse, essentially what was happening when I first tried the Pages custom block.
    I added this with the helper syntax to the core > profile > profile template:
    <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsBox--child ipsSpacer_bottom' data-controller='core.front.profile.toggleBlock'> <p>Hello {graphql='{core{me{name,url}}}'}</p> </div> but it displays as:

     
    Can you dumb it down even more, please? 😂 
  3. Agree
    The Old Man got a reaction from ชัยวัฒน์ จันทร์ทักษ์ in Downloads updates, GraphQL and more   
    Hi @Daniel F
    I tried to cobble something basic together inside a custom PHP Pages Block after creating an API OAUTH in IPS4.7.7 (confusing in itself as to which options to select). First I tried the public client option, with no actual login screen, then I tried the private client option that generated a Client Secret as well as the Client ID.
    On the GraphQL documentation page it gives 2 examples, I figured trying the second for internal use in IPS templates would be the one to use, but neither work. All I get are error messages and it won’t save the block.
    $key = "myclientsecret-superlong-key"; $query = "{core{queries{me}}}"; $result = \IPS\Http\Url::external( rtrim( \IPS\Settings::i()->base_url, \'/\' ) . \'/api/graphql/index.php\' )->request()->login( $key, "" )->post( array(\'query\' => $query) )->decodeJson(); print_r($result); Results in:
    A configuration or server error has occurred EX0 Something went wrong. Please try again. ParseError: syntax error, unexpected token "\", expecting ")" (0) #0 /home/public_html/community/system/Helpers/Form/FormAbstract.php(382): IPS\cms\Blocks\_Block->IPS\cms\Blocks\{closure}('\r\n$key = "82fe2...') #1 /home/public_html/community/system/Helpers/Form/TextArea.php(119): IPS\Helpers\Form\_FormAbstract->validate() #2 /home//public_html/community/system/Helpers/Form/FormAbstract.php(170): IPS\Helpers\Form\_TextArea->validate() #3 /home/public_html/community/system/Helpers/Form/FormAbstract.php(147): IPS\Helpers\Form\_FormAbstract->setValue(true) #4 /home/public_html/community/system/Helpers/Form/TextArea.php(66): IPS\Helpers\Form\_FormAbstract->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #5 /home/public_html/community/system/Helpers/Form/Codemirror.php(72): IPS\Helpers\Form\_TextArea->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #6 /home/public_html/community/applications/cms/sources/Blocks/Block.php(678): IPS\Helpers\Form\_Codemirror->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #7 /home/public_html/community/system/Node/Controller.php(496): IPS\cms\Blocks\_Block->form(Object(IPS\Helpers\Form)) #8 /home/public_html/community/system/Node/Controller.php(395): IPS\Node\_Controller->_addEditForm(Object(IPS\cms\Blocks\Block)) #9 /home/public_html/community/system/Dispatcher/Controller.php(107): IPS\Node\_Controller->form() #10 /home/public_html/community/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #11 /home/public_html/community/applications/cms/modules/admin/pages/blocks.php(44): IPS\Node\_Controller->execute() #12 /home/public_html/community/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\admin\pages\_blocks->execute() #13 /home/public_html/community/admin/index.php(13): IPS\_Dispatcher->run() #14 {main} Also tried 
    {graphql='{core{me{name,email,url}}}'} but that doesn’t include the Client secret?
     
    Should we be able to use that query in 4.7.7 or do we need to wait for 4.7.8?
    Thank you.
  4. Agree
    The Old Man got a reaction from ชัยวัฒน์ จันทร์ทักษ์ in Downloads updates, GraphQL and more   
    Very nice. Downloads and Commerce layouts are so 2015! Adding grid to downloads is a great idea and the recent (long since requested) improvements to Google Fonts a welcome improvement.
    I’m hoping to see if GraphQL can make life simpler with moving Blog entries and their comments, tags and ratings into a Pages database. A tutorial on something like that or moving related content items would be handy.
    Seems fine now! 🙂
    The pages in the guide are all blank though.
  5. Like
    The Old Man got a reaction from SeNioR- in Downloads updates, GraphQL and more   
    Thanks @Daniel F that worked correctly for me inside a Pages PHP block and your explanation helped me understand the documentation a little easier.
    I thought that such blocks in Pages essentially were templates, my second misunderstanding.
    I just quickly tried using the GraphQL template helper in an actual theme template, but it fails to parse, essentially what was happening when I first tried the Pages custom block.
    I added this with the helper syntax to the core > profile > profile template:
    <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsBox--child ipsSpacer_bottom' data-controller='core.front.profile.toggleBlock'> <p>Hello {graphql='{core{me{name,url}}}'}</p> </div> but it displays as:

     
    Can you dumb it down even more, please? 😂 
  6. Like
    The Old Man got a reaction from SeNioR- in Downloads updates, GraphQL and more   
    Thanks, I thought the same and it didn't like it all!
    Oops, sorry @teraßyte I thought you mean double braces!
    Just tried it but no worky.

  7. Like
    The Old Man got a reaction from SeNioR- in Downloads updates, GraphQL and more   
    Hi @Daniel F
    I tried to cobble something basic together inside a custom PHP Pages Block after creating an API OAUTH in IPS4.7.7 (confusing in itself as to which options to select). First I tried the public client option, with no actual login screen, then I tried the private client option that generated a Client Secret as well as the Client ID.
    On the GraphQL documentation page it gives 2 examples, I figured trying the second for internal use in IPS templates would be the one to use, but neither work. All I get are error messages and it won’t save the block.
    $key = "myclientsecret-superlong-key"; $query = "{core{queries{me}}}"; $result = \IPS\Http\Url::external( rtrim( \IPS\Settings::i()->base_url, \'/\' ) . \'/api/graphql/index.php\' )->request()->login( $key, "" )->post( array(\'query\' => $query) )->decodeJson(); print_r($result); Results in:
    A configuration or server error has occurred EX0 Something went wrong. Please try again. ParseError: syntax error, unexpected token "\", expecting ")" (0) #0 /home/public_html/community/system/Helpers/Form/FormAbstract.php(382): IPS\cms\Blocks\_Block->IPS\cms\Blocks\{closure}('\r\n$key = "82fe2...') #1 /home/public_html/community/system/Helpers/Form/TextArea.php(119): IPS\Helpers\Form\_FormAbstract->validate() #2 /home//public_html/community/system/Helpers/Form/FormAbstract.php(170): IPS\Helpers\Form\_TextArea->validate() #3 /home/public_html/community/system/Helpers/Form/FormAbstract.php(147): IPS\Helpers\Form\_FormAbstract->setValue(true) #4 /home/public_html/community/system/Helpers/Form/TextArea.php(66): IPS\Helpers\Form\_FormAbstract->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #5 /home/public_html/community/system/Helpers/Form/Codemirror.php(72): IPS\Helpers\Form\_TextArea->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #6 /home/public_html/community/applications/cms/sources/Blocks/Block.php(678): IPS\Helpers\Form\_Codemirror->__construct('block_content', '', false, Array, Object(Closure), NULL, NULL, 'block_content') #7 /home/public_html/community/system/Node/Controller.php(496): IPS\cms\Blocks\_Block->form(Object(IPS\Helpers\Form)) #8 /home/public_html/community/system/Node/Controller.php(395): IPS\Node\_Controller->_addEditForm(Object(IPS\cms\Blocks\Block)) #9 /home/public_html/community/system/Dispatcher/Controller.php(107): IPS\Node\_Controller->form() #10 /home/public_html/community/system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #11 /home/public_html/community/applications/cms/modules/admin/pages/blocks.php(44): IPS\Node\_Controller->execute() #12 /home/public_html/community/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\admin\pages\_blocks->execute() #13 /home/public_html/community/admin/index.php(13): IPS\_Dispatcher->run() #14 {main} Also tried 
    {graphql='{core{me{name,email,url}}}'} but that doesn’t include the Client secret?
     
    Should we be able to use that query in 4.7.7 or do we need to wait for 4.7.8?
    Thank you.
  8. Thanks
    The Old Man reacted to teraßyte in Downloads updates, GraphQL and more   
    Template output plugins require double quotes. Try this:
    {graphql="{core{me{name,url}}}"}  
  9. Thanks
    The Old Man reacted to Daniel F in Introducing GraphQL for Invision Community   
    Support for pages will be added in the March or April release just like the downloads app! 
  10. Thanks
    The Old Man reacted to Daniel F in Downloads updates, GraphQL and more   
    Since you're already in the framework, you don't need to use the external endpoint!
    Inside templates you can use the graphql template helper, and inside blocks or controllers, you'll have to use the \IPS\Api\GraphQL controller!
    So inside a PHP block you want to use something like:
    $query = '{core{me{name,url}}}'; $response = \IPS\Api\GraphQL::execute( $query, [] ); echo "Hi: <a href='".  $response['data']['core']['me']['url'] . " '>" . $response[ 'data' ][ 'core' ][ 'me' ][ 'name' ].'</a>';  
  11. Thanks
    The Old Man reacted to Daniel F in Downloads updates, GraphQL and more   
    And here's an example with a variable, where I'm fetching the topic's author, read time,read state, author and the posts for the topic with ID 1
    $queryTopic = <<<QUERY query TopicViewQuery(\$topicID: ID!) { forums { topic(id: \$topicID) { id isUnread timeLastRead postCount(includeHidden: true) author { id name photo } posts { id timestamp author { id photo name } content { original } } } } } QUERY; $topicResponse = \IPS\Api\GraphQL::execute( $queryTopic, ['topicID'=> 1] );  
  12. Agree
    The Old Man reacted to Adriano Faria in Downloads updates, GraphQL and more   
    Suggestion: change the following message for the link to delete the pending version.

  13. Thanks
    The Old Man reacted to Daniel F in Downloads updates, GraphQL and more   
    The GraphQL documentation is working again!
  14. Like
    The Old Man reacted to Adriano Faria in UI Polish in Invision Community 4.7.8   
    Hello,
    A couple of suggestions:
    Couldn't these buttons be the same size? It gets pretty weird like that. It gets even weirder when there are only 2 buttons.
    -----------
    Another visual detail that could be better is the grid view of the Downloads categories:

     
    No user photo. No date (submitted/updated).
    Could be something like this but better:

  15. Thanks
    The Old Man reacted to Daniel F in Introducing GraphQL for Invision Community   
    We'll publish a follow-up article in the dev blog soon, with more technical insights.
  16. Like
    The Old Man reacted to Daniel F in Introducing GraphQL for Invision Community   
    It's already automated.
    Thanks, and I agree. It's on my TODO list for the next iteration.
  17. Like
    The Old Man reacted to Rikki in Introducing GraphQL for Invision Community   
    Woohoo 🎉 It's nice to see this become public after a long time being an internal tool.
    Given one of the big selling points is the type system, it would make sense for you to include the type of each field in the documentation. Personally I wouldn't even bother hand-rolling documentation - let a tool parse the schema and just make the output available to developers (and include docs on using Graphiql GUI tool too). The docs you've put together are losing the inherent relationships that GraphQL has; I think it'd be frustrating to use them as a reference (for example, here's the query to get a club, but it doesn't tell you what fields are returned, what types they are, if they have sub-fields etc.)
    When I worked on customer sites at IPS I spent a lot of effort trying to query stuff in Pages blocks using raw PHP blocks and the IPS framework. Being able to write a GraphQL query to fetch everything I needed would have been great.
  18. Like
    The Old Man got a reaction from sobrenome in What's New in Gallery?   
    Excellent update! I'm excited about this, and I think given the 100's of gallery improvement posts and topics over the years, you've done a great job in identifying where to start and what to prioritise.
    Thank you for sorting the obviously long overdue UI issues, especially the navigation and Lightbox. Hopefully it won't be as intrusive autoloading. Great to see it less crowded. I was intending to add integration with AWS Rekognition to create image tags, so that's a nice touch.
    Gallery has always been a good app, better than most in terms of functionality but it needed these modern updates every is now so used from the best WP galleries. Less JS is hugely welcome, even if less reliance on JQuery for vanilla JS, and finally native lazyloading; please add that throughout the suite immediately!
    Looking forward to seeing more of the category, album and image layouts. Will there be a choice of layouts in terms of masonry, grid, filterable etc?
    Any plans for Gallery integration with Commerce?
    A great start to modernising this app. 😋
  19. Like
    The Old Man reacted to beats23 in What's New in Gallery?   
    Thanks for adding a modern looking EXIF display to the gallery app. It would be nice if we had the option to add other photo info, like lens specs to be displayed. 

  20. Like
    The Old Man reacted to Matt in What's New in Gallery?   
    We have some thoughts on this, but nothing in the roadmap at this time. Generally speaking, we want Commerce to be able to handle monetisation of your content across the suite.
    Not at this time, but happy to hear your thoughts? Do you mean pre-made templates you can toggle between?
  21. Like
    The Old Man reacted to Olivia Clark in What's New in Gallery?   
    Excited to deliver these changes in our February release. 🎉
  22. Like
    The Old Man got a reaction from AlexJ in What's New in Gallery?   
    Excellent update! I'm excited about this, and I think given the 100's of gallery improvement posts and topics over the years, you've done a great job in identifying where to start and what to prioritise.
    Thank you for sorting the obviously long overdue UI issues, especially the navigation and Lightbox. Hopefully it won't be as intrusive autoloading. Great to see it less crowded. I was intending to add integration with AWS Rekognition to create image tags, so that's a nice touch.
    Gallery has always been a good app, better than most in terms of functionality but it needed these modern updates every is now so used from the best WP galleries. Less JS is hugely welcome, even if less reliance on JQuery for vanilla JS, and finally native lazyloading; please add that throughout the suite immediately!
    Looking forward to seeing more of the category, album and image layouts. Will there be a choice of layouts in terms of masonry, grid, filterable etc?
    Any plans for Gallery integration with Commerce?
    A great start to modernising this app. 😋
  23. Like
    The Old Man got a reaction from Matt in What's New in Gallery?   
    Excellent update! I'm excited about this, and I think given the 100's of gallery improvement posts and topics over the years, you've done a great job in identifying where to start and what to prioritise.
    Thank you for sorting the obviously long overdue UI issues, especially the navigation and Lightbox. Hopefully it won't be as intrusive autoloading. Great to see it less crowded. I was intending to add integration with AWS Rekognition to create image tags, so that's a nice touch.
    Gallery has always been a good app, better than most in terms of functionality but it needed these modern updates every is now so used from the best WP galleries. Less JS is hugely welcome, even if less reliance on JQuery for vanilla JS, and finally native lazyloading; please add that throughout the suite immediately!
    Looking forward to seeing more of the category, album and image layouts. Will there be a choice of layouts in terms of masonry, grid, filterable etc?
    Any plans for Gallery integration with Commerce?
    A great start to modernising this app. 😋
  24. Like
    The Old Man got a reaction from Andy Millne in What's New in Gallery?   
    Excellent update! I'm excited about this, and I think given the 100's of gallery improvement posts and topics over the years, you've done a great job in identifying where to start and what to prioritise.
    Thank you for sorting the obviously long overdue UI issues, especially the navigation and Lightbox. Hopefully it won't be as intrusive autoloading. Great to see it less crowded. I was intending to add integration with AWS Rekognition to create image tags, so that's a nice touch.
    Gallery has always been a good app, better than most in terms of functionality but it needed these modern updates every is now so used from the best WP galleries. Less JS is hugely welcome, even if less reliance on JQuery for vanilla JS, and finally native lazyloading; please add that throughout the suite immediately!
    Looking forward to seeing more of the category, album and image layouts. Will there be a choice of layouts in terms of masonry, grid, filterable etc?
    Any plans for Gallery integration with Commerce?
    A great start to modernising this app. 😋
  25. Like
    The Old Man got a reaction from Daniel F in What's New in Gallery?   
    Excellent update! I'm excited about this, and I think given the 100's of gallery improvement posts and topics over the years, you've done a great job in identifying where to start and what to prioritise.
    Thank you for sorting the obviously long overdue UI issues, especially the navigation and Lightbox. Hopefully it won't be as intrusive autoloading. Great to see it less crowded. I was intending to add integration with AWS Rekognition to create image tags, so that's a nice touch.
    Gallery has always been a good app, better than most in terms of functionality but it needed these modern updates every is now so used from the best WP galleries. Less JS is hugely welcome, even if less reliance on JQuery for vanilla JS, and finally native lazyloading; please add that throughout the suite immediately!
    Looking forward to seeing more of the category, album and image layouts. Will there be a choice of layouts in terms of masonry, grid, filterable etc?
    Any plans for Gallery integration with Commerce?
    A great start to modernising this app. 😋
×
×
  • Create New...