Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Blog v1.4
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.dreamhoster...ag/tagtest
("404 Error - Page Not Found")
Reply
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.
Reply
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.dreamhoster...ag/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]
Reply
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.
Reply
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.
Reply
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.
Reply
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.dreamhoster...ive=$1" and I see the archive page (with nothing in it.) but "http://getsimplecmsproject00.dreamhoster...g/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?
Reply
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.
Reply
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>
Reply
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
Reply
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
Reply
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
Reply
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Yes, this is a feature of CkEditor and can be turned off.

see here: http://dev.ckeditor.com/ticket/3260
My Github Repos: Github
Website: DigiMute
Reply
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?
Reply
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.
Reply
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?
Reply
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]
Reply
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</>
Reply
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.
Reply
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]
Reply
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!
Reply
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.
Reply
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
Reply
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.
Reply




Users browsing this thread: 3 Guest(s)