Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Thursday, 4 January 2024

Easiest star-rating code for PHP

I have added a how-to to make a simple and easy star-rating for whatever you would like to add a rating-possibility to...
You need a MySQL database, or some other data source, jQuery and PHP for this example.
Rating

Tuesday, 3 May 2022

The Blogspot.stack 1.3.8 for Stacks with RapidWeaver



Version 1.3.8 of the Blogspot.stack was released on 3 May 2022

If you purchased this stack, you can download the latest version via your Paddle account.
If not, you can read more about it here .

Changes, additions and fixes:

  • Fixed internal date formatting, and some other issues, for PHP 8.1 and higher.

  • IMPORTANT after updating to v1.3.8 :

    Due to a caching mechanism in RapidWeaver, you have to reselect the date formats in the stack's settings, otherwise one will see %-signs in the dates and times of your posts. Simply select another date format and then reselect the original date format. The same must be done for the time, too, even when initially no time was selected.

    After having done that, republish the page.

    I'm sorry you have to do this, but this change had to be done to prevent showing PHP-deprecation messages to your visitors.

    Tuesday, 8 March 2022

    The Blogspot.stack 1.3.7 for Stacks with RapidWeaver



    Version 1.3.7 of the Blogspot.stack was released on 8 March 2022

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Fixed URL encoding issues for PHP 6 and earlier.

    Wednesday, 23 February 2022

    The Blogspot.stack 1.3.6 for Stacks with RapidWeaver



    Version 1.3.6 of the Blogspot.stack was released on 23 February 2022

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Fixed URL encoding issues.

    Wednesday, 15 September 2021

    The Blogspot.stack 1.3.3 for Stacks with RapidWeaver



    Version 1.3.3 of the Blogspot.stack was released on 14 Sep 2021

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Removed an in PHP 7.3 deprecated parameter. Not to worry, the code still works on older PHP-versions.

    Thursday, 17 June 2021

    The Blogspot.stack 1.3.2 for Stacks with RapidWeaver



    Version 1.3.2 of the Blogspot.stack was released on 16 Jun 2021

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Removed an error that occurred before building the categories-list, when you have no categories.

    Tuesday, 24 March 2020

    Oracle Instant Client + oci8 for PHP and Apache on macOS Mojave #oracle #oci8 #php #macos


    I was totally new to using Oracle Instant Client on macOS Mojave, so I had to spend days to figure out and try out on how to get it installed (easy) and how to get the oci8 shared library installed (the hard and most time-consuming part) for use with PHP at both the CLI and in Apache. I have been on many, many websites and read many, many instructions, and I want to thank everyone who put so much effort in clarifying something that actually should be very simple nowadays. After having read and tried so many tips and tricks, I ended up summarizing what worked for me, which I wrote down on Oracle Instant Client + OCI8 on Macos Mojave for PHP .

    Friday, 20 March 2020

    The Blogspot Stack 1.3.0 for Stacks with RapidWeaver



    Version 1.3.0 of the Blogspot.stack was released on 20 Mar 2020

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Minimum number of posts was limited to 5. This has been changed to 1.

    Wednesday, 5 February 2020

    The Blogspot Stack 1.2.9 for Stacks with RapidWeaver



    Version 1.2.9 of the Blogspot.stack was released on 05 Feb 2020

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Sorting of categories case-insensitive did not work with PHP7. This has been fixed.
    • A new feature has been implemented to speed up the loading of Archive-links. Read below or see 'Smart Archives' tab next to the 'Version History' tab.

    Smart Archives

    Smart Archives is a feature to speed up loading of your blog. Its goal is to store archive links locally in a file, and with future requests of your webpage, read that file instead of querying Google again. The file is updated once a day, so one of your website visitors may experience slower loading times, but only when you have more than 500 posts in your archives.

    There are some important settings on the server to get this to work.

    The Smart Archives feature assumes a subfolder 'files', which normally is created when publishing a Stacks-page:



    This folder must be writable by Apache (the webserver).

    If you use Panic's Transmit , then you can see if that is the case.
    In the following examples, I will show you how that looks and how you can change it:

    If Apache is mentioned as 'owner', the folder is writable and you do not have to change anything.

    When Apache is mentioned as 'group', you have to click the empty circle for 'group' only, leaving the 'world'-circle empty, and click 'Apply' (do not click 'Apply to Enclosed'):


    In my case, 'files' is not writable by Apache, because Apache is not mentioned as 'owner' or 'group', and 'world' may not write:


    Click the empty circles under 'Write' to make the folder writable by 'group' and 'world' (i.e. any user), and click 'Apply' (do not click 'Apply to Enclosed'):


    The Blogspot.stack checks if the subfolder 'files' is writable or not. If not, it will function normally as before, and pull the archives from Google on each webpage request.

    Friday, 29 November 2019

    The Blogspot Stack 1.2.8 for Stacks with RapidWeaver



    Version 1.2.8 of the Blogspot.stack was released on 28 Nov 2019

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Google reduced the number of posts returned at a time to 150. Therefore some internals would jump to the wrong set of posts and so skip some posts that would then not be visible in the Archives-list.
    • An error with an unused variable has been fixed.

    Friday, 5 April 2019

    The Blogspot Stack 1.2.7 for Stacks with RapidWeaver



    Version 1.2.7 of the Blogspot.stack was released on 05 April 2019

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • The use of the jump-break or 'Main page as summary' can break formatting of a post where DIV, SPAN, P and or PRE tags are used, because the closing tags would be missing. The Blogspot stack now tries calculates which closing tags are missing from DIV, SPAN, P and/or PRE tags, and adds them when needed. This ensures a correct display of your posts. But ... you should really limit the use of these tags in your posts, because even this smart solution might not work as expected.
    • The 'Show comment count' now uses your Disqus shortname. In previous versions, it uses a hardcoded test-counter, so please update to this new version.
    • Implemented Sparkle-updates so you can now update to new versions from within Yourhead Software’s Stacks plug-in .

    Wednesday, 3 April 2019

    The Blogspot Stack 1.2.6 for Stacks with RapidWeaver



    Version 1.2.6 of the Blogspot.stack was released on 03 April 2019

    If you purchased this stack, you can download the latest version via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • The 'jump-break' from Blogger is now honoured, regardless of the 'as a summary' setting. This means you can now add 'Read more...' links to single posts yourself, as you wish, without having to switch to 'Summary'-mode for all posts. A jump-break is added by entering  <!--more-->  in your text on the spot where you want the text to break. More info about the jump-break
    • The 'Read more..' link is now only added when the length of the whole post is not equal to the length of the summary.

    Thursday, 4 October 2018

    The Blogspot Stack 1.2.5 for Stacks with RapidWeaver



    Version 1.2.5 of the Blogspot.stack was released on 04 October 2018

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Some single quotes caused a crash with PHP 5.3 when using the Interblog-feature.

    Tuesday, 4 September 2018

    The Blogspot Stack 1.2.4 for Stacks with RapidWeaver



    Version 1.2.4 of the Blogspot.stack was released on 04 September 2018

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:
    • Texts with wrong information in supporting stacks have been removed.
    • The 999 number of posts when a category was clicked, has been fixed. Now, the number of posts to show from the settings is used.
    • The link 'See older posts' is now enclosed in a DIV and does not float right of a small blog post any more.
    • RSSFeed.stack has been updated to v1.1.0:
      • A new setting has been introduced to show or hide the 'Copy' button. When enabled and the user clicks this button, the RSS Feed link is copied to the user's clipboard.

    Sunday, 24 June 2018

    Setup your local macOS X web server #apache #macos #macosx #webserver #localhost #webdevelopment

    I've put together a page where I describe how you can setup a web development environment with two or more Apple Macs.

    If you are a web developer working on Apple Macs, you sure do want to use the macOS X built-in web server, Apache, on all your Macs. And you want to be able to access your Sites folder, local web documents folder and your other Mac via HTTP.

    I'll describe how to set it up on macOS High Sierra (10.13.5). If you're on a previous version of macOS X, not to worry, the steps to take are practically identical. Read on ...

    Tuesday, 5 June 2018

    The Blogspot Stack 1.2.3 for Stacks with RapidWeaver



    Version 1.2.3 of the Blogspot.stack was released on 05 June 2018

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:

    • Fix that caused an unexpected '[' on some installations of PHP v5.4 or lower.
    • Fix that caused an unrecognised constants SORT_NATURAL and SORT_FLAG_CASE on PHP v5.3 or lower. If PHP 5.3 or lower, SORT_STRING is used.
    • Added a META tag in the HEAD-section which contains the actual PHP-version.

    Monday, 19 March 2018

    The Blogspot Stack 1.2.1 for Stacks with RapidWeaver



    Version 1.2.1 of the Blogspot.stack was released on 19 March 2018

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:

    • When using Disqus, you can now have the number of comments shown, in each post.
    • Categories, archives and the RSS-feed would not render with some PHP installations. Reason: on those servers PHP is not allowed to fetch data via regular PHP commands. This has been fixed by using HTTP requests.

    Friday, 16 March 2018

    The Blogspot Stack 1.2.0 for Stacks with RapidWeaver



    Version 1.2.0 of the Blogspot.stack was released on 16 March 2018

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Changes, additions and fixes:

    • You can now change FontAwesome icons. There is a new section, called 'FontAwesome Icons', where the checkbox has been moved to and input fields are added where you can change the icons, supported by Stacks : https://fontawesome.com/v4.7.0/icons/
    • The RSS-feed link now links to XML data, generated by the Blogspot.stack, on your own webpage. The XML data is pulled from Blogger and the links to your Blogger-posts are changed so they point to your webpage's blog. When you have chosen to filter the posts by category or categories, the RSSfeed data is also filtered by those same categories.
    • Added a blank option to the 'Time format'-popup menu. When chosen, only the post's date will be shown.
    • Removed the 'Show RSS link'-checkbox. If you want to list the RSS link, place the 'Blogspot RSS Feed link'-stack where you want it, or use the code snippet.
    • Removed the 'Enable categories'-checkbox. If you want to list the list of categories, place the 'Blogspot Categories'-stack where you want it, or use the code snippet.
    • Added CSS to .blog-entry and .blog-entry-body classes, so the use of float and other styles do not affect the layout.
    • Version number in edit-mode now shows the actual version number.
    • Some oddity with server locales / timezones when formatting the archive dates correctly has been fixed.
    • A problem with detecting if Blogger is reachable has been fixed.
    • Some problems with showing Blogger or Disqus comments have been fixed.
    • The localized string for 'Comments' was not used with Disqus comments. Fixed.
    • Some problems with displaying UTF8 characters in localization strings have been fixed.
    • Changed all HTTP URLs to HTTPS URLs where appropriate

    Read the user manual for more info on how to use the code snippets.

    Monday, 5 March 2018

    The Blogspot Stack 1.1.5 for Stacks with RapidWeaver



    Version 1.1.5 is out with the following changes:

    Released on 05 mar 2018.

    • Better error handling.
    • Reports error message from Blogger, when there is one.
    • Added localization field for 'No posts found' string.
    • When no posts are found, a 'No posts found'-string will be shown. If you do not want this message displayed, simply empty the corresponding localization field.
    • The categories-list is now sorted case-insensitive. Categories in Blogger are case-sensitive!
    • Added a category-filter to only show posts and an archive-list of specific categories. If you specify more than 1 categpry (comma-separated), only posts which have all specified categories will be listed.
    • Moved the common shared PHP code files to the side-wide assets folder.
      This means that you can clean-up the 'files' folders inside your blog-folders.
      To do this, first republish all your blog-pages with RW, then start your FTP client. Open your site folder, open the folder of the blog-page, open the 'files' or 'index_files' folder and delete all of the following files, when you see them there:
      • archiveMonths.xml
      • blogContents.php
      • blogEntry.php
      • blogspot.css
      • blogspot.js
      • bshelpers.inc
      • bspear.inc
      • bsremotegrab.inc
      • bsrequest.inc
      • bssocket.inc
      • bsurl.inc
      • bsxml.inc
      • feedtimeline.js
      • LHPEAR.php
      • localVars.php
      • rapidblog.js
      • rapidBlogHelpers.php
      • remoteGrab.php
      • Requestrb.php
      • Socketrb.php
      • URLrb.php
      • xmlrb.php
    • RSS feed link is a link again.
    • Various internal bugs fixed.
    • Updated the documentation on this page.

    If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .

    Tuesday, 27 February 2018

    The Blogspot Stack 1.1.4 for Stacks with RapidWeaver



    Version 1.1.4 is out with the following changes:
    Version 1.1.4
    Released on 27 feb 2018.
  • Known issues with deprecated, removed and changed PHP calls from PHP v5.4 through v7.1 : fixed
  • Some other bugs fixed.
  • Added a checkbox 'Display errors on', which shows possible PHP warnings. Use it on your local machine and on your live site and then please report any warnings and errors you see (Deprecated: , Warning:, Notice:, Fatal error:), to me, with screen-shots. Then switch it of again.
  • Added YEAR-only option to archives. When selected, archive-links are shown as 1 link per year, and when 'Show archive count' is checked, with the number of posts per year.
  • Removed 'Show author' checkbox - you can swicth it on or off in the 'Alternate ordering'-settings.
  • Added the option to leave out blogpost-sections inside 'Alternate ordering'. If you don't want a certain section in your blogposts, check 'Alternate ordering' and choose the 'blank' option for that section.
  • Added the RSS feed link as a stack. Instead of being always on top of the blog, you can now place it anywhere you prefer, or use this code snippet: <?php renderRSSlink(); ?>
  • Included FontAwesome via Stacks API.
  • Cosmetic changes.
  • If you purchased this stack, you can re-download the installer via your Paddle account.
    If not, you can read more about it here .