Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetSimple Blog
Hi,

How do I add the total number of posts in a category from this category display code; <?php show_blog_categories(); ?>

-Abuhayyan
Reply
(2015-04-06, 20:50:25)johnstray2001 Wrote: uhebeisen: Make sure that the "Website URL" is set correctly in your settings. Go to: Admin->Settings->General Settings->Website URL. This could be the cause of your issues.

hi,
i have the same difficulties as ubeheisen has. i don't know what to do with your advice to set my settings properly; my website url in "general settings" is set to http://www.my-domain.xy/subdirectory/
if that is correct, is there something else to make gs-blog work?

in debug mode, i get the following warnings:

Code:
Warning: file_get_contents(http://get-simple.info/api/extend/?id=810): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/versionCheck.php on line 26

Warning: Creating default object from empty value in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/versionCheck.php on line 28

Notice: Undefined property: stdClass::$version in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/versionCheck.php on line 47

Notice: Undefined index: blogcategories in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/adminFunctions.php on line 34

on extend, i downloaded version 3.3.1 (at least the button says so). in the admin plugins page, it is displayed as version 3.3.0. in gs-blog.php it is defined as version 3.3.0. i also tried to download version 3.3.1 from the github releases repository, but after downloading it also shows as version 3.3.0.
installing version 3.3.2. beta1 throws an blank page and this error:
Parse error: syntax error, unexpected ''WRITE_OK'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/lang/de_DE.php on line 31
installing version 3.3.2 beta2 throws a blank page and this error:
Parse error: syntax error, unexpected '$recent_posts' (T_VARIABLE) in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/frontEndFunctions.php on line 334
installing version 3.4.0 beta 3 (or should it be 3.2.2 beta 3??) throws a blank page and this error:
Parse error: syntax error, unexpected '$recent_posts' (T_VARIABLE) in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/frontEndFunctions.php on line 334

thanks for your help!
Reply
Version 3.4.0 is now available on Extend.
This version includes the following changes:

Bug Fixes:
  • [#058] Variable `$p['thumbnail']` needed to be casted correctly because it was returning a `SimpleXMLObject` even when empty. This caused an `IF` statement in the layout operate incorrectly.
  • [#057] Fixed language setting not being available to language based functions. The language string is now stored in the language files and loaded from there instead of settings.
  • [#054] Fixed Advertising code in 'Original' theme causing php warning because the setting wasn't available in fresh installs.
  • [#051] Fixed Hierarchical URLs not supported by i18n plugin. A function was updated to use i18n's `find_i18n_url` instead of the core `find_url`
  • [#050] Removed obsolete `IF` statement related to versionCheck. This may have been the cause of the slowness!
  • [#068] Fixed string not translated in generateRSSFeed()
  • [#067] Fixed rss.php issues
  • [#043] Fixed syntax error, unexpected ';'
  • [#036] Frontend functions modified to allow lists to be echoed or returned
  • [#000] Updated version number definition. I forgot it again...

Front End UI Improvements:
  • [#056] Image thumbnail paths separated into parts to allow for easier customization in the layout. `IF` statement added to check if an image is included with the post or not.
  • [#055] Removed theme layouts and converted to using 2 include files for layout generation. You can customize these as needed.
  • [#029] Better handling of date/time formats for different languages. Format string now stored in language file.

Back End (Admin) Changes:
  • [#069] Removed reliance on private server for "What's New" information.

Code Changes (Plugin Compatibility):
  • [#011] Added 2 actions to allow for compatibility with other plugins, such as 'Auto-open Page Options'.

Updated Languages:
  • [#029] Added English (British) Language file to enable date formats for this region.
  • [#059] Add German (DE) Language file.
  • [#061] Updated English (US) language file with new strings and removed old strings.
  • [#061] Updated French (FR) language file with new strings and removed old strings.
  • [#035] Updated Spanish (ES) language file with new strings and removed old strings.
  • [#034] Updated Italian (IT) language file with new strings and removed old strings.
  • [#061] Updated Polish (PL) language file with new strings and removed old strings.
  • [#061] Updated Russian (RU) language file with new strings and removed old strings.

NOTE: French and Spanish language files are still incomplete. These will be finished as soon as possible and released in v3.4.1. Unfortunately the translators I had on board for these languages just took waaaay too long, so I've decided to release as it is now so that people can finally get the bug-fixes that are included herein.
Check out my website: JohnStray.id.au
Reply
@ johnstray: thank you for the update - after installation i get a blank page and this error:
Parse error: syntax error, unexpected ''WRITE_OK'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/lang/de_DE.php on line 31
can you give me a hint what to do there?
cheers, pigsound
Reply
Line 28 is missing a comma. Just add a comma to the end of line 28 and that'll fix the issue.
Check out my website: JohnStray.id.au
Reply
thank you, that helped a bit.
now after activating the plugin the site goes blank again.
i found some more lacking commas in the language file "de_DE.php on the end of the lines 139 and 143.
after correcting the file, the blank page disappeared.

now, in the admin, when i open the blog tab and click "create article", i get inactivity plus this:
Notice: Undefined index: blogcreatepost in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/adminFunctions.php on line 24

when i click "categories", i get inactivity plus this::
Notice: Undefined index: blogcategories in /cluster/www/my-domain.xy/subdirectory/plugins/gs-blog/inc/adminFunctions.php on line 26

click on "rss auto-importer", i get inactivity plus this::
Notice: Undefined index: blogrssimporter in /cluster/www/[b]my-domain.xy/subdirectory/plugins/gs-blog/inc/adminFunctions.php[/b] on line 41

clicking on "search update" , i get inactivity plus this::
Notice: Undefined index: blogsettings in /cluster/www/[b][b]my-domain.xy/subdirectory[/b]/plugins/gs-blog/inc/adminFunctions.php[/b] on line 65

clicking on "help" , i get inactivity plus this::
Notice: Undefined index: bloghelp in /cluster/www/[b][b][b]my-domain.xy/subdirectory[/b][/b]/plugins/gs-blog/inc/adminFunctions.php[/b] on line 67

help! :-)
Reply
thank you for your help, marc!

i corrected the german language file, added the missing lines and changed the umlauts to entities.

sadly, this did not help with the php-warnings i listed in my previous post. they still show up and i still cannot create blog entries nor check or create categories.

i wonder what's causing these problems. is it because my cms installation is in a subdirectory?

thanks in advance!
Reply
bazinga! - that was the decisive hint! thank you, marc!
i had to go to settings/general settings and check "pretty urls" in the website settings. since i've read through this forum and had already found the instructions for turning on pretty urls before, i have already tried that. but until now, the check disappeared everytime i reset the page. nevertheless - now it works, the check stays checked an the blog functions work! Big Grin

thanxalot,
pigsound
Reply
Thanks to everyone for pointing out the issues with the German language file. Upon further inspection, similar issues were found with the French language file as well. These issues are being worked on over at the GitHub page and will be added to the next update, v3.4.1.

Marc-Germany: The categories count feature has not been implemented yet. It's on the to-do list.
Check out my website: JohnStray.id.au
Reply
having mastered some difficulties in the beginning, gs blog is a blog easy to work with.
making my first entries i found that it would be a nice thing in the back end to have the possibility to copy an old post in order to create a new post with the same entries and settings.
is that already possible? if it is not, this is my wishlist contribution.
Reply
Thanks for the input.

Unfortunately, I don't think what you have suggested would be feasible any time soon, if at all.
Check out my website: JohnStray.id.au
Reply
Exclamation 
URGENT!!

A Spanish translator is needed urgently. The Spanish language file is the only one that remains incomplete after the change in file structure. If you can translate to Spanish, please PM me so that I can add you to the GitHub project.

For some unknown reason, both of the existing translators have disappeared and I have not been able to get in contact with either of them.
Check out my website: JohnStray.id.au
Reply
Just installed on GS 3.3.8 my site goes blank if I activate it.
I am using the Ckedit patch and I noticed a ckedit file in the blog plugin.
Any recommendations?
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
jwzumwalt: It goes blank due to an issue with the language files. This has now been fixed and I'm about to release this fixed version.
The Ckedit patch has a small issue that prevents it from being used with any plugins. I have submitted a fix to it's developer and I can only hop that it gets implemented to a later version.
Check out my website: JohnStray.id.au
Reply
Information 
Version 3.4.1 is now available on Extend.
This version includes the following changes:


Bug Fixes:
  • [#---] Some language files were missing some commas in the array. Added html entities for certain characters.
  • [#075] German and French language files were missing some commas in the array.
  • [#075] German language file had 9 missing strings.
  • [#074] Fixed issues with post count in categories: casting of XMLobjects to string, a few missing punctuation marks, updated en_US language file to add Categories to Archive Post Count string.
  • [#074] Fixed 'illegal offset' warning in show_blog_category() function. XMLobject is now cast properly as a string to use as array offset. This prevented show_blog_categories() from being able to count the posts.
  • [#076] Fixed language string concatenated use for 'Manage Custom Fields'.
  • [#077] Fixed incorrect language string references for the RSS Auto-Importer Settings page.
  • [#079] Fixed some issues with the CustomFields Manager. Also added a sidebar button so that CFM could actually be used.
  • [#080] Much better handling of date format internationalisation.

Front End UI Improvements
  • [#074] Properly implemented post counts in categories. This was incomplete in the previous release. Rebuilt methods to make it more robust than originally planned.
NOTE: The Spanish language file is still incomplete. This will be finished as soon as possible and released in a later version. Unfortunately the translators I had on board for these languages just took waaaay too long, so I've decided to release as it is now so that people can finally get the bug-fixes that are included herein.
Check out my website: JohnStray.id.au
Reply
Still goes blank and FYI your links are broken on your website...
Thanks for the effort Smile
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
(2016-03-26, 17:29:20)jwzumwalt Wrote: Still goes blank and FYI your links are broken on your website...
Thanks for the effort Smile

blank or some error page? apache or nginx?

I'm also having problems upgrading from 3.3.x to 3.4.1. What's strange is that I recently copied my blog to a second computer on my internal LAN in order to do some testing and on that second server I could upgrade without any problem, whereas on my main public blog I'm always getting a 500 error when I update gs-blog. Coying 3.3.1 over the new files "fixes" it again. I'm at a loss here.

I guess I'll have to find a way to do a recursive diff of all the files between the two servers to track this one down. I couldn't find anything conclusive in the logfiles. Very strange.
Reply
jwzumwalt: What language do you have set? An what environment are you using (Apache/IIS, Windows/Linux, etc.)

tuxophil: What are the 2 different environments you are using? A 500 error refers to "Internal Server Error" which on some systems can be triggered by a PHP warning/error.
Check out my website: JohnStray.id.au
Reply
(2016-03-26, 22:29:21)johnstray2001 Wrote: What are the 2 different environments you are using? A 500 error refers to "Internal Server Error" which on some systems can be triggered by a PHP warning/error.

Hi, thanks for the quick reply and pointing in the right direction! I temporarily replaced my php.ini by the packaged php-development.ini. Here's the error that is now shown:

Quote:Parse error: syntax error, unexpected '(string)' (string) (T_STRING_CAST) in /var/www/blog/plugins/gs-blog/inc/frontEndFunctions.php on line 327

On my local development/testing server I have php 5.6.17 (distro based on debian jessie), whereas on my public server it's 5.4.45.

The problem seems to be a parser improvement in the newer php version. Here's the change I had to apply to gs-blog/inc/frontEndFunctions.php to make it compatible again:


Code:
*** gs-blog/inc/frontEndFunctions.php 2016-03-26 15:54:30.000000000 +0100

--- ../gs-blog/inc/frontEndFunctions.php 2016-03-26 15:43:12.000000000 +0100
***************
*** 324,332 ****
          if($excerpt) { // If we are showing the excerpt...
            $excerpt_string = $Blog->create_excerpt(html_entity_decode($data->content), 0, $excerpt_length); // Create the excerpt
            if($thumbnail) { // If we are showing a thumbnail with it...
-             if(!empty((string)$data->thumbnail)) { // Does a thumbnail exist with the post?
-               // Output the HTML for the image
                $thumbfile = (string) $data->thumbnail;
                $excerpt_string = '<img src="'.$SITEURL.'data/uploads/'.$thumbfile.'" class="blog_recent_posts_thumbnail" />'.$excerpt_string;
              }
            }
--- 324,332 ----
          if($excerpt) { // If we are showing the excerpt...
            $excerpt_string = $Blog->create_excerpt(html_entity_decode($data->content), 0, $excerpt_length); // Create the excerpt
            if($thumbnail) { // If we are showing a thumbnail with it...
                $thumbfile = (string) $data->thumbnail;
+             if(!empty($thumbfile)) { // Does a thumbnail exist with the post?
+               // Output the HTML for the image
                $excerpt_string = '<img src="'.$SITEURL.'data/uploads/'.$thumbfile.'" class="blog_recent_posts_thumbnail" />'.$excerpt_string;
              }
            }
(i.e. do the type cast in a separate instruction.)
Reply
(2016-03-26, 17:29:20)jwzumwalt Wrote: Still goes blank and FYI your links are broken on your website...
Thanks for the effort Smile

Is anything logged in data/others/logs/errorlog.txt?

Maybe you're encountering the same issue I had.
Reply
(2016-03-28, 02:14:40)tuxophil Wrote: Is anything logged in data/others/logs/errorlog.txt?

The log is empty - no error report.
But, the author said this plugin does not work with others and I have about 15 installed plugins. So, I  have given up.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
(2016-03-28, 07:14:29)jwzumwalt Wrote:
(2016-03-28, 02:14:40)tuxophil Wrote: Is anything logged in data/others/logs/errorlog.txt?

The log is empty - no error report.
But, the author said this plugin does not work with others and I have about 15 installed plugins. So, I  have given up.

While other plugins could be an issue, I somehow doubt it is in this case.

I actually had the same issue, no log, no matter what I tried to convince apache+php to write anything and I had the same issue that I could get version 3.3.1 of the plugin running but anything after 3.4.0 droped the blank curtain which is surely hell of annoying as it require manual hampering of the plugins.xml to fix it.

Apparently it seems that if we not run GetSimple in debug mode, all PHP errors get disabled all together. So all configurations like E_ALL + E_STRICT just vanish in the nirvana. Biting it and enabling debug on the production system I indeed got the same error as tuxophil 

Quot  e: Wrote:
Code:
Parse error: syntax error, unexpected '(string)' (string) (T_STRING_CAST) in /var/www/blog/plugins/gs-blog/inc/frontEndFunctions.php on line 327


Fixing this cast inside of the empty() method solved it for me. All in all it may be related to a limitation of the PHP version 5.4.45 of my Debian system with the cast.
Reply
Quote:Sisyphos
Apparently it seems that if we not run GetSimple in debug mode, all PHP errors get disabled all together. So all configurations like E_ALL + E_STRICT just vanish in the nirvana. Biting it and enabling debug on the production system I indeed got the same error as tuxophil
 
This seems to be the case, because I have my internet php server designed to send errors directly to the folder that a php programs errors "error.log" (I use ftp to edit programs and view the log while I am in development) - GS is over riding the system wide error log settings. I don't get ANY error log files under the GS directory.

Since I use ftp a lot, I can restore things by simply adding .bak to the gs_blog.php file, then the plugin does not execute. A blog was a "nice to have" not a "need to have" so I will shelve this idea for a while.

What specific edit did you do on line #327 ?
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
Regarding conflicting plugins:
* http://get-simple.info/extend/plugin/new...dated/541/
This plugin seem to use the same mechanism for news entries as the blog plugin. If both plugins are active no warnings or errors will be reported but only the the news entries will show up.
Reply
(2016-03-28, 12:09:17)jwzumwalt Wrote: What specific edit did you do on line #327 ?

The offending line is:

Code:
            if(!empty((string)$data->thumbnail)) { // Does a thumbnail exist with the post?
I moved the line with the string cast up and replaced (string)$data->thumbnail by $thumbnail. The code now reads:
Code:
                $thumbfile = (string) $data->thumbnail;
             if(!empty($thumbfile)) { // Does a thumbnail exist with the post?
               // Output the HTML for the image
The output I gave in my previous comment on this issue was given by the "diff" command. It's a very valuable and widely-used tool when handling code of all sorts.
Reply




Users browsing this thread: 1 Guest(s)