GetSimple Support Forum
GS Blog v1.4 - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: GS Blog v1.4 (/showthread.php?tid=3200)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21


GS Blog v1.4 - michaellindahl - 2012-08-31

magik Wrote:
michaellindahl Wrote:I think I found a new error. Searching on posts via tags (.com/blog/tag/blogtaghere) is throwing an error page.

What error are you getting? Do you get a text message or a display problem?

Here is my test blog page:
http://getsimplecmsproject00.dreamhosters.com/blog/

Here is what I get when I click on a valid tag:
http://getsimplecmsproject00.dreamhosters.com/blog/tag/tagtest
("404 Error - Page Not Found")


GS Blog v1.4 - magik - 2012-08-31

magik Wrote:
michaellindahl Wrote:I think I found a new error. Searching on posts via tags (.com/blog/tag/blogtaghere) is throwing an error page.

What error are you getting? Do you get a text message or a display problem?

One thing is sure:

The following function could be upgraded:

/**
* Show posts for requested tag
*
* @return void
*/
function show_blog_tag($tag)
{
$Blog = new Blog;
$all_posts = $Blog->listPosts(true, true);
foreach ($all_posts as $file)
{
$data = getXML($file['filename']);
$tags = explode(',', $data->tags);
if (in_array($tag, $tags))

{
show_blog_post($file['filename'], true);
}
}
}

if $tags is empty, it shouldn't check (in_array($tag, $tags)).

I don't have tags on my blog yet, but my first guess would be look here.

I would suggest adjusting this function with this to optimize it a bit.


GS Blog v1.4 - magik - 2012-08-31

michaellindahl Wrote:
magik Wrote:
michaellindahl Wrote:I think I found a new error. Searching on posts via tags (.com/blog/tag/blogtaghere) is throwing an error page.

What error are you getting? Do you get a text message or a display problem?

Here is my test blog page:
http://getsimplecmsproject00.dreamhosters.com/blog/

Here is what I get when I click on a valid tag:
http://getsimplecmsproject00.dreamhosters.com/blog/tag/tagtest
("404 Error - Page Not Found")

You seem to have pretty-urls activated. It might be the culprit. I would check the .htaccess in your main GetSimple directory for a possible error, maybe your page isn't redirecting correctly.

The following line: RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]


GS Blog v1.4 - michaellindahl - 2012-08-31

magik Wrote:You seem to have pretty-urls activated. It might be the culprit. I would check the .htaccess in your main GetSimple directory for a possible error, maybe your page isn't redirecting correctly.

The following line: RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]

Thanks. Fixed it.


GS Blog v1.4 - michaellindahl - 2012-08-31

What's the best way to use a Custom Blog Page Layout? Right now I am using
Code:
if (substr($_SERVER['REQUEST_URI'], 0, 11) == "/blog/post/")
to determine whether to write the code for the blog page or the posts page...

More documentation on usage and customization would be nice as well...

Also how do I adequately add tags the custom layout. I am looking for basically, if there are tags, echo each tag. I'm a very novice developer and I can't really find the answer.


GS Blog v1.4 - michaellindahl - 2012-08-31

mikeh Wrote:
focoves Wrote:problem with SPECIAL CHARACTERS into excerpt

special characters are well showed in full articule, but excerpt show a bad decode

look here:
http://decorametacrilato.es/dev/novedades/

Version 1.0.2 Added To Extend:
  • Re-worked $Blog->create_excerpt() method to deal with special characters.
    File changes described below:

Before
Code:
public function create_excerpt($content, $start, $maxchars)
{
    $content = substr($content, $start, $maxchars);
    $pos = strrpos($content, " ");
    if ($pos>0)
    {
        $content = substr($content, $start, $pos);
    }
    $content = html_entity_decode(strip_tags(strip_decode($content)));
    $content = str_replace("Read The Full", "", $content);
    return $content;
}

After
Code:
public function create_excerpt($content, $start, $maxchars)
{
    $content = substr($content, $start, $maxchars);
    $pos = strrpos($content, " ");
    if ($pos>0)
    {
        $content = substr($content, $start, $pos);
    }
    $content = htmlspecialchars_decode(strip_tags(strip_decode($content)));
    $content = str_replace(i18n_r(BLOGFILE.'/READ_FULL_ARTICLE'), "", $content);
    return $content;
}

Note this change should also be noted in the "Click here for tips and tricks for custom blog pages" section.
Currently it lists "Decode Content: <?php echo html_entity_decode($post->content); ?>"
When it should now be this: "Decode Content: <?php echo htmlspecialchars_decode($post->content); ?>"
This concern was also noted in one of my earlier posts. Its nice to see it has been changed, but the documentation should also be updated.


GS Blog v1.4 - michaellindahl - 2012-09-02

magik Wrote:You seem to have pretty-urls activated. It might be the culprit. I would check the .htaccess in your main GetSimple directory for a possible error, maybe your page isn't redirecting correctly.

