# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives
# override charset
AddDefaultCharset UTF-8
# prevent directory listings
Options -Indexes
# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks
# Set the default handler.
DirectoryIndex index.php
# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
<IfModule mod_access_compat.c>
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all denied
</IfModule>
</IfModule>
</Files>
<Files sitemap.xml>
<IfModule !mod_authz_core.c>
Allow from all
</IfModule>
<IfModule mod_access_compat.c>
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
<IfModule !mod_access_compat.c>
Require all granted
</IfModule>
</IfModule>
</Files>
# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
RewriteEngine on
# Usually RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
Updated version number in gs-blog.php. Forgot to do this in the previous version. Updater will now show the correct results.
Fix PrettyURL setting on Settings admin page. Converted to radio buttons to handle the page separation in settings.
Fixed link to show .htaccess example for PrettyURLs. FancyBox script was in the wrong place. It has been moved accordingly.
Fixed thumbnail as link to post. Link A tag was missing but has now been added again.
New Languages:
Added Spanish es_ES language file. Thanks to 'ferchosj'.
Added Russian ru_RU language file. Thanks to 'Oleg06'. This language is a little behind, and may be missing a few strings.
Things that couldn't be fixed:
blog_show_tag($tag) function was thought to show a tag cloud. It actually shows a list of posts that contain the tag given in the argument. A tag cloud will be looked at as a feature in a future version.
(2014-06-18, 20:42:55)webmonkeyukcom Wrote: Hi, thanks for the plugin - I have a small problem when I save a blog entry.
I am getting the following error: "Could not open the rss.rss file"
The blog post actual saves though.
Any ideas? - Thanks in Advance,
Check permissions in rss.rss file you can find on your main html site.
Maybe the problem is there.
I'm having some trouble creating an rss feed from the blog the description outputs heading tags w/ text instead of just the text, is there some way to fix it? This is what it is outputting:
Code:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Bend Marketing Blog</title>
<link>http://bend.marketing/rss.rss</link>
<description>This blog is for people interested in marketing tips and tricks to make their business or organization successful.</description>
<lastBuildDate>Thu, 19 Jun 2014 20:35:56 +0000</lastBuildDate>
<language>en-US</language>
<atom:link href="http://bend.marketing/rss.rss" rel="self" type="application/rss+xml" />
<item>
<title>Social media and the local political campaign #1</title>
<link>http://bend.marketing/blog/post/social-media-and-the-local-political-campaign-part-1</link>
<guid>http://bend.marketing/blog/post/social-media-and-the-local-political-campaign-part-1</guid>
<description>&lt;p&gt;In the past 10 years, social media has gone from a curiosity to a dominant force in guiding public conversation. This change has been especially pronounced for local politicians. Wher</description>
</item>
<item>
<title>Welcome to The Bend Marketing Blog</title>
<link>http://bend.marketing/blog/post/welcome-to-the-bend-marketing-blog</link>
<guid>http://bend.marketing/blog/post/welcome-to-the-bend-marketing-blog</guid>
<description>&lt;p&gt;Do you have an Online question you need answered? Is there some technology your interested in learning more about?&lt;/p&gt;
&lt;p&gt;This is the place to get informat</description>
</item>
</channel>
</rss>
I changed the DateTime string for the <lastBuildDate> to validate the feed with the W3C Feed Validation Service.
File: gs-blog/class/primary/blog.php >line 818
Current:
Code:
<lastBuildDate>".date("D, j M Y H:i:s T")."</lastBuildDate>\n
Changed to:
Code:
<lastBuildDate>".date("D, d M Y H:i:s O")."</lastBuildDate>\n
I'll fix the date format in the next version to make it valid.
I'm not sure what you mean by: "the blog the description outputs heading tags w/ text instead of just the text"? Might you be referring to the HTML formatting contained within the description?
There are a strong bug in GET SIMPLE BLOG: all post are published, included all post with a future date.
For example: if today is 2014/06/26 and you create a new post with 2014/06/30 date, this post will publish and show instead of be hidden until 2014/06/30.
Here, I copy-and paste some code to solve this problem changing the frontEndFunctions.php file :
PHP Code:
In function show_blog_post you must begin the function like that:
function show_blog_post($slug, $excerpt=false) { $Blog = new Blog; global $SITEURL, $blogSettings, $post; $post = getXML($slug);
// This solves the problem to publish post with // a date higer than now.
// get the actual time. $date_now = strtotime(date("d-m-Y H:i:00",time())); // get the post time. $date = strtotime($post->date);
// if post time is lower than actual time, then whow it. if ($date <= $date_now) {
... here all the old stuff.
}// end if date <= date_now
}// end of show_blog_post function.
***************
PHP Code:
function show_blog_category($category) { $Blog = new Blog; $all_posts = $Blog->listPosts(true, true); $count = 0;
foreach($all_posts as $file) { $data = getXML($file['filename']); if($data->category == $category || empty($category)) { // This solves the problem to publish post with // a date higer than now.
// get the post. $slug = $file['filename']; $post = getXML($slug);
// get the actual time. $date_now = strtotime(date("d-m-Y H:i:00",time())); // get the post time. $date = strtotime($post->date);
// if post time is lower than actual time, then whow it. if ($date <= $date_now) { $count++; show_blog_post($file['filename'], true); } } } if($count < 1) { echo '<p class="blog_category_noposts">'.i18n_r(BLOGFILE.'/NO_POSTS').'</p>'; } }
**********
PHP Code:
function show_blog_archives() { global $blogSettings; $Blog = new Blog; $archives = $Blog->get_blog_archives(); if (!empty($archives)) { echo '<h4>'; i18n(BLOGFILE.'/ARCHIVE'); echo '</h4>'; echo '<ul>'; foreach ($archives as $archive => $archive_data) { $post_count = ($blogSettings['archivepostcount'] == 'Y') ? ' ('.$archive_data['count'].')' : ''; $url = $Blog->get_blog_url('archive') . $archive;
// This solves the problem to publish archives with a date higer than present.
// get the actual time. $date_now = strtotime(date("d-m-Y H:i:00",time()));
// gete the archive time. $date_archive = strtotime(date_es_to_en($archive_data['title']));
// if archive time is lower than actual time, then show it. if ($date_archive <= $date_now) { echo "<li><a href=\"{$url}\">{$archive_data['title']}{$post_count}</a></li>"; } } echo '</ul>'; } }
******************
PHP Code:
function show_blog_recent_posts($excerpt=false, $excerpt_length=null, $thumbnail=null, $read_more=null) { $Blog = new Blog; $posts = $Blog->listPosts(true, true); global $SITEURL,$blogSettings; if (!empty($posts)) { echo '<ul>'; $posts = array_slice($posts, 0, $blogSettings["recentposts"], TRUE); foreach ($posts as $file) { $data = getXML($file['filename']); $url = $Blog->get_blog_url('post') . $data->slug; $title = strip_tags(strip_decode($data->title));
// This solves the problem to publish post with // a date higer than now.
// get the actual time. $date_now = strtotime(date("d-m-Y H:i:00",time())); // get the post time. $date = strtotime($data->date);
// if post time is lower than actual time, then whow it. if ($date <= $date_now) {
This last code, has a problem I has not solved in an elegant way.
When using another languaje like spanish, the conversion of archive dates is not possible, so, I must to use a new function to conver "enero 2014" to "01/01/2014" date.
This must be refined, but, if you are using GS Blog in spanish, this must be work fine:
PHP Code:
// this is a function to translate spanish dates like "enero 2014" to numbers like "1/01/2014" function date_es_to_en($date_es ) {
// this replace all month names with his number for each languaje: $translated_month = str_replace($en, $numbers, $fecha[0]); $translated_month = str_replace($es, $numbers, $fecha[0]);
// add here a new languaje str_replace if you need...
2014-06-27, 19:12:21 (This post was last modified: 2014-06-30, 17:42:29 by johnstray2001.)
I have made a note I the following bugs and will fix them in the following versions:
- hiding posts with future date [3.2.3]
- better handling of dates in other languages [4.0.0]
- dynamic generation of RSS feeds [4.0.0]
- date format in RSS feeds are standards invalid [3.2.3]
- fix handling of language files when the required language is not available. Should default to English. [3.2.3 - 3.2.4]
2014-07-27, 20:32:06 (This post was last modified: 2014-07-27, 20:34:05 by akd.)
Hi, John thanks for the plugin - I have a small problem.... When I setup plugin and it output "blog_post_info",
it output weird separator : | after Author and Date. How I can remove these? And how to style this string?
I also want to remove "by" and "on" and rearrange Date and month....
2014-08-04, 22:59:03 (This post was last modified: 2014-08-04, 23:01:31 by johnstray2001.)
Bugfix has been noted:
- Link for "Display CSS: Click here to view available classes and ids" to be fixed.
Feature request has been noted:
- Add external stylesheet file for easier modifying if user does not wish to use the customization section of settings. The CSS file will automatically fill the custom CSS section, and vice-versa.
NOTE: Version 4 will contain an external HTML file and CSS stylesheet for much easier layout modification, removing the need for the customization section in the settings.
Thank you for noting my request.....
I have some problem presently in going to admin and when I turn error logging I got this:
[06-Aug-2014 18:20:34 Asia/Kolkata] PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/akd/Documents/Sites/plugins/gs-blog/lang/en_US.php:2) in /Users/akd/Documents/Sites/admin/inc/cookie_functions.php on line 23
[06-Aug-2014 18:20:34 Asia/Kolkata] PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/akd/Documents/Sites/plugins/gs-blog/lang/en_US.php:2) in /Users/akd/Documents/Sites/admin/inc/cookie_functions.php on line 24
[06-Aug-2014 18:20:34 Asia/Kolkata] PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/akd/Documents/Sites/plugins/gs-blog/lang/en_US.php:2) in /Users/akd/Documents/Sites/plugins/i18n_base/backend.class.php on line 7
After login It redirect to: admin/pages and stuck with white screen . If I manually type /admin/plugins.php I can go to admin and there all works allright
and should redirect: admin/load.php?id=i18n_base since I have i18N base installed
if I deactivate either plugin everything work fine