BlockPress now has permlinks and posts by tag.

in #utopian-io7 years ago

BlockPress-Screenshot_2018-05-07_20-33-49.png

<p dir="auto"><span><a href="https://github.com/blockpress/blockpress.me" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/blockpress/blockpress.me <h1>New Features <h2>Permlink support <p dir="auto">One of the challenges in building a functioning AJAX application is the problem of permanent links. Changing the content displayed on the page is one thing, but if you do not change the url, then refreshing, bookmarking or sharing the current address will only be sharing a link to the original page. <p dir="auto">Often the job of interpreting this permanent address, or <code>permlink, will be left to the back end code, such as PHP, ASP.Net or NodeJS. However, in a purely front end system we also have to handle loading of the right content in the front end code. To this end I decided to implement a querystring containing the page information. <p dir="auto">As content in BlockPress is loaded via optional content modules, the first part of the string names the module, the rest are module dependent parameters. Each module must now implement a function for handling these parameters and loading the right content. <p dir="auto">The content module is also responsible for updating the url with the correct permlink. I have implemented this for the two current modules, <code>steem and <code>static. <p dir="auto">In order to successful allow navigation via the browsers <code>back and <code>forward buttons, I also had to implement a <code>onpopstate event handler that calls the correct content module. This all now works smoothly and seamlessly. <h3>For example see: <ul> <li><a href="https://blockpress.me/?p=static/pitch.html" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Our pitch video for an example of a static page. <li><a href="https://blockpress.me/?p=steem/utopian-io/@antonchanning/3-improvements-to-the-blockpress-steem-profile-page" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Our previous post for an example of a permanent link to steem content. <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmVqtWTQPBKDkH1MccsFGZv888yZRp59WR3jFCS2V2Fzfr/Firefox_Screenshot_2018-05-07T19-33-18.531Z.png" alt="Firefox_Screenshot_2018-05-07T19-33-18.531Z.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmVqtWTQPBKDkH1MccsFGZv888yZRp59WR3jFCS2V2Fzfr/Firefox_Screenshot_2018-05-07T19-33-18.531Z.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmVqtWTQPBKDkH1MccsFGZv888yZRp59WR3jFCS2V2Fzfr/Firefox_Screenshot_2018-05-07T19-33-18.531Z.png 2x" /> <h2>Post listing by tag, without specifying user <p dir="auto">Up until now, BlockPress had only been able to list posts for an individual user. It had been able to filter that users posts by tag, but a listing by tag for all users was missing. I have now added this feature. <p dir="auto">The callback function for displaying the posts is reused, no need to reinvent the wheel, or introduce needless code duplication. Instead a different 'get' function is called if no username is specified. This function calls <code>steem.api.getDiscussionsByCreated instead of <code>steem.api.getDiscussionsByAuthorBeforeDate as used for the authors post listing. <h1>Commits <h2>Loading right content from permlink urls <ul> <li><a href="https://github.com/blockpress/blockpress.me/commit/66b974064e349b7f9cd6908bb3e87d537bbfb32c" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Load from modules permlink function <li><a href="https://github.com/blockpress/blockpress.me/commit/9b778c7e5c2d75ea86e90e8c6d2b9ee846c10672" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Static module permlink function <li><a href="https://github.com/blockpress/blockpress.me/commit/3e2fdaedfc516a2cf63526cd888906710d94f6da" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Steem module permlink function <h2>Updating URL and history with right permlink and history event handler <ul> <li><a href="https://github.com/blockpress/blockpress.me/commit/2d7e2cac459b01f0207f9921bf883e25ebe6e1ed" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Push and pop <li><a href="https://github.com/blockpress/blockpress.me/commit/b07b5e187be3257aaedd182e78fefdd2ee9c8f70" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Static module push state <li><a href="https://github.com/blockpress/blockpress.me/commit/a9f40a7418bed010dc68132636d52e546731480e" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Various Steem module push states <li><a href="https://github.com/blockpress/blockpress.me/commit/95e8dc6b86401ad3de44e2ed57cdf6e3d724776f" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Updates page title on push state <li><a href="https://github.com/blockpress/blockpress.me/commit/cc97ee8172082742dab380c73167351dae5f1369" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Static module now all loads all content from content folder <li><a href="https://github.com/blockpress/blockpress.me/commit/a2cccc32f13d741ad0b377f0d11b547c6f183ae3" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Static module content in content folder part 2 <li><a href="https://github.com/blockpress/blockpress.me/commit/ddd2c4a3374035dc2f0693888185fb64fc752dbb" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Static module content in content folder part 3 <li><a href="https://github.com/blockpress/blockpress.me/commit/a5aaaf9e218c14b11dd4f61e6143e142e219c559" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Don't push state on home page, to keep tidy url <li><a href="https://github.com/blockpress/blockpress.me/commit/3756ea022ef2d1c1c97b7b6252207fbdd5f636e4" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Fixed bug with static content being first page <h2>Post listing without user <ul> <li><a href="https://github.com/blockpress/blockpress.me/commit/e2ae4d55b00d8bbbc074d5044d4ea004bffad1e6" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Display posts by tag only <h1>Follow <p dir="auto"><span>You can now follow the progress of BlockPress.me CMS on various social media, including our new channel on steem chat, and our new <a href="/@blockpress">@blockpress steem account! <ul> <li><a href="https://steemit.chat/channel/blockpress" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Steem Chat BlockPress channel <li><a href="https://www.facebook.com/groups/blockpress/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">BlockPress on FaceBook <li><a href="https://www.reddit.com/r/blockpressCMS/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">BlockPress subreddit
Sort: