Posts: 661
Threads: 52
Joined: Feb 2011
shawn_a Wrote:This is why you should prefix all your functions and global names so they are unique.
My functions are unique. Try not to jump to conclusions.
I will however, make them a bit more unique in the next version.
Posts: 3,491
Threads: 106
Joined: Mar 2010
mikeh Wrote:Version 1.4.1 Added To Extend- Fixed en_US.php lang file which was corrupted during push to github.
Tested, it now works.
Note: Once upgraded (removed old blog.php and blog folder before), with debug mode you get some soft errors on the archive list, like:
Notice: Undefined index: archivepostcount [...]\plugins\blog\inc\frontEndFunctions.php on line 193
but if you go to admin panel, edit your blog settings and save them, those errors disappear.
Posts: 1
Threads: 0
Joined: Sep 2012
Hey!
Maybe someone can help me with this. Is there a way to paginate show_blog_category($category) in the same way as show_posts_page($index=0) is paginated?
Regards,
BXC
Posts: 10
Threads: 0
Joined: Nov 2011
2012-09-26, 14:39:34
(This post was last modified: 2012-09-26, 14:43:23 by richtopia.)
mikeh Wrote:Box Wrote:lr Wrote:FIXED.. old hosting 1and1 account. I had added to php.ini magic_quotes_gpc = off
but adding to the main directory was not enough. Added it also to sub directories admin and plugin/blog
and the error disappeared.
I have exact problem, but i didn't fixed... how to fix exactly please?
Thanks Code: magic_quotes_gpc = off
^ Should do the trick. Are you sure you put that in your php.ini? Try using the phpinfo() function to make sure it is off.
I did try, no success but i found solution:
In .htaccess should add line:
php_flag magic_quotes_gpc off
and works.
Another question:
kubikk Wrote:How can I display the date of the function:
<?php show_blog_recent_posts(); ?>
help pliz
I wanna display date too, how to do that in component <?php show_blog_recent_posts(); ?> ?
Thank you...
Posts: 6,266
Threads: 181
Joined: Sep 2011
mikeh Wrote:My functions are unique. Try not to jump to conclusions.
I wasn't jumping to anything, that was a response to a post suggesting a conflicts.
I know your code like I know a good book.
Your plugin files and your functions names have no prefix.
"Cannot redeclare class Blog"
a class name of Blog is not unique
mh_blog would be.
When using a plugin or extensible system without special scoping you should prefix all variables and function names in global scope to avoid collisions with others.
When some other person releases a blog plugin and names their plugin blog.php or has a class called blog.
And someone tries to install both, then the exact error posted previously will be the result. It was just a logical suggestion of standardized practices.
Posts: 661
Threads: 52
Joined: Feb 2011
shawn_a Wrote:mikeh Wrote:My functions are unique. Try not to jump to conclusions.
I wasn't jumping to anything, that was a response to a post suggesting a conflicts.
I know your code like I know a good book.
Your plugin files and your functions names have no prefix.
"Cannot redeclare class Blog"
a class name of Blog is not unique
mh_blog would be.
When using a plugin or extensible system without special scoping you should prefix all variables and function names in global scope to avoid collisions with others.
When some other person releases a blog plugin and names their plugin blog.php or has a class called blog.
And someone tries to install both, then the exact error posted previously will be the result. It was just a logical suggestion of standardized practices.
Well the plugin is called blog, so most all functions have the name of the plugin in their name. As I said, I will make them a bit more unique in the next version. I don't think I have run into any problems with this yet on any of my plugins so that is good. I will work on updating some of my other plugins as well.
Posts: 3,491
Threads: 106
Joined: Mar 2010
@shawn_a
The problem I reported was not caused by duplicate plugin class or func names, but because I upgraded by simply overwriting the old version 1.2.2, and some of the plugin files have changed location in GS Blog 1.4.
Anyway, an interesting discussion...
Posts: 36
Threads: 6
Joined: Apr 2011
I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again.
Posts: 661
Threads: 52
Joined: Feb 2011
newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again. Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
Posts: 6
Threads: 1
Joined: Sep 2012
I'm using Get-Simple 3.1.2 with GS-Blog 1.4.1 and the descibtions of my blog post are all meshed up.... basically this is what I get...
Here is a source view of one of my blog posts... It's nothing Google or any other search engine likes to see...
Code: <meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
Anybody knows what is going wrong?
Posts: 36
Threads: 6
Joined: Apr 2011
mikeh Wrote:newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again. Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
I was able to get the plugin and website working, but I ran into this issue:
Posts: 324
Threads: 5
Joined: May 2012
2012-09-30, 02:12:14
(This post was last modified: 2012-09-30, 02:17:42 by CWyd.)
The "Read More" link doesn't seem to be working. Just links to the news page.
Anyone having the same problem, or know how to fix this?
EDIT:
inc/frontEndFunctions.php line 64
Change from...
Code: echo '  <a href="" class="read_more_link">'.$blogSettings['readmore'].'</a>';
to
Code: echo '  <a href="'.$url.'" class="read_more_link">'.$blogSettings['readmore'].'</a>';
Posts: 661
Threads: 52
Joined: Feb 2011
newdeepdan Wrote:mikeh Wrote:newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again. Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
I was able to get the plugin and website working, but I ran into this issue:
Do you have the Multi User plugin installed? If so, try going to the multi user plugin and re-saving your user.
Posts: 661
Threads: 52
Joined: Feb 2011
nice10150 Wrote:I'm using Get-Simple 3.1.2 with GS-Blog 1.4.1 and the descibtions of my blog post are all meshed up.... basically this is what I get...
Here is a source view of one of my blog posts... It's nothing Google or any other search engine likes to see...
Code: <meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
Anybody knows what is going wrong? I have no idea what is going on here but I am looking into it. It seems to only happen if the page you have the blog set to does not have a meta description.
Posts: 23
Threads: 1
Joined: Sep 2012
@islander and @mikeh
I was reading @islanders post on the I18N Search topic ( http://get-simple.info/forum/post/30945/#p30945) regarding hooking GS Blog to be searchable with said plugin. I attempted to place the code in...with disastrous results. I didn't see any other formal way of requesting a feature addition, so I though this would be the best way. Can the hooks be added into the GS Blog module to allow searching this way?
Thank you,
Matt
Posts: 661
Threads: 52
Joined: Feb 2011
influxweb Wrote:@islander and @mikeh
I was reading @islanders post on the I18N Search topic (http://get-simple.info/forum/post/30945/#p30945) regarding hooking GS Blog to be searchable with said plugin. I attempted to place the code in...with disastrous results. I didn't see any other formal way of requesting a feature addition, so I though this would be the best way. Can the hooks be added into the GS Blog module to allow searching this way?
Thank you,
Matt I will add this in the next version.
Posts: 23
Threads: 1
Joined: Sep 2012
mikeh Wrote:I will add this in the next version.
@mikeh - Thank you sir. I look forward to the next release.
Posts: 324
Threads: 5
Joined: May 2012
mikeh Wrote:I will add this in the next version. Awsome, I cant wait. Thanks for the great work.
Posts: 6
Threads: 1
Joined: Sep 2012
mikeh Wrote:nice10150 Wrote:I'm using Get-Simple 3.1.2 with GS-Blog 1.4.1 and the descibtions of my blog post are all meshed up.... basically this is what I get...
Here is a source view of one of my blog posts... It's nothing Google or any other search engine likes to see...
Code: <meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
Anybody knows what is going wrong? I have no idea what is going on here but I am looking into it. It seems to only happen if the page you have the blog set to does not have a meta description.
Yes, adding meta description to the blog set page fixed the description on blog posts, Thanks so much I probably never figured that out... (Its on my testing website so meta-tags are often not a high priority)
Posts: 5
Threads: 1
Joined: Oct 2012
2012-10-03, 01:00:04
(This post was last modified: 2012-10-03, 03:19:26 by nalrote.)
Hi, I'm using gs-blog 1.4.1 with getsimple version 3.1.2.
I just installed, and I'm trying to get blog posts not to display on home page.
In blog manager settings, if I set "Page to display blog posts" to "index", I get the post listing on all pages. If I set it to another page (e.g. "blog"), it doesn't show up on that page, or any of the pages.
My template does have <?php get_page_content(); ?> in it.
Any ideas?
PS - found some typos:
In help tab: "So to access a custom field you can do somthing like below" >> somthing to something.
In settings tab: "Length of excerpt (characters)::" >> there's two ::
In settings tab: "Display tags under post?:">> you have ? and :
(2nd) EDIT:
The problem was in my .htaccess file. I saw the plugin's help page has a pop up showing what my .htaccess should look like, which is a really nice touch!
Unfortunately I found something wrong with it:
It say it should be:
Code: RewriteRule ^blog/post/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
but I found it had to be:
Code: RewriteRule ^blogpost/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
(note: my permalink structure is: %slug%)
Next problem: can't enable comments on posts, how do I do that?
Posts: 8
Threads: 0
Joined: Feb 2012
Hello Mikeh
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG
Posts: 661
Threads: 52
Joined: Feb 2011
mig21 Wrote:Hello Mikeh
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG Where do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
Posts: 8
Threads: 0
Joined: Feb 2012
2012-10-05, 20:55:18
(This post was last modified: 2012-10-05, 21:20:13 by lucius.)
mikeh Wrote:mig21 Wrote:Hello Mikeh
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG Where do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
Actually I want to see the line breaks that are already in the content, also in the excerpt, just as I see them in the full text. See example blog.avanti-papi.ch ! In the excerpt there is nor line break between the salutation (Hallo Avanti Papis) and the text (bekanntlich geht der Krug...), but in the content there is one. An example where it is the way I want it is: http://blog.swiss.com/
As you can see, the excerpt is with line breaks, too.
Posts: 661
Threads: 52
Joined: Feb 2011
mig21 Wrote:mikeh Wrote:mig21 Wrote:Hello Mikeh
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG Where do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
Actually I want to see the line breaks that are already in the content, also in the excerpt, just as I see them in the full text. See example blog.avanti-papi.ch ! In the excerpt there is nor line break between the salutation (Hallo Avanti Papis) and the text (bekanntlich geht der Krug...), but in the content there is one. An example where it is the way I want it is: http://blog.swiss.com/
As you can see, the excerpt is with line breaks, too. Well that is tricky because the excerpt function removes html, and the line breaks are of course, html.
What you can do is in plugins/blog/class/primary/Blog.php, edit the create_excerpt function and remove the strip_tags and strip_decode functions as seen below:
Code: <?php
/**
* Create Excerpt for post
*
* @param $content string the content to be excerpted
* @param $start int the starting character to create excerpt from
* @param $maxchars int the amount of characters excerpt should be
* @return string The created excerpt
*/
public function create_excerpt($content, $start, $maxchars)
{
$maxchars = (int) $maxchars;
$content = substr($content, $start, $maxchars);
$pos = strrpos($content, " ");
if ($pos>0)
{
$content = substr($content, $start, $pos);
}
$content = htmlspecialchars_decode($content);
$content = str_replace(i18n_r(BLOGFILE.'/READ_FULL_ARTICLE'), "", $content);
return $content;
}
?>
Above, you will see the changed line:
Code: $content = htmlspecialchars_decode($content);
Posts: 2,094
Threads: 54
Joined: Jan 2011
mikeh Wrote:What you can do is in plugins/blog/class/primary/Blog.php, edit the create_excerpt function and remove the strip_tags and strip_decode functions as seen below:
...
What will probably create invalid HTML... :-(
BTW, mikeh: you should first strip the tags and only then get the substring of the desired length.
The way you do it, you might get invalid HTML when splitting within a tag, e.g. at <a . And you will nearly always get less characters than desired.
|