The following line: RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]

Thanks that was the issue. I forgot to make those changes to the htaccess file after the fresh install. The archive page is messed up. I go to "http://getsimplecmsproject00.dreamhosters.com/index.php?id=blog&archive=$1" and I see the archive page (with nothing in it.) but "http://getsimplecmsproject00.dreamhosters.com/blog/archive/" gives me that same 404 error. I do have this in the htaccess
Code:
RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L]
I think I will have to add another if to my Custom Blog Layout to choose the layout of the archive page. I really wish that there was an easy way to differentiate the different page layouts. Another question I have is how can I also put a link to blog archive at the bottom of my blog page?


GS Blog v1.4 - mikeh - 2012-09-10

I have started on a new version of this plugin, taking into consideration about 20 fixes, issues, and suggestions that have been posted here in the past couple months.

Thank you to magik, shawn_a and michaellindahl for your assistance in debugging and support.


GS Blog v1.4 - michaellindahl - 2012-09-10

mikeh Wrote:I have started on a new version of this plugin, taking into consideration about 20 fixes, issues, and suggestions that have been posted here in the past couple months.

Thank you to magik, shawn_a and michaellindahl for your assistance in debugging and support.

Yay! I'm so excited. I also just found another possible bug, I think. The following source displays the same in my website/install.

Code:
<p>
    This is how the program currently creates paragraphs.  There is an extra new line and tab.</p>
Code:
<p>This is how I think the program should create paragraphs. It seems more standard.</p>



GS Blog v1.4 - irperera - 2012-09-10

I'm trying to get this plugging to work with fancy url but i keep getting

/advertising.htmlpost/a-limo-bus when it should be /advertising/post/a-limo-bus


GS Blog v1.4 - michaellindahl - 2012-09-10

irperera Wrote:I'm trying to get this plugging to work with fancy url but i keep getting

/advertising.htmlpost/a-limo-bus when it should be /advertising/post/a-limo-bus

Can you give us to full URL to take a look at? Also do you have your .htaccess file edited as directed in the Blog Settings, next to the checkbox for using fancy URLs? .com/admin/load.php?id=blog&settings&htaccess#htaccess


GS Blog v1.4 - irperera - 2012-09-10

michaellindahl Wrote:
irperera Wrote:I'm trying to get this plugging to work with fancy url but i keep getting

/advertising.htmlpost/a-limo-bus when it should be /advertising/post/a-limo-bus

Can you give us to full URL to take a look at? Also do you have your .htaccess file edited as directed in the Blog Settings, next to the checkbox for using fancy URLs? .com/admin/load.php?id=blog&settings&htaccess#htaccess

http://www.buses-are-us.com/contact.html is the link

i'm using fancy url with .html

thanks

Ian


GS Blog v1.4 - shawn_a - 2012-09-10

michaellindahl Wrote:
mikeh Wrote:I have started on a new version of this plugin, taking into consideration about 20 fixes, issues, and suggestions that have been posted here in the past couple months.

Thank you to magik, shawn_a and michaellindahl for your assistance in debugging and support.

Yay! I'm so excited. I also just found another possible bug, I think. The following source displays the same in my website/install.

Code:
<p>
    This is how the program currently creates paragraphs.  There is an extra new line and tab.</p>
Code:
<p>This is how I think the program should create paragraphs. It seems more standard.</p>

Sounds like a ckeditor issue not this plugins.


GS Blog v1.4 - n00dles101 - 2012-09-11

Yes, this is a feature of CkEditor and can be turned off.

see here: http://dev.ckeditor.com/ticket/3260


GS Blog v1.4 - newdeepdan - 2012-09-11

I have the latest version 1.2.2 installed on my website and I was wondering if there's a way to organize the Categories list alphabetically?


GS Blog v1.4 - virgiltu - 2012-09-12

Wow amazing work. No issues what so ever.

What will be nice is to be able to pick what categories to put in what page. So lets say you have different page and you only want so show from 1 or 2 categories and not all. This will make an amazing difference in functionality.

Thanks for the hard work.


GS Blog v1.4 - mikeh - 2012-09-12

virgiltu Wrote:Wow amazing work. No issues what so ever.

What will be nice is to be able to pick what categories to put in what page. So lets say you have different page and you only want so show from 1 or 2 categories and not all. This will make an amazing difference in functionality.

Thanks for the hard work.
Glad it is useful for you.
Can you please elaborate on your category request?


GS Blog v1.4 - michaellindahl - 2012-09-12

irperera Wrote:i'm using fancy url with .html

That might be the problem, why are you using it with .html? It might be better to use /advertising/index.html This way all your pages will look nice (ie .com/services/) and it would allow you to change this URL: .com/advertising.htmlpost/a-limo-bushtml to .com/advertising/post/a-limo-bus

I can get to the page via: .com/index.php?id=advertising&post=a-limo-bushtml

Also this line needs to look as so: RewriteRule ^advertising/post/([^/.]+)/?$ index.php?id=advertising&post=$1 [L]


GS Blog v1.4 - newdeepdan - 2012-09-15

There is still the problem where links don't work properly in the posts.

I created a post, and linked the text to say www.google.com. It works, then when I want to make an update to that post, the linked text no longer links to www.google.com. If I check the source, it will say:

Code:
<a href="/">google</>



GS Blog v1.4 - mikeh - 2012-09-15

newdeepdan Wrote:There is still the problem where links don't work properly in the posts.

I created a post, and linked the text to say www.google.com. It works, then when I want to make an update to that post, the linked text no longer links to www.google.com. If I check the source, it will say:

Code:
<a href="/">google</>
I believe this to be a problem with your server, or settings on your server, rather than with the plugin itself.
I have seen this happen with some other plugins as well but I forget what the cause is. I will research this some more, but as of now, I cannot replicate this issue.


GS Blog v1.4 - newdeepdan - 2012-09-17

mikeh Wrote:
newdeepdan Wrote:There is still the problem where links don't work properly in the posts.

I created a post, and linked the text to say www.google.com. It works, then when I want to make an update to that post, the linked text no longer links to www.google.com. If I check the source, it will say:

Code:
<a href="/">google</>
I believe this to be a problem with your server, or settings on your server, rather than with the plugin itself.
I have seen this happen with some other plugins as well but I forget what the cause is. I will research this some more, but as of now, I cannot replicate this issue.

Here's some more information, in case that might help. I'm using Godaddy as my domain provider and Linux hosting with PHP 5.2.

Below are the installed plugins I have:

[Image: E16TX.jpg]


GS Blog v1.4 - Timbow - 2012-09-18

This blog is looking really good. A quick question:

The last time I installed this plugin I was looking for a very standard blog layout with excerpts of posts and each one with a 'Read More' link on the end of the excerpt. I couldn't find an obvious way to add the 'Read More' link.

Is there a way to do this now?

Ta!


GS Blog v1.4 - mikeh - 2012-09-18

Timbow Wrote:This blog is looking really good. A quick question:

The last time I installed this plugin I was looking for a very standard blog layout with excerpts of posts and each one with a 'Read More' link on the end of the excerpt. I couldn't find an obvious way to add the 'Read More' link.

Is there a way to do this now?

Ta!
There is a way in the new version that is to be released in a few days.


GS Blog v1.4 - mikeh - 2012-09-18

I am nearly finished with the new version but I am not going to release it untill I receive some feedback on my implemenation of custom permissions in my multi user plugin. I do not want to release it if the developer community is not happy with my method of permissions. I will give it a couple days to get some feedback and incorporate any if neccesary. If feedback is not provided I will release as is.

If you would like to test it out you can download it from GitHub Here.

Below are the changes so far:
  • - Removed codemirror from all admin pages that do not belong to blog plugin
  • - Disabled posts without titles from being created
  • - Added RSS auto-detection in theme header
  • - Fixed JS errors on editor pages
  • - Placed tags in blog_post_container in frontend
  • - getSettingsData method returns entire settings file in array if $node param is not provided
  • - Added ability to add "Read More" link after excerpt and choose text to display (disabled by default)
  • - Added ability to display post count next to archive months in archives function (disabled by default)
  • - Fixed some tag errors.
  • - Added hooks for custom permissions which can be used if using the latest version of the multi-user plugin (on github)

Below is the link to view the custom permissions modifications to the multi user plugin:
http://get-simple.info/forum/post/30230/#p30230


GS Blog v1.4 - magik - 2012-09-18

I looked at the changes to the code on GitHub and looked at the custom permissions. I really like the presentation of the custom permissions.

I'll test this version in the next few days.


Have you changed the "View All Categories" functionality or added an "Uncategorized" option? (see http://get-simple.info/forum/post/29805/#p29805)


Also, I'm unsure if the line in bold in this is currently in error:
public function listPosts($array=false, $sort_dates=false)
{
$all_posts = glob(BLOGPOSTSFOLDER . "/*.xml");
if(count($all_posts) < 1)
{
return false;
}
else
{
$count = 0;
if($array==false)
{
return $all_posts;
}
else
{
foreach($all_posts as $post)
{
$data = getXML($post);
$posts[$count]['filename'] = $post;
$posts[$count]['date'] = (string) $data->date;
$posts[$count]['category'] = (string) $data->category;
$posts[$count]['tags'] = (string) $data->tags;
if(isset($data->author)) { $posts[$count]['authur'] = (string) $data->author; }
$count++;
}


Author seems to not be implemented (I may be wrong). Otherwise, I believe it should be $posts[$count]['author'].



Also is the feature "Added ability to display post count next to archive months in archives function (disabled by default)" also available for categories? I would really like being able to do it for categories too.


I'll be sure to check the code more thoroughly in the next version. I really like learning from it.